Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera113886yWell SQL is the most versatile database. Others excel in specific situations but often you find you need to use multiple different databases for different parts of information or resort to very cumbersome solutions.
-
@Voxera I agree. It's so very painful to write complex queries, but I'll be damned if it isn't amazing at what it does, and fast as hell.
-
Be thankful you can use SQL. Our main solution runs on isam files powered by Cobol dlls.
-
Npstr6576yThe two main problems with SQL are that it is the only really wide spread 4th generation language, meaning it is hard to learn it from doing non-SQL because there is no other language like it, and it doesn't play well with the rest of the lower generation languages. Also often ppl will try to translate the relational model of their data into an object oriented one, and that just does not work very well.
-
@orseji idk. I don't maintain the cobol dlls. I think it's dynamic record size and multiple keys over different fields.
-
Voxera113886y@Npstr well. Microsoft has moved the same syntax into C# with Linq.
First time I saw it I thought why?
Today I use it so much that you often cannot find a function without at least some linq in it.
Ex:
var activeIssueIds =
from i in issues
where !i.Disabled
select i.Id;
Its a very simple example but issues in this case could be an Orm table, a list or any number of item implementing the right interfaces.
Its extremely powerful and expressive :)
There is a fluent form to for this kind of simple queries. -
Npstr6576y@Voxera I've heard only good things about LINQ.
Personally, since I hail from the Java world, I'm giving jOOQ a try currently and so far it's awesome.
It generates code from the database schema which is then used to build the queries. No more sql strings. This gives you great peace of mind when migrating the database schema as you will get (most of the time) compile time errors if you made a change that breaks a query. -
Voxera113886y@Npstr that sounds a lot like it.
The real beauty with linq thou is that its not only database but any enumerable that can he queried the same way:)
And as a bonus, you can turn the query into an expression tree that you can use to dissect the query, for example to serialize it or make changes.
It tends to pop in everywhere. :)
Related Rants
Gah! (Totally guilty of it too but...)
That feeling when you ask a question like "how do I make SQL less intolerable for my team?" And you get answer like "just don't use SQL lol. Use this other thing!"
I appreciate suggestions, but why would I possibly use SQL if I had the choice to use literally anything else. I play by other people's rules and on their deadlines.
rant
constraints
have you heard of
mysql
not my call
gah!