0% found this document useful (1 vote)
86 views

Dbms Lab 6 Task 1: M Arsalan Amin Saudagar Bscs-4B 39242

The document outlines 8 tasks for a database lab assignment: 1) Create a replica table; 2) Add a column; 3) Drop a column; 4) Add multiple columns; 5) Change a data type; 6) Create table definitions; 7) Add an attribute to a table; 8) Remove two tables.

Uploaded by

Muhammad Ammar
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 (1 vote)
86 views

Dbms Lab 6 Task 1: M Arsalan Amin Saudagar Bscs-4B 39242

The document outlines 8 tasks for a database lab assignment: 1) Create a replica table; 2) Add a column; 3) Drop a column; 4) Add multiple columns; 5) Change a data type; 6) Create table definitions; 7) Add an attribute to a table; 8) Remove two tables.

Uploaded by

Muhammad Ammar
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/ 5

M Arsalan Amin Saudagar BSCS-4B 39242

DBMS
Lab 6
Task 1
Create a replica of EMP table with all the records in it.

Task 2
Add a column ‘Address’ in it.

1
M Arsalan Amin Saudagar BSCS-4B 39242

Task 3
Drop column ‘Address’ from it.

Task 4
Add columns ‘House No’ character ,’Street No’ numeric, ’Area’ character ,’City’ character in it with the
respective data types.

Task 5
Change the data type of ‘House No’ from character to numeric.

2
M Arsalan Amin Saudagar BSCS-4B 39242

Task 6
Create the Data Definitions for each of the relations shown below, using SQL DDL. Assume the following
attributes and data types:

FACULTY: FacultyID (integer, primary key) FacultyName (25 characters)

COURSE: CourseID (8 characters, primary key) CourseName (15 characters)

CLASS: ClassID (8 characters) CourseID (8 characters foreign key) SectionNo (integer) Semester (10
characters)

STUDENT: StudentID (integer, primary key) StudentName (25 characters) FacultyID (integer foreign key)

3
M Arsalan Amin Saudagar BSCS-4B 39242

Faculty Table

Course Table

Class Table

4
M Arsalan Amin Saudagar BSCS-4B 39242

Student Table

Task 7
How would you add an attribute, CLASS, to the STUDENT table?

Task 8
How would you remove the FACULTY and STUDENT tables?

You might also like