0% found this document useful (0 votes)
13 views6 pages

Assignment 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Assignment 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Assignment 5

Table & Constraints

1. Create Course table with given constraints

Field name Type Size Constraint


Course_ID Number 3 Primary Key
Cname Varchar 30
Fees Number (10,2) Check
Constraint
>= 60000
Percentage number 3
Floor Number 5 Between(1-9)
HOD Varchar 20

Insert following Values in course table

Course_ID Cname Fees Percentage Floor HOD


101 BBA 75000 75 3 Dr.Manoj
Verma
102 B.Com(H) 80000 80 8 Dr.Manju
Gupta
103 Eco(H) 85000 85 9 Dr. Gaurav
104 BJMC 65000 65 4 Dr. Umesh
105 BBA-LLB 70000 70 7 Dr.Praveen

2. Create Faculty Table with given constraint

Field name Type Size Constraint


FID Number 3 Primary Key
Fname Varchar 30 Not Null
Course_ID Number 3 Foreign Key
Specialization Varchar 30 Check
(IT,Finance,HR,Marketing)
Salary Number 10

Insert following values in Faculty Table Data


FID Fname COURSE_ID Specialization Salary
111 Dr.Sarita 101 Fill as per choice Fill as per
choice
112 Dr.Deepak 101
113 Dr.Sangeeta 101
114 Dr.kamna 102
115 Dr.Umesh 103
116 Dr.Diksha 104
117 Dr.Parul 105

3. Create student table having following structure and constraints

Field name Type Size Constraint


Enrol_No Number 4 Primary key
SName Varchar 30 Not Null
DOB Date Check
Constraint
>=1-Jan-2000
City Varchar 30 Default value
Delhi
CID Number 3 Foreign
Key(Course table)

Mobile Number 10 Unique & must be


of 10 digits
Class_coordinator Number 3 Foreign
Key(faculty Table)

4. Insert Minimum 20 Values having Mix of different courses and class coordinator

You might also like