Tables and Rows


As next item in the database series, I would like to discuss the how a database is built.

In the previous article I briefly described tables. Let’s take a look in detail now. I will just explain what they are and how the principle work. Not how you can set up a correct model. There are guidelines which you can/must follow to set up the correct model.
Maybe I can write about that later.

A database contains a lot of different objects. The most commonly used is a table. This object is a container of data.
Let’s take a person table as an example.
Suppose you want to store the name, first name, gender and birthdate of  person. Then you will need to create a table with 5 columns. Each column will contain different data.
Column 1 will contain Name
Column 2 will contain Fist Name
Column 3 will contain gender
Column 4 will contain birthdate
Column 5 (I realize that I only summed up 4) is a special column. We will store a unique number here. So each person will get a unique ID.

Each row will contain a unique set of data. Meaning that the data of at least 1 column should be unique (in this case the ID will be the column which is always unique).
When you input some data and take a look at the result in the database the format will be something like this:

Ideally the data in the tables should be, what is called, normalized. This is the process of minimizing the redundancy of the data in the database.
Like this you will decompose the relations of the data. Breaking it up in diffent tables so you can create a set of structured tables with unique data.

I know this will still sound a but conceptual at this time. But you’ll get the hang of it soon enough.

Next time.. Joins!

Advertisements

2 thoughts on “Tables and Rows

  1. Pingback: Join us! « Tech-o-rama

  2. Pingback: Stars and Relations « Tech-o-rama

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: