Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

why not use a "if" key word why "where"

how does sql work vm compiler, compiler, translator, high level app ? I'm guessing at least in some instances its just running a c++ app right? "where" really isnt all that logical if(<entire> == <parameter>){ return entire}; is there a particular reason for this or just trying to make things harder (i mean crazy simple syntax anyway, but could be better (now i want to make my own sql! ) and while im asking multi question what are some alternative to sql?) .

1 Answer

Steven Parker
Steven Parker
231,140 Points

:point_right: SQL is not compiled into another language.

Database engines are written in other languages, but they don't convert SQL into another language to perform the functions. I agree that SQL may seem awkward if you're familiar with one or more common programming languages, but remember, SQL isn't intended to do the same job. Plus it's been around longer than most currently-used programming languages.

But to your other question, there are alternatives. There are newer an increasingly popular databases based on "NoSQL". This reference website lists over 225 NoSQL databases. Treehouse even has some courses such as Mongo Basics and Building a MEAN Application.

There is also software that gives you more programmer-style ways of accessing a conventional SQL database. If you're a C# developer, you might do your Querying With LINQ. And a Python programmer might use the Django ORM.

thanks a ton for the reply makes a bit of scene, the sql basics does mention this would be good for marketers and i differently see why. I do think a translator could be implemented over sql fairly easily (maybe i'm wrong i'm a beginner and i use c++ mostly) i check out LINQ tho. If i was using java script for back end of a website what would i be best off using sql or mongo?