100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COMPUTER SCIENCE 378: INTRODUCTION TO DATABASE MANAGEMENT SAMPLE EXAMINATION NEW EXAM ACTUAL EXAM QUESTIONS AND ANSWERS COMPLETE MATERIAL GUIDE 100% ATHABASCA UNIVERSITY

Rating
-
Sold
-
Pages
10
Grade
A+
Uploaded on
24-04-2023
Written in
2022/2023

COMPUTER SCIENCE 378: INTRODUCTION TO DATABASE MANAGEMENT SAMPLE EXAMINATION NEW EXAM ACTUAL EXAM QUESTIONS AND ANSWERS COMPLETE MATERIAL GUIDE 100% ATHABASCA UNIVERSITY You will have 2 hoursto complete a similar closed-book examination. Question 1 A real estate company uses a database to store information about customers, property, andcontracts. The following relations are used in the database: Customer: Customer number (unique), name, mailing address, Balance, lawyer name, Discount. Contract: Customer number (unique), Agent number (unique), Property_ID (one per contract), Date ofcontract, Property addresses, Property value, Type, Number of rooms, Land size, Built size, Tax value) The following functional dependencies apply. customer_no name customer_no mail_address customer_no balance customer_no lawyer_name customer_no discount {customer_no, Agent_no} property_id {customer_no, Agent_no} date_contract property_id property_address property_id value property_id type property_id number_rooms property_id land_size This study source was downloaded by from CourseH on :09:09 GMT -05:00 balance lawyer_name discount property_id built_size property_id tax_value Transform these relations into 3NF (please use only the attributes described above, and do not add anynew attributes). Answer: Tables in 3NF will be as follows: • Normalization is the process of reducing duplication of data and ensurereferential integrity. • In third normal form there is no transitive dependency. • Here property Id transitively depends customer and contract, So avoid dependency we separate the tables into 3. Customer Property property_i property_addres valu typ number_room land_siz built_siz tax_valu d s e e s e e e Contract Customer_no name mail_address This study source was downloaded by from CourseH on :09:09 GMT -05:00 MAINTENANCE Create flight ( ) FLIGHTS Create maint ( ) Main_Id: Intg (PK) Plane_Id: Intg (FK) Tech_Id: Intg (FK) Main_type: string Main_date: date Customer_no Agent_no property_id Date_contarct Question 2 Draw a class diagram for the following situation. An airline company has a number of planes. The attributes of a plane include plane_id (unique), name, and vendor. The airline company serves many destinations. The attributes of a destination include destination_id (unique), name, and flight_date. Each plane flies to one or more destinations; or it may beused as back-up; or it may be under maintenance, and therefore will not fly to any destination. For each plane undergoing maintenance, the company records the name of the technician and the type of maintenance performed. A destination may be served by one or more planes. Each plane’s service charges vary by the number of destinations the plane serves. The airline company maintains records of the service charges for each plane when it flies to a certain destination. At the end of each year, the airline company applies a depreciation percentage to each plane. The airline company calculates each plane’s percent depreciation based on the amount of service charges and the total hours of flying for that plane. Plane_Id: Intg (FK) Destination_Id: Intg (FK)Flight_date: date Flight_hour: date Flight_catagory: string Service_charge: float PLANE Plane_Id: Intg (PK) Name: char Vendor: char Add new plane ( ) DESTINATION Destination_Id: Intg (PK) Name: char Flight_date: Date Add new destination ( ) TECHNICIAN Tech_Id: Intg (PK) Name: string Add tech ( ) DEPRECIATION Plane_Id: Intg (PK) Year: date Service_charge: string Hour: date Depreciation_amount: float Calculate dep ( ) This study source was downloaded by from CourseH on :09:09 GMT -05:00 Question 3 Consider the following three relations: Manager(name, address,specialization, salary)Employee(name, address, rank, salary) Project (proj_num, emp_name, manager_name, duration) Write the SQL queries corresponding to the following questions. a. Find the number of different employees who are assigned to projects. b. Find the managers’ average salary. c. List the name and number of projects supervised by each manager. d. Show the names and salaries of managers who supervise employees of rank “beginner" in ascendingorder of salary (use a subquery). e. Show the names and salaries of managers who supervise employees of rank “beginner" in descendingorder of salary (do not use a subquery). f. Show the names and salaries of supervisors who supervise more than 20 employees. Answer: A. SELECT COUNT(DISTINCT ) "No of Employees"FROM employee e,project p WHERE =_name; -- Avg will display only Average Salary of All Mangers B. SELECT AVG(salary)FROM manager; -- Wrote sub query to get count of Projects by Managers C. SELECT NAME,COUNT(*) FROM (SELECT ,_numFROM manager m,project p WHERE = er_name GROUP BY ,_num) a GROUP BY NAME; -- Wrote sub Query for Get Employee who are beginner and clubed into Managers in Project D. SELECT DISTINCT ,yFROM manager m,project p WHERE = er_name AND _name IN (SELECT NAME FROM employeeWHERE rank='beginner') GROUP BY ,_num; -- Direct Query for Get Employee who are beginner and clubed into Mangers in Project E. SELECT DISTINCT This study source was downloaded by from CourseH on :09:09 GMT -05:00 ,y FROM manager m,project p,employee WHERE = er_name AND _name =e.NAME AND ='beginner'GROUP BY ,_num; -- Wrote sub Query for Get Employee count and clubed in manager and checking for havingcount>20 Continues...

Show more Read less
Institution
COMPUTER SCIENCE 378:
Course
COMPUTER SCIENCE 378:









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
COMPUTER SCIENCE 378:
Course
COMPUTER SCIENCE 378:

Document information

Uploaded on
April 24, 2023
Number of pages
10
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • examination new exam

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Accurate Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
467
Member since
3 year
Number of followers
267
Documents
10609
Last sold
1 week ago
Accurate Solutions

Discover high-quality study materials crafted for students across various subjects, including Nursing, Mathematics, Psychology, and Biology. Our resources feature comprehensive guides, updated exam solutions, and reliable notes designed to enhance your learning experience. Achieve your academic goals with materials that inspire confidence. #Don't Forget To Leave A Great Review!

4.1

68 reviews

5
38
4
13
3
8
2
2
1
7

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions