Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

SampleMidSemQuestionPaper-DataBaseDesign

The document outlines the mid-semester examination for the Database Design course at Birla Institute of Technology & Science, Pilani, detailing the structure and requirements of the exam. It includes questions related to designing databases for a hospital and a pizza company, as well as tasks involving SQL queries and normalization for a car manufacturing company. The exam emphasizes understanding of entities, attributes, relationships, and the application of database design principles.

Uploaded by

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

SampleMidSemQuestionPaper-DataBaseDesign

The document outlines the mid-semester examination for the Database Design course at Birla Institute of Technology & Science, Pilani, detailing the structure and requirements of the exam. It includes questions related to designing databases for a hospital and a pizza company, as well as tasks involving SQL queries and normalization for a car manufacturing company. The exam emphasizes understanding of entities, attributes, relationships, and the application of database design principles.

Uploaded by

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

Birla Institute of Technology & Science, Pilani

Work-Integrated Learning Programmes Division


HCL BSc (Design & Computing)

Mid Semester Examination

Course No. : BSDCHZC413


Course Title : DATABASE DESIGN
Nature of Exam : Closed Book
Weightage : 30%
Duration :
Date of Exam :

Note:
1. Please follow all the Instructions to Candidates given on the cover page of the answer book.
2. All parts of a question should be answered consecutively. Each answer should start from a fresh page.
3. Assumptions made if any, should be stated clearly at the beginning of your answer.

Answer ALL the questions

Question 1 Set A. (3+1+2+1 = 7 marks)


An hospital would like to hire you for designing their data base. They approach you with the
following details. The hospital details like name, address, branch name, doctors, facilities,
departments, and number of beds are stored. The information about doctors like name, id,
specialization, phone number (minimum 2) and available time for consultation are stored.
Patient’s records are maintained that stores information about the patient like name, Aadhar
number, address, phone number of patient, phone number of attender, date of visit, date of
next appointment (if applicable), cause of visit, medical history of patient like BP, Diabetes,
and other ailments, treatment plan, and tests. Many patients can be treated by a doctor. Patient
can meet a doctor for consultation and / or treatment. A patient can be treated by many
doctors. The hospital also maintains information about its facilities and infrastructure like
departments with data like department name, id, facilities, number of beds. Departments also
manage some facilities and oversee specific kinds of patients.
Perform the following tasks for the above-mentioned hospital management system capturing
all the entities, attributes, their relationships, degree, and cardinality of these relationships.
Underline the key attributes. Use appropriate symbols to represent the entities, attributes, and
relationships.
1. Draw the ER model with proper symbols and notations. (3 marks)
2. Identify the primary keys and foreign keys for each relation. (1 mark)
3. Identify the weak entities and strong entities. Justify your identification. (2 marks)
4. How will you represent medical history of patient like BP, Diabetes, and other
ailments (single valued, multi valued attribute or composite or derived attribute)?
Justify your answer. (1 mark)
Question 2 Set A (3+1+2+1 = 7 marks)
MII Pizza has many branches all over the world. They provide customized pizzas depending
on the topography and geography of the region. They want you to design their data base.
They have the following data: Branch data including branch name, location, country, and
varieties of pizzas available in that branch. Employees data including their name, phone
number, address, identification number, type of the employee, salary, and allowances. Sales
data that includes branch data, sales in that branch, employee’s data in the branch, home
delivery app(s) used for sales, total sales amount for a particular day. Employees are of type
chefs, salesmen, servers, housekeeping staff, managers and Research and development staff.
Chefs are specialized in making a particular type of pizza. Pizzas can be made using
automatic pizza machines, or hand made in traditional ovens. At least 3 types of pizza
varieties are available in each branch.
Perform the following tasks for the above-mentioned MII Pizza makers, capturing all the
entities, attributes, their relationships, degree, and cardinality of these relationships.
Underline the key attributes. Use appropriate symbols to represent the entities, attributes, and
relationships.
1. Give the relational schema for the given example. (3 marks)
2. Identify the primary keys and foreign keys for each relation. (1 mark)
3. Identify the weak entities and strong entities. Justify your identification. (2 marks)
4. How will you represent the employee attribute namely chef type (single valued, multi
valued attribute or composite or derived attribute)? Justify your answer. (1 mark)

Question 3 Set A (2+1+1+1+1+1+1=8 marks)


Consider the following relational schema for a Car manufacturing company
Employee (Eno number (5), Name varchar2 (30), Dob Date, Gender Char (2), Doj
Date, Designation varchar2 (30), Basic_pay number (6), Deptno varchar2 (5));
Department (Deptno varchar2 (5), Name varchar2 (30));
Skill-Set (Skill_code varchar2 (5), Description varchar2 (30), Charge_Outrage number
(3));
EMP_skill (Staffno number (5), Skill_code varchar2 (5));
Project (Projectno varchar2 (5), Pname varchar2 (5), Start_Date Date, End_Date Date,
Project_Manager_Staffno number (5));
Works-On (Staffno number (5), Projectno varchar2 (5), Date_Worked_On Date, Intime
Timestamp, Outtime Timestamp);
With the above relational schema for a car manufacturing company, perform the
following tasks:
1. Write DDL command to implement the above schema specifying appropriate data types
for each attribute and enforcing primary key, check constraints and foreign key
constraints. (3 marks)
2. Write a SQL query to list the departmentno and number of staff in each department. (1
mark)
3. Write a SQL query to list the details of staff who earn more than the AVG basic pay of
all staff. (1 mark)
4. Write a SQL query to list the details of staff who have more than 3 skills. (1 mark)
5. Write a SQL query to list the details of staff who have skills with a charge outrate
greater than 60 per hour. (1 mark)
6. Create a view that will keep track of the department number, department name, the
number of employees in the department and total basic pay expenditure for the
department. (1 mark)

Question 4 Set A (8 marks)


Consider the relation DBA_service with the schema DBA_service(DBAID, DBAName,
DBA-Phone- number, clientID, Project-no,Project-type)

DBAID DBAName DBA-Phone- number clientID Project- Project-type


No

D1001 Davis 9812345678 Client123 C100 MySQL


9887654321

D1002 Raju 8123456789 Client110 C101 Oracle


8198765432

D1003 Vijay 7612345678 Client112 C120 Access


7689765432

D1002 Kamal 91-9988776655 Client121 C156 NoSQL

D1001 Davis 8797675747 Client112 C1000 Access

1. Describe different types of anomalies that can arise for this table with the given
example records. (1 marks)
2. Identify the functional dependencies from the given table. (1 marks)
3. Is the table in 1st,2nd, and 3rd normal form? If not explain why for each normal form
and decompose the table to achieve up to 3rd normal form. (2+2+2 = 6 marks marks)

You might also like