Y
Y
yar_s2015-05-04 17:33:38
SQL
yar_s, 2015-05-04 17:33:38

How to properly organize the separation of individuals and legal entities?

Hello, in my coursework I need to develop a database for an auction company.
Auction participants can be both individuals and legal entities. I created the appropriate tables, but now I don't know how to organize the storage of information about the owner and about the buyer. I thought to introduce a table of participants, where their general index, a logical variable (FL / LE) and foreign keys with links to FL and LE would be entered. But it somehow looks like a mess)
I think this is a typical situation and there is a normal standard solution. Tell me please.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeniy Zavyalov, 2015-05-05
@yar_s

Little data, but I would do this:
and a couple of tables for details (if necessary)
- a table for individuals
- a table for legal entities / individual entrepreneurs
You will have a client ID and use it in transaction tables, goods
...
- nobody canceled TIN input errors
- TIN you will not always know ( 100% )

R
Rsa97, 2015-05-04
@Rsa97

Are there common details for legal entities and individuals that uniquely define them? For example - TIN. Accordingly, we make the TIN the primary key in the tables of individuals and legal entities, when selecting joins with both tables.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question