By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,651 Members | 1,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,651 IT Pros & Developers. It's quick & easy.

Fwd: Mysql primary, foriegn and composite keys. Please advise

P: n/a
--0-474210375-1058976151=:31789
Content-Type: text/plain; charset=us-ascii
Content-Id:
Content-Disposition: inline
Note: forwarded message attached.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--0-474210375-1058976151=:31789
Content-Type: message/rfc822

X-Apparently-To: gi*******@yahoo.com via 216.136.225.54; 22 Jul 2003 07:18:39 -0700 (PDT)
Return-Path: <my*************************************@lists.mys ql.com>
Received: from 213.136.52.31 (HELO lists.mysql.com) (213.136.52.31)
by mta411.mail.yahoo.com with SMTP; 22 Jul 2003 07:18:38 -0700 (PDT)
Received: (qmail 28137 invoked by uid 109); 22 Jul 2003 14:14:45 -0000
Mailing-List: contact my********@lists.mysql.com; run by ezmlm
List-ID: <mysql.mysql.com>
Precedence: bulk
List-Help: <mailto:my********@lists.mysql.com>
List-Unsubscribe: <mailto:my***********************************@list s.mysql.com>
List-Post: <mailto:my***@lists.mysql.com>
Delivered-To: mailing list my***@lists.mysql.com
Received: (qmail 28119 invoked from network); 22 Jul 2003 14:14:44 -0000
Date: Tue, 22 Jul 2003 07:14:39 -0700 (PDT)
From: Girish Agarwal <gi*******@yahoo.com>
Subject: Mysql primary, foriegn and composite keys
To: my***@lists.mysql.com
In-Reply-To: <10*******************@lists.mysql.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Check-By: lists.mysql.com
X-Spam: False ; -3.3 / 5.0
Content-Length: 607

Hi All,
I have a database consisting of 2 tables.
patient_info ( Patient Information ).Looks like
lastname VARCHAR(10)
fname VARCHAR(10)
ssno INT(9) PRIMARY KEY
ID INT(4) AUTO_INCREMENT

patientins_info ( PatientInsurance Information)

insco VARCHAR(10)
insid VARCHAR(10)

I want to create chart number based on :-
2 characters of (lastname)+2characters of
(fname)+(ID)
( So according to my understanding I will have to
generate some kind of composite key ).

Also, this chart number will be my primary key in
all
patient insurance database. Since I am fairly new in
database area, I don't know much but I think I will
have to define some kind of references/foriegn key
relations. My database type is MyISAM.

Please advise.

Thanks,
Girish

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gi*******@yahoo.com
--0-474210375-1058976151=:31789
Content-Type: text/plain; charset=us-ascii

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw
--0-474210375-1058976151=:31789--
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.