I am quite new to database designs, I have a problem in my design...I
can actually feel it, but I am not quite sure if there is a feature in
mysql or I have to solve it with programming.

Example:
CREATE TABLE A (
                user_id int(16) NOT NULL auto_increment,
                ..........other datas
                PRIMARY KEY (user_id)
               );

CREATE TABLE B (
                user_id int(16) NOT NULL auto_increment,
                ..............other datas
                PRIMARY KEY (contact_id)
            );

Question:
How can I declare that the user_id in my 1st table is related to user_id
in the 2nd table...actually I prefer to have it exactly the same user_id
in both tables....I think if those 2 entries are the same it will be
great, but I am not sure how to achieve this.

P:S
-Ofcourse I know that I can extract it from TABLE A and save it in TABLE
B....but is that a way to go???Because this issue arise in couple of
tables in my data structure that I am tending to use in my application(web).
-I also know that its possible to  make just 1 big table with lots of
columns....but I read its not a good database design...

----->>>>>please advice, running out of ideas :-(

Thanks......


-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash
Typo:40WPM
url:http://mambo-tech.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to