Você está na página 1de 3

Unit I

A University has many departments such as academics, sports, admin etc. Data regarding all their
operations has to be recorded by every department on day to day basis.

Course registration form of student as maintained by Academics Department:-

Roll No: 15BCE1001 BranchId:VEL01


Name: ANJUM Course 1:PHYSICS
10th marks: 1125 Course 2:CHEMISTRY
12th marks:978 Course 3:MATHS
Year:I Faculty 1:HEPSIBA
Sem:I Faculty 2:SHEENA
School:SCSE Faculty 3:MARY
Extra-curricular activity- student Registration form as maintained by the Sports department:-

Roll No: 14BCE1500 Branch Id:CHEN01


Name: STEPHEN GEORGE
Sport id:HJ001
Faculty id: V003
Date_Of_Join:14/03/2014
Show the database design when it is implemented using the traditional file based approach and
DBMS.

Which model is suitable for the above scenario? Justify your answer with pros and cons.

UNIT 2

Draw an ER diagram that models a towns Public Works Department.


Each employee has a name, phone, address, city, state, and zip. There are both regular and temporary
employees. For regular employees, we keep track of their date hired and yearly salary. For temporary
employees, we keep track of the length of their current contract and their hourly wage. We keep track
of each job that the employee of the Public Works Department does. We keep track of the date a job
starts, the date a job finished, and the location of the job. We also keep track of which employees have
been assigned to the job. An employee can be assigned to many jobs, and each job can have many
employees assigned to it. We also keep track of the supervisor of each job. A supervisor must be a
regular employee. Not all regular employees have been supervisors. A regular employee can supervise
many jobs. Each job has exactly one supervisor. We also keep track of the residents of the town we
keep track of their names and addresses. We keep track of the complaints that residents make about
the jobs. Not all residents make complaints, but some make many complaints. Not all jobs generate
complaints, but some generate many complaints. For each complaint, we keep track of the date and
the content of the complaint.

Map the given ER diagram to a relational model and state the steps in the mapping process.

UNIT 3

1. Consider the following relational schema:


Stud_Course_Lec({StudentId, CourseId, LecturerId, Grade}

Identify the set of Functional Dependencies.

What is the primary key of the relation schema Stud_Course_Lec?

Identify which normal form it satisfies.

Identify which normal form it does not satisfy. Normalise the relation to that normal form.

2. The relation below shows the details of patient surgery appointments with cosmetology doctors.
Answer the questions (i) and (ii) with respect to this relation.

The relation is susceptible to different anomalies. Illustrate them based on the above example.

Determine when a relation will be in 1NF, 2NF, 3NF and derive the Normal forms for the above
relation.

UNIT IV

1. Using the given schema for the relation Employee write corresponding SQL queries.
EMPOLYEE(EMPID,FNAME,LNAME,EMAIL,PHONE,HIRE_DATE,JOB_ID,
SALARY,COMMISSION_PCT,MANAGER_ID,DEPT_ID )
A) The HR department needs to display the last name and salary for any employee whose
salary is not in the range of $5,000 to $12,000.

B) Create a report to display the last name, job ID, and start date for the employees with the last
names of Matos and Taylor. Order the query in ascending order by start date.

2. A professional body conducts sports competitions annually under different categories and award
prizes to the winners. Assume that there are 1000 participants, 20 categories and 10 Gold award
winners out of 100 winners. The database of the professional body consists of the following
relations.
Participants (pno, name, address , telephone, email);

Categories (code , category_name, description );

Winners (pno , code ,year, award);

The SQL query to retrieve all Gold award winners with each winners name, category and year is
given below.

SELECT name, category_name, year FROM Participants p, Categories c, Winners w, WHERE


p.pno=w.pno and c.code=w.code and award=Gold

(a) Write the equivalent relation algebraic relation. (2)

(b) Draw the canonical form of the Query. (2)

(c) Apply heuristic optimization to optimize the query and draw the optimized query tree for the
query.(6)

UNIT V

A Doctor wishes to search the records of patients according to their patient number. Suggest a non-
linear index structure to retrieve a patient record in the shortest possible time.

The index structure for the above problem may store 4 Patient numbers in the leaf node and 2
patient numbers in the other nodes.

Show how the index will be constructed for the following list of patient numbers:-

P005,P001,P006,P100,P099,P098,P099,P050,P055,P054,P053,P003,P002.

Show how the index structure changes when the following patient numbers are deleted from the
above structure that you have got:-

P001, P006, P098,P099.

Você também pode gostar