novice on table design

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have the following tables

    Employee            Customer            non-Customer            Address
==========    ==========    =============    ==========
    pkey                     pkey                    pkey
pkey
    number                 type                     type
...
    payrate                 grant                    capital

I need to allow the three types of people to have n addresses, so I've added
a type to distinguish the 3 types of people and their respective pkey onto
address table.

    Address
=========
    pkey
    ...
    type    (either Employee, Customer or non-Customer etc)
    fkey    (the pkey of Employee, Customer or non-Customer etc)

I know this design looks awkward but it does have the advantage of having
less tables otherwise.
BUT somehow it doesn't feel right. Can someone points me its pros and cons.

thanks all.
Tony Yau

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux