• Saujib (7/2/2013)


    hi

    Here a requirement that I am trying to implement

    One table Address is used by many tables. like member, provider and sales representative.

    While creating Sales Order, User would entry information for member, provider and sales representative.

    and address for each entity

    member, provider, sales representative tables has reference to sales order table

    Which is best way to create tables

    1. member, provider and sales representative have FK to Address table

    2. Address table has 3 columns for member, provider and sales representative.

    3. Instead of address table, add columns to each table

    member, provider and sales representative to address is one-one.

    Why does a sales representative have an address? I don't quite understand what is a member and a provider as it relates to a SalesOrder. Is a member the customer? If so, what is the address? Is is the billing address, the shipping address? I can't even hazard a guess as to what a provider is.

    Personally I would avoid overnormalizing by creating an address table to hold historical information. This data would not be editable so you are not gaining anything by putting it in its own table.

    I will be happy to help you if you can provide some more details about exactly what you are trying to do.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/