jeudi 26 mars 2015

Normalization for three somehow identical tables


These three tables are nearly identical. But, there are some exceptions.


But, I can't find best normalized structure. Could you please help me?


Here is the informations must be hold in database:



1) APARTMENTS
CITY_ID
VILLAGE_ID
STREET_NAME
BUILDING
APARTMENT
LIVING_SPACE
ELECTRIC_SUBSCRIBER_NUMBER
GAS_SUBSCRIBER_NUMBER
WATER_SUBSCRIBER_NUMBER

2) GARDENES
CITY_ID
VILLAGE_ID
STREET_NAME
BUILDING

LIVING_SPACE
ELECTRIC_SUBSCRIBER_NUMBER
GAS_SUBSCRIBER_NUMBER
WATER_SUBSCRIBER_NUMBER

TOTAL_GARDEN_SPACE

3) PLOT_OF_LAND
CITY_ID
VILLAGE_ID
STREET_NAME
BUILDING
LAND_SPACE


What is the best structure for this tables?


Yet, I have made two structures:


FIRST ONE:


enter image description here


But, it seems not the best to me. So, i have made second choice:

SECOND ONE:

May be I must make on table with the name POSSESSİONS? And inside this:



POSSESSIONS
ID
TYPE (1-APARTMENT, 2-GARDEN, 3-PLOT_OF_LAND)
SUBSCRIBER_ID
ADDRESS_ID

LIVING_SPACE
TOTAL_GARDEN_SPACE
LAND_SPACE


What is your recomendations?





Aucun commentaire:

Enregistrer un commentaire