Design a database schema with the following specifications Employee (SSN, Fname, LName, Sex, Address, DOB, Salary) Department (DeptNum, Location,
View the step-by-step solution to:

Question

Design a database schema with the following specifications

• Employee (SSN, Fname, LName, Sex, Address,

DOB, Salary) • Department (DeptNum, Location, DeptName) • Project (PrjName, Number, Location) • Dependents (DName, Sex, DOB, Relationship) Identify any extra attribute that you have to declare in the tables to create the following associations: • Employee-Project • Employee-Department • Employee-Dependent • Department-Project

Insert at least 4 records in each table and show the following: a) What happens if you try to associate an employee with the department table if the employee does not exist?

b) What happens if you try to delete an employee record if it is associated with several other tables such as Department or Dependents?

c) Run a command to order records in the Department table in descending order based on attribute DeptName.

d) Identify the weak entity in this database schema. Mention what changes you made in the table to associate it with any other entities.

e) Run separate queries to show results of full outer join and inner join on Employee and Dependents table. (Hint: to see expected results ensure that some employees don't have dependents

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes