0% found this document useful (0 votes)
89 views

Dbms Lab4 PDF

The document describes creating several database tables and imposing various constraints. It instructs to: 1. Create a PRODUCT table with a primary key on PRODUCTNO at the column and table level. 2. Create a CLIENT table with a unique constraint on CLIENTNO at the column and table level. 3. Create an EMPLOYEE table where the FNAME and LNAME columns are constrained to uppercase.

Uploaded by

babi das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Dbms Lab4 PDF

The document describes creating several database tables and imposing various constraints. It instructs to: 1. Create a PRODUCT table with a primary key on PRODUCTNO at the column and table level. 2. Create a CLIENT table with a unique constraint on CLIENTNO at the column and table level. 3. Create an EMPLOYEE table where the FNAME and LNAME columns are constrained to uppercase.

Uploaded by

babi das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DATABASE MANAGEMENT SYSTEM LAB

ASSIGNMENT – 4 BASED ON IMPOSEMENT OF CONSTRAINTS

1. Create a table called PRODUCT


FIELD DATA TYPE
PRODUCTNO VARCHAR2(10)
QTY_ORDER VARCHAR2(10)
RATE NUMBER(10,2)
Impose Primary Key constraint in column level and table level on PRODUCTNO.

2. Create a table called CLIENT


FIELD DATA TYPE
CLIENTNO VARCHAR2(10)
NAME VARCHAR2(10)
CITY VARCHAR2(10)
SALARY NUMBER(10,2)
Impose Unique constraint on CLIENTNO in column level and table level

3. Create a table called EMPLOYEE


FIELD DATA TYPE
EMPNO VARCHAR2(10)
FNAME VARCHAR2(10)
MNAME VARCHAR2(10)
LNAME VARCHAR2(10)
Impose constraint at column level and table level Data value inserted into the column FNAME,
LNAME should be in upper case .

4. Create a table called EMPLOYEE1


FIELD DATA TYPE
EMPNO VARCHAR2(10)
FNAME VARCHAR2(10)
MNAME VARCHAR2(10)
LNAME VARCHAR2(10)
EMPNO must start with capital letter ‘E’.Impose constraint at column level and table level

5. Create a table called CUSTOMER


FIELD DATA TYPE
CUSTOMERNO VARCHAR2(10)
NAME VARCHAR2(10)
SALARY NUMBER(10,2)
ADDRESS VARCHAR2(10)
Impose NOT NULL on CUSTOMERNO,NAME.

PREPARED BY: SOMA GUPTA Page 1


DATABASE MANAGEMENT SYSTEM LAB

6. Create a table called SALESORDERDETALS with its primary key as DORDERNO. Impose foreign
key on ORDERNO of SALESORDER table referencing to the column DORDERNO of
SALESORDERDETAILS table. Imposement should be done at table level.

SALESORDERDETAILS SALESORDER
FIELD DATA TYPE FIELD DATA TYPE
DORDERNO VARCHAR(10) ORDERNO VARCHAR(10)
PRODUCTNO VARCHAR(10) ORDERDATE DATE
QTYORDER NUMBER (8,2) CLIENTNO VARCHAR(10)
RATE NUMBER(10,2) ORDERSTATUS VARCHAR(10)

7. Add a primary key constraint on FNAME column of EMPLOYEE table.


8. Drop primary key constraint from the table EMPLOYEE.

PREPARED BY: SOMA GUPTA Page 2

You might also like