Question 4 (Marks: 20) Scenario: A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company. Q.4.1 Draw an ER diagram that captures this information and/ or showcase your answer (15) using table names and relationships. Q.4.2 Explain the difference between a weak and a strong entity set. (5)
Added by Pedro S.
Close
Step 1
We have three entities: Employees, Departments, and Children. - Employees are identified by their social security number (ssn) and have attributes salary and phone. - Departments are identified by their department number (dno) and have attributes department name Show more…
Show all steps
Your feedback will help us improve your experience
Supreeta N and 95 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
Design an ER diagram for a company database: The company consists of many departments, and each department has a unique name, a location, a manager, and lots of employees. Each employee works for one specific department, and each employee has a unique id, a name, a position, and a salary. A department manager is also an employee, and an employee can lead at most one department. A project is hosted by one department (referred to as the host department), and other departments can collaborate on the same project (referred to as collaborating departments). Each project has a unique project number, a start date, and a deadline. Besides, the company has also set up several interest groups for many employees to join, and we keep track of the date when each employee joins it. Each interest group has a unique name, a capacity, and a single team leader who is also an employee. Each employee can join no or many interest groups but can lead at most one. Each interest group organizes several events. We keep track of the event location and event date for each event. Events from different interest groups may be conducted on the same day and at the same location. Draw the ER diagram and state any assumptions you make. But you should not add extra entities, attributes, or relationships beyond the above description.
Supreeta N.
Write the following queries in relational algebra, using the university schema. a. Find the titles of courses in the Comp. Sci. department that have 3 credits. b. Find the IDs of all students who were taught by an instructor named Einstein; make sure there are no duplicates in the result. c. Find the highest salary of any instructor. d. Find all instructors earning the highest salary (there may be more than one with the same salary). e. Find the enrollment of each section that was offered in Autumn 2009. f. Find the maximum enrollment, across all sections, in Autumn 2009. g. Find the sections that had the maximum enrollment in Autumn 2009.
Sri K.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD