Download DBMS_Assignment-II

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Relational model wikipedia , lookup

Database model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Transcript
To become a Centre of Excellence in Teaching and Research in the field of Computer Science and Engineering.
KALASALINGAM UNIVERSITY
(Kalasalingam Academy of Research and Education)
Anand Nagar , Krishnan Kovil
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Assignment No. 2
Database Management System / CSE212
Prepared By
Dr.K.Kartheeban M.E., PhD
To prepare the students for a prospective career in IT industry and for higher learning by imparting sound technical
knowledge. To carry out research in cutting edge technologies in computer engineering to meet the requirement of
the industry and society.
To become a Centre of Excellence in Teaching and Research in the field of Computer Science and Engineering.
KALASALINGAM UNIVERSITY
(Kalasalingam Academy of Research and Education)
Anandnagar, Krishnankoil – 626 126
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Assignment Questions
Code/Course
: Database Management System/CSE212
Course Teacher
: Dr.K.Kartheeban M.E., PhD
Academic Year
: 2014 - 2015 (EVEN)
Submission Date : 23.02.2015
Blooms
Taxonomy
Action Verbs
Definitions
Remember
Remember previously learned information
Understand
Demonstrate an understanding of the facts.
Apply
Apply knowledge to actual situations
Analyze
Break down objects or ideas into simpler parts and find
evidence to support generalizations
Create
Compile component ideas into a new whole or propose
alternative solutions
Evaluate
Make and defend judgments based on internal evidence or
external criteria.
To prepare the students for a prospective career in IT industry and for higher learning by imparting sound technical
knowledge. To carry out research in cutting edge technologies in computer engineering to meet the requirement of
the industry and society.
To become a Centre of Excellence in Teaching and Research in the field of Computer Science and Engineering.
Course Outcomes:
Course
Description
Outcomes
CO1
Describe a relational database and object-oriented database.
CO2
Create, maintain and manipulate a relational database using SQL
CO3
Describe ER model and normalization for database design.
CO4
Examine issues in data storage and query processing and can
formulate appropriate solutions.
Understand the role and issues in management of data such as
CO5
efficiency, privacy, security, ethical responsibility, and strategic
advantage.
CO6
Design and build database system for a given real world problem.
1.
(30%) [Analyze] Consider the following information about a university database: (CO3)

Professors have an SSN, a name, an age, a rank, and a research specialty.

Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date, and a
budget. Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or
Ph.D.). Each project is managed by one professor (known as the project’s principal investigator).

Each project is worked on by one or more professors (known as the project’s co-investigators).

Professors can manage and/or work on multiple projects.

Each project is worked on by one or more graduate students (known as the project’s research
assistants).

When graduate students work on a project, a professor must supervise their work on the project.
Graduate students can work on multiple projects, in which case they will have a (potentially
different) supervisor for each one. Departments have a department number, a department name,
and a main office.
To prepare the students for a prospective career in IT industry and for higher learning by imparting sound technical
knowledge. To carry out research in cutting edge technologies in computer engineering to meet the requirement of
the industry and society.
To become a Centre of Excellence in Teaching and Research in the field of Computer Science and Engineering.




Departments have a professor (known as the chairman) who runs the department.
Professors work in one or more departments, and for each department that they work in, a time
percentage is associated with their job.
Graduate students have one major department in which they are working on their degree.
Each graduate student has another, more senior graduate student (known as a student advisor)
who advises him or her on what courses to take.
Design and draw an ER diagram that captures the information about the university. Use only the basic ER
model here; that is, entities, relationships, and attributes. Be sure to indicate any key and participation
constraints.
(20%) [Analyze]
2.
Notown Records has decided to store information about musicians who
perform on its albums (as well as other company data) in a database. The company has wisely
chosen to hire you as a database designer (at your usual consulting fee of $2500/day). (CO3)

Each musician that records at Notown has an SSN, a name, an address, and a phone number.
Poorly paid musicians often share the same address, and no address has more than one phone.

Each instrument used in songs recorded at Notown has a unique identification number, a name
(e.g., guitar, synthesizer, flute) and a musical key (e.g., C, B-flat, E-flat).

Each album recorded on the Notown label has a unique identification number, a title, a copyright
date, a format (e.g., CD or MC), and an album identifier.



Each song recorded at Notown has a title and an author.
Each musician may play several instruments, and a given instrument may be played by several
musicians.
Each album has a number of songs on it, but no song may appear on more than one album.

Each song is performed by one or more musicians, and a musician may perform a number of
songs.

Each album has exactly one musician who acts as its producer. A musician may produce several
albums, of course.
To prepare the students for a prospective career in IT industry and for higher learning by imparting sound technical
knowledge. To carry out research in cutting edge technologies in computer engineering to meet the requirement of
the industry and society.
To become a Centre of Excellence in Teaching and Research in the field of Computer Science and Engineering.
3. (20%) [Create] Consider the insurance database where the primary keys are un-derlined.
Construct the following SQL queries for this relational database. (CO4)
a. Find the total number of people who owned cars that were involved in accidents in 1989.
b. Find the number of accidents in which the cars belonging to“John Smith” were involved.
c. Add a new accident to the database; assume any values for required at-tributes.
d. Delete the Mazda belonging to “John Smith”.
e. Update the damage amount for the car with license number“AABB2000” in the accident
with report number “ AR2197” to $3000.
4. (10%)
[Apply] Given the following relation and example data: (CO3)
PartNumber Description
Supplier
SupplierAddress Price
10010
20 GB Disk
Seagate
Cuppertino, CA
$100
10010
20 GB Disk
IBM
Armonk, NY
$90
10220
256 MB RAM card Kensington
San Mateo, CA
$220
10220
256 MB RAM card IBM
Armonk, NY
$290
10220
256 MB RAM card Sun Microsystems Palo Alto, CA
$310
10440
17" LCD Monitor
$2,100
IBM
Armonk, NY
List the functional dependencies and normalize this relation into BCNF.
5. (10%) [Understand] Answer the following questions about data on external storage in a DBMS:
(CO4)
1. Why does a DBMS store data on external storage?
2. Why are I/O costs important in a DBMS?
3. What is a record id? Given a record’s id, how many I/Os are needed to fetch it into main memory?
4. (10%) [Understand] What is the role of the buffer manager in a DBMS? What is the role of the disk
space manager? How do these layers interact with the file and access methods. (CO4)
To prepare the students for a prospective career in IT industry and for higher learning by imparting sound technical
knowledge. To carry out research in cutting edge technologies in computer engineering to meet the requirement of
the industry and society.