Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: about primary key

Re: about primary key

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 26 Oct 1998 08:06:47 GMT
Message-ID: <711ain$5da$3@news02.btx.dtag.de>


Hi,

Of course think of sub typing:

Think of an enterpirse that has only one numbering scheme for all docs:

create table document(

		doc_number 	number,
		name		varchar2(50),
		street		varchar2(50),
		...
		ZIP		varchar2(50),
		...
		Doc_type	number	-- describe doc type INVOICE, BILL, LETTER
		)
		;
create tabel Invoice(
		doc_number number,
		...
		);
create table bill(
		doc_number number,
		...
		total	Number,
		...
		);


The table INVOICE and BILL both contain the field doc_number which is for both the primary key and also the foreign key related to table DOCUMENT. hpcheong_at_ncs.com.sg schrieb:
>
> hi all,
>
> can someone tell me whether the same field in a particular table, be a
> primary key as well as a foreign key to another table at the same time??
>
> pls reply ASAP as this is urgent!
>
> thanks in advance!
>
> rgds,
> evelyn.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

--

Regards

Matthias Gresz :-)

Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Mon Oct 26 1998 - 02:06:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US