Class Notes, Database

DataStructures.

We back away from DB theory to learn some of the important data structure that is used in DBMS.

The simplest data structure is Flat file, which is a file with no repeating field(all fields are disjoint) –> 2 Dimesion table ( field = columns, record = row)

A typical flat file (Image source : wikipiedia)

1.Linked Lists.

Linked lists are the list that of which every element is linked together linearly(dynamically). The last element’s next neighbor is usually denoted null, or none.

NOTE : There are two kinds of linked list

– Singly Linked list or one-way iteration list(picture above)

– Doubly Linked list or two-way iteration list.

 

 

For example, Suppose we have the following table of records.

What if we want to sort the table by First Name. We can do sort operation onto the list to get the sorted list like this :

Begin = 2 –> 1 –> 3 –> 4 –> \emptyset

Or :

 

 

 

 

 

2.Inverted Lists.

3. Tree.

4. Simple Network.

5. Complex Network.

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