472,988 Members | 2,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

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

--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
0 2587

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Girish Agarwal | last post by:
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 ...
5
by: John | last post by:
Specifically for joint tables... tblStudents tblClasses tblClasses_Students Is it be good programming to use a composite primary key in tblClasses_Students (where the key is ClassID and...
18
by: Thomas A. Anderson | last post by:
I am a bit confused in creating a composite primary key. I have three table with two of the tables containing primary keys. I have two of the tables (each with a primary key) having one to many...
7
by: Dave | last post by:
Hi, Maybe I'm missing something with the DataKeyField attribute of a datagrid but it seems that it's somewhat limiting since this only allows you to specify one field as the key. I have a...
4
by: Ted | last post by:
Understand, I have developed a number of applications using RDBMS, including MySQL, PostgreSQL and MS Access, but this is my first experience with MS SQL. I'd bet my bottom dollar that MS SQL...
6
by: mac | last post by:
Summary: 1. I want to define a column in anMS Access table to be lookups on other tables. 2. The table that is the data source (e.g the "parent" table) has a composite primary key. 3. When...
7
by: Ronald S. Cook | last post by:
My client manager likes concatenated/composite primary keys. I don't. Can anyone forward any arguments pro or con? Thanks, Ron
4
by: Peter | last post by:
I am interested in informed feedback on the use of Constraints, Primary Keys and Unique. The following SQL statement creates a Bands tables for a database of bookings Bands into Venues, where the...
4
by: Wolfgang Keller | last post by:
Hello, so far it seems to me as if the only ORM module for Python which supports composite primary/foreign keys was SQLAlchemy. Which looks a little bit "overbloated" for my needs: I "just" need...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.