Eli5: What is database in computer

275 views

What are the terms, sql database and how its used everyday.

In: 1

6 Answers

Anonymous 0 Comments

SQL = “Structured Query Language”

It’s actually a general term that amounts to “a specific way to ask a computer to return or change information”.

When most people say “SQL” they mean T-SQL, specifically the Microsoft version, but there are a number of variants.

There are several types of database that organize data differently, but when saying anything about SQL were generally talking about relational databases. So what’s a relational database?

I’m going to assume we’re all familiar with the general concepts of spreadsheets, here.

So…imagine you’ve got a spreadsheet named “redditors”. They’ve got some specific identifier from the system, like “userID” that’s garanteed to be unique. They may also have some extra data like “display name” and email. So that’s a spreadsheet named redditors with those three columns.

Now you want to do something like see what subs they’re subscribed to, right?

So you create another spreadsheet to track subs called “subreddits”. It has some basics like subredditID, SubredditName and ‘subredditSubTitle’. That’s another spreadsheet with a few columns

So now you can create a list that matches up users to the subs they’re subscribed to. It’ll only need UserId and subredditID and you’ll populate it with the same IDs from the other sheets.

So…that’s a relational database. Different sheets holding different data, but related by sharing IDs between them.

SQL then is just the specific vocabulary and grammar around asking that computer to look at the Subscriptions list you made, look up the userName from the redditors sheet that goes with the ID stored there and the subreddit name stored in the subreddit sheet with the same subredditID. Those are called joins but it gets a bit beyond the “what is a database” question.

If you want to play with SQL a bit, express licenses are free and you can learn the language on w3schools

You are viewing 1 out of 6 answers, click here to view all answers.