Page 267 - Trackpad 402_Class-X_Final
P. 267
Table: PRODUCT
PID PRODUCTNAME MANUFACTURER PRICE EXPIRYDATE
TP01 Talcum Powder LAK 40 2011-06-26
FW05 Face Wash ABC 45 2010-12-01
BS01 Bath Soap ABC 55 2010-09-10
SH06 Shampoo XYZ 120 2012-04-09
FW12 Face Wash XYZ 95 2010-08-15
Table: CLIENT
CID CLIENTNAME CITY PID
1 Cosmetic Shop Delhi FW05
6 Total Health Mumbai BS01
12 Live Life Delhi SH06
15 Pretty One Delhi FW05
16 Dreams Bengaluru TP01
14 Expressions Delhi NULL
Primary Key: PRODUCT- PID
CLIENT - CID
PID is foreign key in CLIENT table
In the above table PRODUCT, the primary key is PID. In table CLIENT, the primary key is CID. The relationship between
PRODUCT and CLIENT is made because of the presence of a common field PID. So PID is a Primary key in table PRODUCT
and Foreign key in table CLIENT.
What is an attribute or a set of attributes whose values match the primary key of another table?
Creating a Database Using OpenOffice Base
Let us now create a database using OpenOffice Base. Follow the given steps:
Step 1: Click on the Start button. The Start menu will appear.
Step 2: Select the OpenOffice folder from the Start menu.
Step 3: Now click on OpenOffice Base. The Database Wizard with 2 steps will appear.
Database Management System 267

