views:

117

answers:

3

If i were to organise data on tourism and hotel for the continent of Australia and south America can you let me know a best way to do it. Like if i organise the tables thus:

  • continents
  • countries
  • states
  • zipcodes
  • cities
  • destinations
  • hotels
  • lnkhotelszipcodes (in case a hotel exists in multiple places)
  • lnkhotelscities

It will be search oriented with countries, states, zipcode, cities and then amenities or features of hotels and tourist destinations

A: 

how would a hotel exist in multiple places? also, is this really one large table, or do you mean a large database?

davidosomething
a hotel group or something like a resort chain. apart from the database being large, the tables will also contain large data in this sort of design. like for instance the zip and city tables. the link tables.
zapping
A: 

i would suggest you model it using star schema. have a region dimension. would help in slicing and dicing of data.

Aadith
Can you pls explain more on this.
zapping
star schema is used in data-warehousing based applications. it allows users to analyse data at various levels of granularity. in your case, you could get counts of hotels at various levels of granularity. the internet is fraught with a lot of info on star schema. google "star schema". you may also read on datawarehousing
Aadith
this could be a good starting point: http://en.wikipedia.org/wiki/Star_schema
Aadith
+1  A: 

In a nutshell - create one table for one entity.

I think you should create an ERD diagram (http://en.wikipedia.org/wiki/Entity-relationship_model), and map it to the tables in the following way: one entity - one table. As a result you will get a data in the 3-rd normal form. You should proceed this way until facing some performance problems. If they will be serious - start de normalizing. I do not think that building something not normalized is justified in this case.

David Gruzman
Upvoted, I'm in complete agreement. Only go for a star schema if it better meets your performance (on update and/or query) requirements.
High Performance Mark