Professional Documents
Culture Documents
Dream Home Data Dictionary
Dream Home Data Dictionary
Relation schema
Branch (BranchNo, Street, Area, City, Postcode, TelephoneNo,
FaxNo, ManagerStaffNo, ManagerStartDate, BonusPayment,
CarAllowance)
Primary Key
BranchNo
Alternate Keys
TelephoneNo
FaxNo
Foreign Key
ManagerStaffNo references Staff (StaffNo) on delete SET NULL on
update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
BranchNo Uniquely 3 B followed by Yes
identifies variabl integer from 1-99
branch e
office charact
er
Street Street of 25 Yes
branch variabl
address e
charact
er
Enterprise constraints
None
Relation schema
Staff (StaffNo, FirstName, LastName, Address, TelephoneNo, Sex,
DateOfBirth, Position, Salary, DateJoined, NationalInsuranceNo,
TypingSpeed, BranchNo
Primary Key
StaffNo
Alternate Key
NationalInsuranceNo
Foreign Key
BranchNo references Branch (BranchNo) on delete NO ACTION on
update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
StaffNo Uniquely 5 S, followed by Yes
identifies a variabl letter denoting
member of e branch, followed
staff charact by number from
er 1-999
FirstName First name 20 Yes
of staff variabl
e
charact
er
LastName Last name 20 Yes
of staff variabl
e
charact
er
Enterprise constraints
None
Relation schema
NextOfKin (StaffNo, NextOfKinName, Relationship, Address,
TelephoneNo)
Primary Key
StaffNo, NextOfKinName
Foreign Key
StaffNo references Staff (StaffNo) on delete CASCADE on update
CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
StaffNo Staff 5 As for Staff Yes
member variabl (StaffNo)
who next of e
kin is charact
related to er
NextOfKin Full name 30 Yes
Name of next of variabl
kin e
charact
er
Relationshi Relationshi 20 No
p p of next of variabl
kin to staff e
charact
er
Enterprise constraints
None
Relation schema
AllocatedStaff (SuperviseeStaffNo, SupervisorStaffNo,
SecretaryStaffNo)
Primary Key
SuperviseeStaffNo
Foreign Key
SuperviseeStaffNo references Staff (StaffNo) on delete CASCADE
on update CASCADE
SupervisorStaffNo references Staff (StaffNo) on delete SET NULL
on update CASCADE
SecretaryStaffNo references Staff (StaffNo) on delete SET NULL on
update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
Supervisee Staff 5 As for Staff Yes
StaffNo number of variabl (StaffNo)
supervisee e
charact
er
Supervisor Staff 5 As for Staff Yes
StaffNo number of variabl (StaffNo)
supervisor e
charact
er
SecretarySt Staff 5 As for Staff Yes
affNo number of variabl (StaffNo)
secretary to e
workgroup charact
er
Relation schema
PropertyForRent (PropertyNo, Street, Area, City, Postcode, Type,
Rooms, Rent, PrivateOwnerNo, BusinessOwnerNo, StaffNo,
BranchNo, Picture, Comments, Withdrawn, DeleteRecord)
Primary Key
PropertyNo
Foreign Keys
OwnerNo references PrivateOwner (OwnerNo) and BusinessOwner
(OwnerNo) on delete NO ACTION on update CASCADE
StaffNo references Staff (StaffNo) on delete SET NULL on update
CASCADE
BranchNo references Branch (BranchNo) on delete SET DEFAULT
on update CASCADE
Attributes
Name Description
Data Domain Requi Defa
type characteristics red ult
and valu
length e
PropertyNo Unique 5 P, followed by Yes
identifier for variabl letter indicating
a property e city, followed by
charac number from 1-
ter 999
Street Street of 25 Yes
property variabl
address e
charac
ter
Enterprise constraints
A member of staff may supervise a maximum of ten properties for
rent at any one time.
The monthly rent for a property should be reviewed annually
Property records are kept for at least three years after being
withdrawn from rental and may then be deleted
Notes
Attributes marked with * have been added to those listed in textbook
Relation schema
PrivateOwner (PrivateOwnerNo, FirstName, LastName, Address,
TelephoneNo)
Primary Key
PrivateOwnerNo
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
PrivateOw Uniquely 5 CO followed by Yes
nerNo identifies a variabl number from 1-
private e 999
owner charact
er
FirstName First name 20 Yes
of owner variabl
e
charact
er
LastName Last name 20 Yes
of owner variabl
e
charact
er
Address Full address 50 Yes
of owner variabl
e
charact
er
Enterprise constraints
None
Relation schema
BusinessOwner (BusinessOwnerNo, BusinessName, BusinessType,
Address, TelephoneNo, ContactName)
Primary Key
BusinessOwnerNo
Alternate Key
TelephoneNo
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
BusinessO Uniquely 5 CB followed by Yes
wnerNo identifies a variabl number from 1-
business e 999
owner charact
er
BusinessNa Name of 30 Yes
me business variabl
e
charact
er
BusinessTy Type of 20 Yes
pe business variabl
e
charact
er
Address Full address 50 Yes
of business variabl
e
charact
er
Enterprise constraints
None
Relation schema
LeaseAgreement (LeaseNo, RenterNo, PropertyNo, PaymentMethod,
Rent, DepositAmount, DepositPaid, RentStart, RentFinish)
Primary Key
LeaseNo
Alternate Key
PropertyNo, RentStart
Foreign Keys
RenterNo references Renter (RenterNo) on delete NO ACTION on
update CASCADE
PropertyNo references PropertyForRent (PropertyNo) on delete NO
ACTION on update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
LeaseNo Uniquely 8 L followed by Yes
identifies variabl letter denoting
lease e branch city
charact followed by
er number from 1-
99999
RenterNo Renter 5 As for Renter Yes
number of variabl (RenterNo)
renter e
involved in charact
lease er
Enterprise constraints
The length of a lease is from 3 to 12 months
The deposit amount is twice the monthly rent
Relation schema
Renter (RenterNo, FirstName, LastName, Address, TelephoneNo,
PreferredType, MaximumRent, BranchNo)
Primary Key
RenterNo
Foreign Key
BranchNo references Branch (BranchNo) on delete NO ACTION on
update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
RenterNo Uniquely 5 CR followed by a Yes
identifes a variabl number from 1-
renter e 999
charact
er
FirstName First name 20 Yes
of renter variabl
e
charact
er
LastName Last name 20 Yes
of renter variabl
e
charact
er
Enterprise constraints
None
Relation schema
Viewing (PropertyNo, RenterNo, DateViewed, Comments)
Primary Key
PropertyNo, RenterNo, DateViewed
Foreign Key
PropertyNo references PropertyForRent (PropertyNo) on delete
CASCADE on update CASCADE
RenterNo references Renter (RenterNo) on delete CASCADE on
update CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
PropertyNo Property 5 As for Yes
number of variabl PropertyForRent
property e (PropertyNo)
viewed charact
er
RenterNo Renter 5 As for Renter Yes
number of variabl (RenterNo)
client e
involved in charact
viewing er
DateViewe Date the Date Yes
d property
was viewed
Comments Client's 50 No
comments variabl
on property e
charact
er
Relation schema
Inspection (PropertyNo, StaffNo, DateInspected, Comments)
Primary Key
PropertyNo, StaffNo
Foreign Key
PropertyNo references PropertyForRent (PropertyNo) on delete
CASCADE on update CASCADE
StaffNo references Staff (StaffNo) on delete SET NULL on update
CASCADE
Attributes
Name Description Data Domain Requi Defa
type characteristics red ult
and valu
length e
PropertyNo Property 5 As for Yes
number of variabl PropertyForRent
property e (PropertyNo)
inspected charact
er
StaffNo Staff 5 As for Staff Yes
number of variabl (StaffNo)
staff e
member charact
who er
inspected
property
DateInspec Date Date Yes
ted property
was
inspected
Enterprise constraints
Properties should be inspected at least once over a six month
period.