Table Design

  • Hi Everybody,

    I want to Design Database Tables for some of the Location,SubLocation,Area,SubArea

    Here is the my requirement.

    i want to Design the Database tables

    Location under that they may be sub-Location under that Sub location they may be Area under that Area they may be Sub Area.

    It should be hierarchy format.

    So that user select the Location in UserInterface automatically i need to populated the Sub locations details and sublocation is selected Area should be display and Area selected sub areas should be display.

    according to that Database Table Design should be design.

    Please tell how to design the tables and need to populated the Data as per the Critieria selected in the UserInterface.

  • Hello,

    Logical Design: Select Natural Primary-Keys or allocate Surrogate Primary-Keys in each table (Location, SubLocation, Area, SubArea). Create one-to-many relationships down the hierarchy i.e. one Location has many Sub-Locations, one Sub-Location has many Areas and one Area has many Sub-Areas.

    Implement the one-to-many relationships physically as Foreign-Key Constraints e.g. add the PK for Location as a FK in the Sub-Location table.

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply