0% found this document useful (0 votes)
42 views5 pages

Dbms Lab Hourly Exam Spring 2021 Muhammad Hamza Khan1)

The document provides instructions for an hourly exam on database management systems. Students are asked to draw an ERD diagram for an intellectual property management system, create tables according to the ERD with attributes and data types, insert sample data, and define primary and foreign keys. The system must support searching, inserting, deleting and updating data.

Uploaded by

Mohd Sarwar
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)
42 views5 pages

Dbms Lab Hourly Exam Spring 2021 Muhammad Hamza Khan1)

The document provides instructions for an hourly exam on database management systems. Students are asked to draw an ERD diagram for an intellectual property management system, create tables according to the ERD with attributes and data types, insert sample data, and define primary and foreign keys. The system must support searching, inserting, deleting and updating data.

Uploaded by

Mohd Sarwar
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

Hourly Exam Spring-2021

FACULTY OF ENGINEERING, SCIENCE & TECHNOLOG

Subject: DataBase Management Systems Lab Submission Day: Thursday


Instructor: Aqdas/Asif /Rukhsana Submission Date: 8-04-21
Program: BS(CS)/BS(SE) Max. Marks: 12
NAME: Muhammad hamza khan REG: 42092

Please follow the instructions carefully:

1. Write your answers directly on the Black Board (recommended) or upload word file
before the due date on Blackboard.
2. Write your name and registration ID on the first page of your Word file.
3. Answer scripts can only be uploaded on Blackboard only during the submission time.
4. To avoid any unforeseen problems, you are advised to follow the Guide lines
communicated by the Faculty Members.
5. Submission of answer copy(ies) will be considered acceptable through Blackboard only.
Therefore, do not submit your document through email or any other medium.
6. Use 12 pt. font size and Times New Roman font style along with 1-inch page margins.
7. Follow the requirements of the word limit and the marking criteria while writing your
answers.
8. Provide relevant, original and conceptual answers, as this exam aims to test your ability to
examine, explain, modify or develop concepts discussed in class.
9. Do not copy answers from the internet or other sources. The plagiarism of your answers
may be checked through Turnitin.
10. Double check your word file before uploading it on BlackBoard to ensure that you have
uploaded the correct file with your answers.
Question no 01: [12 Marks]

Note: Please make sure that all the points/rules must be implemented.
Draw the ERD Diagram to create relational model corresponding to the described Scenario.
Intellectual Property (IP) in Malaysia is administered by Pejabat Cap Dagangan dan jsminhsk
that are located at different branch all over Malaysia. Its objectives are also to establish strong
and affective administration, strengthening intellectual property laws, and managing applicants
that apply for the ownership of the IP, IP can be categorized into patent, copyright and
trademark. Each of the IP categories has their unique attributes. As a database designer, you are
required to design a database for IP management systems which need these requirements:
 Each branch has a manager to manage the operations.
 A supervisor will supervise many employees.
 One applicant can apply to many IPs.
 An employee will handle many applications by the applicants.
 Each employee is attached to a branch.
 IP can be categorized into: Patent, Trademark and Copyright.

Requirements:
1. ER Diagram of system implemented in tool such as Sqlyog & Draw.io (Available
online).
2. Create all tables with the attribute and appropriate data types presented in ERD.
3. INSERT data into tables(two ,three).
4. Also make sure to have the primary keys and foreign keys clearly defined.
5. System must perform all operations such as searching of particular data, insert of new
record, delete, and update.

ANSWER:
REATE TABLE depart(
d_id INT NOT NULL,
NAME VARCHAR(50),
PRIMARY KEY(d_id)
);

CREATE TABLE hod(


h_id INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(50) NULL,
qualification VARCHAR(50) NULL,
PRIMARY KEY(h_id)
);
CREATE TABLE teacher(
t_id INT NOT NULL AUTO_INCREMENT,
NAME VARCHAR(50) NULL,
qualification VARCHAR(50) NULL,
PRIMARY KEY(t_id)
);

SHOW INDEX FROM depart

ALTER TABLE student


ADD COLUMN address VARCHAR(50) NULL

ALTER TABLE student


MODIFY address CHAR(30) NOT NULL

ALTER TABLE student


DROP address

ALTER TABLE Student


Add Column d_id int NOT NULL,
ADD FOREIGN KEY(d_id) REFERENCES depart(d_id)

ALTER TABLE dept


Add Column h_id int NOT NULL,
ADD FOREIGN KEY(h_id) REFERENCES HOD(h_id)

CREATE TABLE depart2(


d_id INT NOT NULL,
NAME VARCHAR(50),
PRIMARY KEY(d_id)
);

DROP TABLE depart2

You might also like