Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    117

    Unanswered: Column Reference Help

    Hi,
    I am desingning a table for tracking profile. Every user have basic profile and based on the type of user their detailed profiles are stored in different tables like profile1,profile2.
    Where to refer this?
    My Table Structure

    Users
    UserID
    UserName
    BasicProfileID(FK)

    BasicProfile
    BasicProfileID(PK)
    Other details....

    Here i can track the user with their basic profile, but how about detailed profile ?

    Profile1
    ProfileID1(PK)
    other details...

    Profile2
    ProfileID2(PK)
    other details...

    Any Ideas?

    2. Also When defining primary keys which one is better to use int or bigint?

    Thanks in advance...

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by bharanidharanit View Post
    Where to refer this?
    do a search for supertype/subtype

    Quote Originally Posted by bharanidharanit View Post
    2. Also When defining primary keys which one is better to use int or bigint?
    use INTEGER unless you are sure that your table will have over 4 billion rows
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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