SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2008
    Location
    Italy
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question way to proceed. single or multiple db tables?

    Hi,

    Please I should want to receive a suggestion about the creation of db table.
    It's a general question not bound strictly with mysql or a particular db.

    Think about two practice situations where in the first we can imagine some fields while in the second one there are exactly the same previous fields with another one field in addition.
    This last field has no sense for the first situation but has significance only for the second one.
    So the question is: in these cases it should be better to create two separate tables or one unique table for both situations leaving this 'different' field empty?
    I hope I have explained well the issue.


    many thanks.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    only one column is different?

    use a single table and make that extra column nullable
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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