logo

Crowdly

Browser

Add to Chrome

Relational Schema Employee  (EmployeeID, FirstName, LastName, Email, Phone, Hire...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Relational Schema

Employee (EmployeeID, FirstName, LastName, Email, Phone, HireDate, Salary, #DepartmentID)

Department (DepartmentID, DepartmentName, #ManagerID)

Project (ProjectID, ProjectName, StartDate, EndDate, Budget)

Employee_Project (#EmployeeID, #ProjectID, Role, AssignmentDate)

Explanation of Relationships:

  • Employee (EmployeeID) is the primary key.
  • Department (DepartmentID) is the primary key.
  • Project (ProjectID) is the primary key.
  • Employee_Project (#EmployeeID, #ProjectID) is a composite primary key (many-to-many relationship between Employee and Project).
  • Employee(#DepartmentID) REFERENCES Department(DepartmentID): An employee belongs to a department.
  • Department(#ManagerID) REFERENCES Employee(EmployeeID): A manager is an employee.
  • Employee_Project(#EmployeeID) REFERENCES Employee(EmployeeID)
  • Employee_Project(#ProjectID) REFERENCES Project(ProjectID)

QUESTION

Which query displays employees along with their department name?

A) SELECT * FROM Employee INNER JOIN Department;

B) SELECT Employee.FirstName, Employee.LastName, Department.DepartmentName FROM Employee JOIN Department ON Employee.DepartmentID = Department.DepartmentID;

C) SELECT FirstName, LastName FROM Employee, Department;

D) SELECT Employee.FirstName, Employee.LastName, Department.DepartmentName FROM Employee RIGHT JOIN Department;

More questions like this

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome