SQL Beginner's Tutorial: Writing your First Queries

Hey Friends!!

Thanks for coming back!


An example of the complexity of the Relationships between some tables in a Database

I know the first tutorial was busy, this one will be as well!! We will be busy here as well, but I hope we can have some fun. I know I plan on having some fun.

So let's begin...



Source

SQL is a bunch of CRUD

Yeah, you heard me. CRUD! Not the way you think, though.

CRUD in Database Management means a great deal, even though the word itself doesn't sound like a word you'd want to use. In fact, it's a shortening of the words (C)reate, (R)ead, (U)pdate & (D)elete. C-R-U-D. The statements identify the major components of Database Management and tells the database what to do and how.

A Create statement tells the Database System to, literally, create something. Whether you are looking to create a table, a database, a View, or something else, the Create statement allows the system to do just that.

You Read data from tables. this is one basic way to interact with the Database information.

An Update statement tells the Database System to update data in a Database Table. This statement allows the system to change data in the table that is already in place. eg. if you are saving High Scores for a game, the Update statement will do just that.

A Delete statement is fairly self-explanatory. It removes rows from a Database Table.



Source

Queries and its Parts

As I said earlier, a Query is a Question that you ask a Database (or set of Databases) in order to find an answer in the form of columnized rows (as in a spreadsheet). Within that Query are components

Statement - what do you want to find?
From - what table do you want to look in?
Join - do you need to join together multiple tables?
Filter - how do you want to filter the data?
Grouping - how do you want to group the results?
Sorting - what order do you want to sort by?
Having Filter - do you have any extra filters to use?

I don't have a great deal of time to finish this post, so I'm going to cut it short. The next tutorial will elaborate on the Query itself and how to begin thinking about building the query.

Thanks for reading!!


Source

Sort:  

Upvoted on behalf of the dropahead Curation Team!

Thanks for following the rules.

DISCLAIMER: dropahead Curation Team does not necessarily share opinions expressed in this article, but find author's effort and/or contribution deserves better reward and visibility.

Help us giving you bigger upvotes by:

Upvote this comment!
Upvote the latest dropahead Daily Report!
Join the dropahead Curation Trail
to maximize your curation rewards!
Vote dropahead Witness with SteemConnect
Proxy vote dropahead Witness
with SteemConnect
Delegate/donate STEEM POWER to @dropahead
Do the above and we'll have more STEEM POWER to give YOU bigger rewards next time!

News from dropahead: Bye bye 25+ and 50+! Welcome 20+ 40+ and 60+!

nice explanation to understand the CRUD.

Thank you. I try to explain these things in a more comfortable way so that the every man (or woman) can understand it easier.

Any time. It's not easy to explain these technical things to people with no IT backgrounds, but you did very well. Waiting for another series.

It’s coming. Out of town but I’ll post one by the end of the week I hope.

Thanks for this useful post about SQL queries.

You’re quite welcome. I will be exploring queries much deeper in the upcoming Tutorial Posts. Keep an eye out for the #sql-forbeginners tag!

I am not a techie but this post kind of added a little knowledge to me. Thanks

Well keep watching because I’m going to drop a lot more knowledge in upcoming tutorials. I hope they help you out.

i liked in your post dear

may be a question dear

Let me know what you would like to know. If it’s not a simple answer I’ll put it in its own post.

good post lol

Thanks! Stay tuned for more!

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 63026.81
ETH 3462.43
USDT 1.00
SBD 2.51