Consider the following database schema, where primary keys are underlined.
EMPLOYEE(EmployeeID, FirstName, LastName, DepartmentID, Salary, HireDate)
DEPARTMENT(DepartmentID, DepartmentName)
PROJECT(ProjectID, ProjectName, StartDate, EndDate, DepartmentID)
Specify the following queries on this database schema.
a. Write SQL queries to create three tables in the database with primary key, foreign key, and referential integrity.
b. Write both SQL and relational algebra query to retrieve first name and last name of all employees along with their department names.
c. Write SQL query to count the number of employees in each department.
How do you convert ER diagram to relations? Explain 1NF and 3NF with suitable examples.
Why do you need concurrency control in databases? Explain lost update problem, unrepeatable read problem, and incorrect summary problem with example.
Attempt any Eight questions
[8x5=40]List characteristics of database approach. What are the advantages of using database approach?
Define datamodel. What are different categories of datamodels?
Explain three schema architecture in detail. What do you mean by data independence?
Draw an ER diagram for a hotel reservation system including rooms, guests, and bookings.
Define specialization. Explain constraints and characteristics of specialization and generalization.
Define the terms domain, attribute, tuple, and relation. What is entity integrity constraint?
Explain desirable properties of transactions.
Explain two-phase locking technique. What is lock conversion in this technique?
What is write ahead logging in database recovery? What is checkpoint?