Question
A rental company has hired you to check out their apartment rental database. The database includes the following three relationships: tenant, building and lease. The
A rental company has hired you to check out their apartment rental database. The database includes the following three relationships: tenant, building and lease. The attributes and constraints of these relationships are defined as follows:
Relations definitions : Primary keys and Foreign keys (undelined) and other contraints :
The LocID and LocName attributes in the Bailrelationship refer to the Id and Name attributes in the Locataire relationship. The Bail Address attribute refers to the attribute of the same name of the Immeuble entity.
The following tables show the information on the rentals recorded in the database.
Answer following questions with information above :
Q1 : Does all relations have adequate primary keys, i.e., that use the minimum set of attributes needed to ensure uniqueness of tuples? If not, explain and correct the primary keys.
Q2 : Are reference constraints (foreign keys) respected? Explain your answer.
Q3 Are null values, entity constraints and domain constraints respected? Justify your answer.
Locataire {id: INTEGER, Nom : CHARVAR, DateNaissance : DATE, NumTelephone : k CHARVAR} Immeuble {Appartement : INTEGER, Adresse : CHARVAR, Nbrpieces: INTEGER, NbrToilettes: INTEGER} Bail {IdLoc: INTEGER, NomLoc :CHARVAR, Adresse: CHARVAR, Prix: INTEGER, Datedebut: DATE, DateFin: DATE} wwwww
Step by Step Solution
There are 3 Steps involved in it
Step: 1
a SELECT apartmentANumapartmentBuildingNumapartmentFloorNum FROM apartment WHERE Availableyes b SELE...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started