Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 2 years ago.
0

Yeah SQL sucks. Flat files all the way. But seriously I think laravel has done a pretty good job of abstracting the DB layer behind their relationships. It's not perfect but it's pretty good. You could almost go without ever writing any SQL if you understand the relational concepts.

0

It's not SQL it's you. SQL is great. I suppose you think calculus sucks? I guess enough said. Have you actually practiced writing some SQL queries? You do realize that eloquent has to convert to SQL at run time.

0

Im on the team SQL r0x, too.

Yes, it can be a little complex sometimes, but you can do almost magic with it (after a 400+ lines query you swear its magic).

SQL's syntax is dated, I agree with you on that.

0

I love people who use the term "dated". It says a lot about them. Let's see, is calculus also dated? I suppose you call a room a space. I call a room a room.

0

A follow up, some people seem to enjoy writing crazy queries, morph this, poly that.
I was head database manager for several years for a large trucking co. If you people would learn how to normalize your data, simple queries would get the job done!

0

SQL is great for data management alone, but it's totally irrelevant for programmed projects. It's always funny to read opinions like "it's not SQL, it's you". I guess that person thinks that he is SQL guru and I can't use it. It's probably the opposite :) I know SQL very well and I worked on some huge projects, including Laravel-based ones. This is where SQL is a pain.

It's funny how frameworks try to deal with code reusability, flexibility and makes them easier to maintain, while SQL still stays on the way. Of course, ORM helps, but it doesn't abstract it enough. You just abstract raw query with ORM, where the best thing is being able to add SQL clauses in any order.

I will add one point:

  1. Calling models by their table names. Again, too low-level and should be totally abstracted. I don't want to care how I called the box where the models are stored. It is just my model entities. And pivot tables names? Please...

Those who are so sceptical thinking that SQL is so wonderful, would probably be the same when BASIC language was the most popular. I'm sure that SQL will die in web projects soon.

Last updated 9 years ago.
0

Duh, how would you query the database??? Sounds like you just want a static web page without a database! SQL is the way to communicate with database records. What do you propose to replace SQL with??????????????????????????????
Duh and double duh.
Actually answer.

Last updated 9 years ago.
0

Another followup please please please, some of you stop, el stopo, hault programming and take up another profession, ditch digging or something. Even if you replaced current SQL, it would still have to query the database. Just please stop programming and commit yourself in an institute somewhere. You sound like a dangerous programmer.
So hey show me all records from pets vs. Select * from pets;
Really get a life, but exclude programming for the sake of humanity.

Last updated 9 years ago.
0

@jimgwhit... what the hell is wrong with you? Whether you agree with it or not Kokokurak presented some good thoughts. You don't need to insult him and say he is bad programmer. In matter of fact, if everyone was like you, there will be no advance in programming at all. Sometimes it is good to stop and reflect. I personally like SQL, despite it has flaws, but after 30 years of it's existence, nothing changed a lot and majority of people just take SQL as the only way to query data; we just blindly use it not even thinking about using something else

Last updated 9 years ago.
0

What else do you use? He said but it's totally irrelevant for programmed projects.

Last updated 9 years ago.
0

I meant I am one of these people that blindly use SQL as the best way to communicate with relational databases (which it is) not even thinking about why we can not (properly) use something else

0

In asp. net I've used linq to SQL. But like eloquent the queries are converted to regular SQL at run time. I still don't understand "but it's totally irrelevant for programmed projects.". What is relevant? As far as linq to SQL, I did like it, but just a little more effort to write regular queries.

0

SQL is an implementation of set theory and relational algebra and is more than just a place to stuff data. Laravel has abstracted out most of the hard stuff for you, but has already gotten heat for not being able to to more complex queries that SQL is able to do and a lot of larger applications use. You're complaining about SQL because it's too hard for you. SQL wasn't meant for you. If a flat--file is what you want, that a flat file is what you can have but SQL is not the problem, it's just too [difficult/complicated/applied/useful] for you.

0

kokokurak said:

Hi guys,

I would love to hear your opinions. I think that SQL sucks. I consider it one of leftovers from dino era of IT. I know we all use it, but here's why it sucks:

  1. The code is not concise enough. Why do I need to define database structure, relations and pivots on my own? Many to many relations are something super common and working with them is pain in the a**. In convenient case, I would just define my models with fields and how is it related. One time, in one place. That really sucks that I do have foreign keys, but still I need to define relations on my own. SQL can't communicate with my code properly, it's like a separate world (with dinosaurs).

  2. Pivots. God, I hate them. And if they contain some additional data, it's a nightmare to work with. Why am I even wanted to think about something as low level as pivot table? I don't care about it. I care about my models and how they are related, I don't care about this fake structure called pivot table. And many-to-many custom queries? Joining two times to just get many to many relation is so bad.

  3. SQL never tells me exactly what it wants from me. The errors are like "Something's wrong near that character, but I am too dumb to know what".

  4. It's impossible to handle reasonable versioning of database in easy way.

  5. For bigger projects, that kind of separation between logics and data is just unacceptable.

I worked a lot with SQL today and I am really mad. Need a frozen yoghurt now. SQL, you are old enough. Die already.

Do you guys agree or are you SQL lovers

There are 2 types of developers, Type 1 : Can't do anything worth 2 cents poor performance only can put together modules written by someone else think they know it all think the old languages are for dinosaurs while their new platform is running on them

Type 1 only exist because of rapid application development, buying more hardware to make the application run faster is cheaper than hiring good developers. They are stuck making blogs and websites cause they can't make anything else

Type 2: Software engineers who know and can implement new platforms themselves because they know the "dinosaur languages", design patterns and algorithms.

You decide which type you are going to be.

and Type 3: Hot asian chicks.

Touche

Last updated 7 years ago.
0

SQL Sucks because it's compose-ability properties are severely lacking. Since there is no ability to pass high-order constructs into other high-order constructs (e.g. views into views, stored-procs into stored-procs, UDFs into UDFs...) this implicitly causes codebases to grow uncontrollably in size and technical debt. If anyone doubts this, please watch my talk entitled "Slick in Practice. Salvation from the Trenches of SQL" and disprove me https://www.youtube.com/watch?v=XJqnh2jLt8c.

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kokokurak kokokurak Joined 21 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.