Avoiding duplications in table. - Mailing list pgsql-general

From Deepa K
Subject Avoiding duplications in table.
Date
Msg-id 3E7EAC63.FF536BAE@midascomm.com
Whole thread Raw
Responses Re: Avoiding duplications in table.  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
Hi All,
                I have the following tables.

 tablename : versions       tablename :
applicationmanager                     tablename : applications

versionnumber-string              versionnumber -
string                                 applicationnumber - integer

applicationnumber - integer                        other details


tablename : profilemanager            tablename : profiles

versionnumber : string                        versionnumber : string
profilename : string                                profilename : string

applicationnumber : integer
otherdetails

Primary key :
---------------

(1)    versions : versionnumber
(2)    applicationmanager : versionnumber, applicationnumber
(3)    applications : applicationnumber
(4)    profilemanager : veriosnnumber, profilename, applicationnumber
(5)    profiles : versionnumber, profilename

Relations :
-----------

(1)    versionnumber of 'applicationmanager' referes to versionnumber of
'versions' table.
(2)    applicationnumber of 'applicationmanager' referes to
applicationnumber of 'applications' table.
(3)    versionnumber and applicationnumber of 'profilemanager' referes
to versionnumber and applicationnumber of 'applicationmanager'.
(4)    versionnumber and profilename of 'profilemanager' referes ot
versionnumber and profilename of 'profiles'.
(5)    versionnumber of 'profiles' referes to versionnumber of
'versions'.

In the above design I can able to see duplication of data in all the
tables. If I take out a id out of all these tables to make reference, is
that problem will solve. Is that is
a correct approach.

Can any one help me.

regards,
Deepa  K


pgsql-general by date:

Previous
From: "Tamir Halperin"
Date:
Subject: Re: FW: [NOVICE] From a real novice
Next
From: Tom Lane
Date:
Subject: Re: 4 billion + oids