Professional Documents
Culture Documents
Yonki Real State Flats : Flat - Id Persons
Yonki Real State Flats : Flat - Id Persons
- * = relationship
between mother table
and daughter tables
(foreign key)
YONKI REAL
STATE
*flats* : flat_id Every person has an ID
related to a name and
*persons* : phone number, later this
person_id persons are divided in
different categories where
FLATS PERSONS they get another ID
besides their person_id to
flat_id : int (pk) person_id : int (pk) be sorted in different
tables.
adress : varchar(45) name : varchar(45)
area : int phone_number :
string
num_rooms : int
References
price : large int
Characteristics the towns
table *town* : town_id the flats
references a are
flat ID in *zone* : zone_id located at CUSTOMERS OWNERS AGENTS
order to *characteristics*
attach the *person* : person_id *person* : person_id *person* : person_id
properties of *owner* : owner_id
customer_id : int (pk) owner_id : int (pk) agent_id : int (pk)
each flat to
it's primary NIF : string adress : varchar(45) ss_number : string
key.
adress : varchar (45) NIF : string salary : int
*owned_flat/s* : adress : varchar (45)
flat_id : int
CHARACTERISTICS TOWN
VISITS