Welcome Guest, Not a member yet? Register   Sign In
Real estate Database
#1

(This post was last modified: 11-06-2015, 12:37 AM by sebastianvirlan.)

Hi, I am making a real estate website in CI. Witch database should I choose?


[Image: MRrFo.png]

and

[Image: YRzdl.png]
Reply
#2

Sorry, I do not know what the table names mean, so cannot add any context.

Your table structure should reflect the aims of the information requirements. So what questions will your users want to answer, and can your table structure deliver the answers in an efficient way.

But nice diagrams!

Paul.
Reply
#3

I think the language is in german? or latin?

Well my advice is you can use MySQL WorkBench or Navicat for designing your own Data Model.
Because designing it yourself versus getting it from somewhere else is better, because you can customize it depending on your need.
Reply
#4

@PaulD. I said in title that the database is a Real Estate one. So the table names are pretty intuitive.

proprietati -> proprietes
zone -> zone
strazi -> streets
proprietari -> owners
agents -> agents
tip_proprietati -> property type


Foreign keys:

proprietati.adaugat_de -> agenti.id_agent
proprietati.id_proprietar -> proprietari.id_proprietar
proprietati.id_tip_proprietate -> tip_proprietate.id_tip_proprietate
proprietati.id_zona -> zone.id_zona
zone.id_zona -> strazi.id_zona
strazi.id_strada -> adrese.id_strada


@solidcodes The language is romanian and the pictures are print screen from Navicat, if you used you may recognise the layout.
Reply
#5

(This post was last modified: 11-09-2015, 04:43 AM by sintakonte.)

i think this table names are not really intuitive especially with your illustration
i would prefer your first attempt because we don't have to much to fix here Wink

your proprietati table need an adress id not an zone id because if you just know the zone you don't know which address it is
take zone -> strazi -> adrese and in proprietati make an id_adresa as relational field

the other thing which comes to mind is your strazi table; if you use one extra table for streets - you should think about a junction table between streets and zones because if your db grows you avoid duplicate street names

i don't understand the 2nd attempt at all - to much duplication
Reply
#6

(This post was last modified: 12-07-2015, 07:26 AM by sebastianvirlan.)

(11-09-2015, 04:41 AM)sintakonte Wrote: i think this table names are not really intuitive especially with your illustration
i would prefer your first attempt because we don't have to much to fix here Wink

your proprietati table need an adress id not an zone id because if you just know the zone you don't know which address it is
take zone -> strazi -> adrese and in proprietati make an id_adresa as relational field

the other thing which comes to mind is your strazi table; if you use one extra table for streets - you should think about a junction table between streets and zones because if your db grows you avoid duplicate street names

i don't understand the 2nd attempt at all - to much duplication


I come with an update for this post:

- I am trying to reduce duplicity but If I choose the first diagram and I need to get the address for a property I need the iterate through areas->streets>addresses . But with the second I have the address id in the main table.

Another problem I encounter.


I have a lot of characteristics for each of:

- apartments
- lands
- spaces
- houses

And when I add a land property for example all of apartments characteristics will be empty.

Initially I was thinking to create 4 more tables:

- apartments_characteristics
- lands_characteristics
- spaces_characteristics
- houses_characteristics


and when select a property to select from the specified table.

Here is the english version of the db

[Image: etA8W.png]

P.S. this db is on progress.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB