Results 1 to 4 of 4

Thread: DB Design

  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Lightbulb Unanswered: DB Design

    hi ,

    I m new to DB design.i need some ideas to design DB for a website,its a online food ordering website,in that based on the area or zip code we filter the hotels in that area and list them, on choosing the hotel, menu will be displayed with menu categories and menu items for the each categories.I m half way through the design and got stuck in building the tables for menu categories and menu items for a different hotels ...how to build tat... any ideas.............


    Regards,

    Pat

  2. #2
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    113
    You'd be better off showing us what you've come up with and the community at large can then give you suggestions on where you've gone wrong or which direction to take from there.

    What you've asked for has a pretty broad specification, there could be dozens and dozens of solutions depending on how the solution is to be used/integrated and to be honest sounds like a homework assignment for school.

    But as a broad answer... I would assume you would have a number of tables with a one to many relationshp

    area/zip code -> hotel -> menu categories -> menu items.

    i.e. an area/zip code can be referenced by multiple hotels, which in turn can have multiple menu categories, which in turn can have multiple menu items.

    How you flesh that out into actual tables would depend on your business requirements.

  3. #3
    Join Date
    Jun 2010
    Posts
    2
    ok thank u very much for u rply .....let me narrow down to a specific problem.....i m not professional DB developer....i already got some tables ....it is in old school style ...... i need to build something professional with perfect table relationships.....wat u have said is actually correct...........
    this how i got the table ......


    tbl_HotelMain

    HotelId
    HoetlName
    Address
    Profile
    ......

    tbl_MenuCategory

    CategoryId
    tbl_Hotelmain_HotelId
    ParentCategoryId
    CategoryName
    Description
    ........


    tbl_MenuItems

    ItemId
    tbl_MenuCategory_categoryId
    tbl_Hotelmain_HotelId
    ItemName
    ItemDesc
    ......


    will this work out...........i m fine with the zipcode and area filter


    Thanks & Regards,

    Pat_king

  4. #4
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    113
    That looks like a workable solution.

    I would think more about your menu items table design though. Presumably the category is going to be a foreign key to the categories table, which in turn has a foreign key to the hotel table.

    So would you need a direct link to the hotel table from the menu items table?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •