home Relational Database tutorial - Data Modeling

Relational Database

Home Lesson 1, 2, 3, 4



Free Relational Database Tutorial and Tips For Beginners!

Intro To Data Modeling

Lesson 1

Most novices approach creating data files as though they are typing a list on a piece of paper. For some situations this works. Spread sheets for simple problems are good for this.

Here's an example where a simple file is sufficient: you want an inventory of all the valuables in your house. It could look something like this:

Description Value
1999 Toyota Corolla $15,000
Gibson Guitar $600
RCA TV - serial #1234 $300

This is good and valid.

Let's look at another situation. You are hired to manage the records for a new library. For convenience of illustration, let's say that there's only a few patrons, each with a unique name and a few books. So, you get your trusty spread sheet out and set up a single file that looks like this:

Patron Name Patron Address Book Title Book Author Date Book Checked Out
Andrew 80 Pleasant St., Santa Cruz, CA Tennis! Scott Brook 3/3/2001
Andrew 80 Pleasant St., Santa Cruz, CA Soccer! Tom Brown 3/3/2001
Martina 7 D St, Chicago, IL American! Susan Thomas 2/2/2001

It works! Now the library can keep track of who checked out what books and when! But look a little closer. Andrew checked out two books, Tennis! and Soccer! Notice that you had to type in Andrew's address twice. Bummer! Now if Andrew checks out 20 books, you'll have to type in his whole address 20 times! Redundant! Ugh!

What's just as bad is what if Andrew changes his address and moves across the street from where he used to live. Then you have to update the addresses on all 20 records!

More bad news, every time you type in a book, you have to type in the author's name.

Somehow, our beautiful single file system has gotten out of control. There must be a better way.

Enter the relational database. It can handle this messy situation cleanly!

Click here to continue
Click here to go back