Avoiding duplications in tables - Mailing list pgsql-general

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

(1)     tablename : versions

            versionnumber - string

(2)    tablename : applications

            applicationnumber - integer
            other details

(3)    tablename : applicationnumber

          versionnumber  - string
          applicationnumber - integer

(4)    tablename : profilemanager

          versionnumber - string
          profilename       - string
          applicationnumber - integer
           other details

(5)    tablename : profiles

          versionnumber - string
           profilename      - string

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: Tom Lane
Date:
Subject: Re: 4 billion + oids
Next
From: Joel Rodrigues
Date:
Subject: Re: PostgreSQL downloads compressed with bzip2 instead of