Course

Terminology

What's a database made of?

First let's get some naming conventions out of the way. Databases are made of Tables.

Tables are collections of related data. You might have a 'Users' table, a 'Posts' table, an 'Activity' table etc...

IDNameAge
1Amir30
2Sarah24

Tables are made up of vertical columns or 'fields'. These are shared across each value in the table.

Here I've highlighted all of the ID values of the table. This is the

IDNameAge
1Amir30
2Sarah24

Here I've highlighted all of the Name values of the table. This is the

IDNameAge
1Amir30
2Sarah24

Here I've highlighted all of the Age values of the table. This is the

IDNameAge
1Amir30
2Sarah24

Each column in a table is made up of more than just a 'name' for that column (ID, Name, Age). It also enforces a 'type' for that column. Similar to typescript. For example ID in this table is a 'number' or 'INT'. Name is a 'string' or 'VARCHAR'. Age is a 'number' or INT.

The actual values in the table (In this case, each user) is called a 'row'. Here I've highlighted the first of two 'rows' in our table-

IDNameAge
1Amir30
2Sarah24

Because each column has a predefined 'type'- that means each row has to share that type. For example:

This is valid:

IDNameAge
1Amir30
2Axel24

I changed one of the names. But the name is still a string.

This is NOT valid:

IDNameAge
1Amir30
2SarahTwenty Four

It isn't valid because the 'age' column can't handle multiple types (a String and a Number).

0 Comments

"Please login to view comments"

glass-bbok

Join the Conversation!

Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.

Upgrade your account
tick-guideNext Lesson

What is SQL?