Suppose a database has the following three relations.
Museum (mid: integer, name: string, address: string, website:
string)
Displays (museumID: integer, artID: integer, startDate: date)
ArtItem (aid: integer, title: string, weightPnd: integer, type:
string)
Artist (pid: integer, firstname: string, lastname: string,
birthdate: date, deathdate: date)
Creates (artistID: integer, artID: integer, year: integer)
(The "bit" data type stores 0 or 1. False or true. Booleans.)
"museumID" in Displays is a foreign key referencing "mid" in
Museum.
"artistID" in Creates is a foreign key referencing "pid" in Artist.
("pid" for person identifier)
"artID" in Displays and Creates are foreign keys referencing "aid"
in ArtItem.
You may assume simple boolean comparisons work on dates.
Write the following queries in relational algebra.
If you have any doubts, please give me comment...
Find the first and last names of artists that created an art item titled "Mona Lisa" and also an art item titled "Vitruvian Man".
Find the names and addresses of museums that display art item(s) by an artist with last name "Michelangelo".
Suppose a database has the following three relations. Museum (mid: integer, name: string, address: string, website:...
Suppose a database has the following three relations. Movie (mid: integer, title: string, director: string, releaseDate: date) PlaysAt (theaterID: integer, movieId: integer, showDate: date) Theater (tID: integer, name: string, phone: string, screencount: integer) "movieID" in PlaysAt is a foreign key referencing "mid" in Movie. "theaterID" in PLaysAt is a foreign key referencing "tID" in Theater. Write the following queries in both relational algebra and SQL. Find the titles of movies playing on 2 / 26 / 2019 and the IDs...
Write the following query in SQL Suppose a database has the following three relations Movie (mid: integer, title: string, director: string, relcaseDate: date) PlaysAt (theaterID: integer. movieId:integer. showDate: date) Theater (tID: integer, name: string, phone: string, screencount: integer) movielD" in PlaysAt is a foreign key referencing "mid" in Movie. "theaterlD" in PLaysAt is a foreign key referencing "tID" in Theater.
Consider the following relations: Patient (pid: integer, lname: string, fname: string, primary_did: integer, age: integer) Doctor (did: integer, lname: string, fname: string, deptid: integer, age: integer, salary: integer) Nurse (nid: integer, lname: string, fname: string, deptid: integer, rank: string, age: integer) Department (deptid: integer, name: string, budget: integer) Menu (menuid: integer, pid: integer, caloriecount: integer, saltlevel: integer, vegetarian: bit, diabetic: bit, nauseaSafe: bit, notes: string) Vaccination (vaccinationid: integer, pid: integer, vaccinationname: string, dategiven: date, dateexpires: date) Prescription (presid: integer, pid:integer,...