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

Iwan Engelbrecht
Iwan Engelbrecht
9,941 Points

DATABASES

.

Jeffrey James
Jeffrey James
2,636 Points

3 main use cases:

  • Writing SQL to extract data to analyze. You will probably use a sql client, like pgAdmin or some licensed version of SQL Server Studio, or phpMyAdmin of you're using MySQL

  • In serverside code using a library. Eg, if you're coding python and need to access a database, you might use raw SQL in a string which gets sent to the psycopg2 module and then it runs the command against a database

  • Using an ORM. Likely with a serverside language like python or ruby. This abstracts away certain SQL aspects, but typically allows you to drop down to raw SQL if you can't understand some complex operation using the ORM's api methods.

Most web applications use an ORM (django, rails, etc.... to minimize the custom code you need to write between your models and their behavior (create, read, update, delete, get, list, etc....)

1 Answer

Iwan Engelbrecht
Iwan Engelbrecht
9,941 Points

Thank you for that detailed information Jeffrey James. That certainly helps a lot and was exactly the information I was hoping to receive.

Jeffrey James
Jeffrey James
2,636 Points

Sure. From a "bang for your buck" it's a good language to master. Whether data science, business intelligence, backend development, etc...quite often, it all requires SQL.