Answer To: First, download the datacode of the exam and create the ERD using "Reverse Engineering", then answer...
Nandini answered on Mar 11 2022
Solution No. 1
ERD to Normalized Relational Model Conversion
Employee Table:
EmployeeID
EmployeeFirstName
EmployeeLastName
SuperviseID
Course Table:
CourseID
CourseTitle
EmployeeID
MySql Query:
Create Database Employee_Info;
use EMPLOYEE_INFO;
CREATE TABLE Employee
(
EmployeeID int primary key not null,
EmployeeFirstName varchar(255),
EmployeeLastName varchar(255),
SuperviseID int
);
CREATE TABLE Course
(
CourseID int primary key not null,
CourseTitle varchar(255),
EmployeeID int,
FOREIGN KEY (EmployeeID) REFERENCES Employee (EmployeeID)
);
use EMPLOYEE_INFO;
insert into employee values(1,'John','Mathew', 1);
insert into employee values(2,'Jade','Mathew', 2);
insert into employee values(3,'Tommy','Parker', 2);
insert into employee values(4,'Peter','Hope', 1);
insert into employee values(5,'Donas','James', 1);
insert into Course values(1,'Data Structure', 1);
insert into Course values(2,'DataBase', 1);
insert into Course values(3,'Artificial Intelligence', 2);
insert into Course values(4,'C Programming', 3);
insert into Course values(5,'Java', 4);
Solution No. 2
Solution No. 3
-- a) the most populated city in each country.
SELECT country.Name, city.Name, MAX(city.population) FROM city
LEFT JOIN country
ON city.CountryCode = country.Code...