Relational Database Model

In relational database model, the data is organized into tables(i.e. , rows and columns). These table are called relations. A row in a table represents a relationship among a set of values. Since a table is a collection of such relationships, it is generally referred to using the mathematical term, relation, from which the relational database model derives its name.

Let us see how a sample database can be represented in relational form. The sample database being shown here has three tables(relations): Suppliers, items, shipments.

SuppNoSupp_nameStatusCity
S1Britannia10Delhi
S2New Bakers30Mumbai
S3Mother Dairy10Delhi
S4Cookz50Bangalore
S5Haldiram40Jaipur
Suppliers table
ItemNoItem_NamePrice
I1Milk15.00
I2Cake5.00
I3Bread9.00
I4Milk Bread14.00
I5Plain biscuit6.00
I6Cream biscuit10.00
I7Ice Cream16.00
I8Cold drink8.00
I9Namkeen15.00
items table
SuppNoItemNoQty_supplied
S1 I210
S1 I320
S1 I620
S2 I420
S2 I510
S3 I110
S3 I710
S4 I830
S5I930
shipments table

In the above tables SuppNo, ItemNo, are the primary keys.

  • A primary key is the key-field which can uniquely identify a row in a relation.

Notice that here each supplier has unique supplier number, exactly one name, status value and location.. Likewise, we assume that each item has a unique item number, name and price; and also that, at any given time no more than one shipment exists for a given supplier/item combination.

Each of these three tables closely resembles a conventional sequential file, with rows of the table corresponding to records of file and columns corresponding to fields of the records. Each of these tables is actually a special case of construct known in mathematics as a relation.

Rows of relation are generally known as tuples and columns are referred to as attributes.

Leave a comment

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started