If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Column Reference Help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-11, 02:28
bharanidharanit bharanidharanit is offline
Registered User
 
Join Date: Nov 2008
Posts: 115
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...
Reply With Quote
  #2 (permalink)  
Old 07-24-11, 06:04
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On