Answer the question
In order to leave comments, you need to log in
What is the best way to organize work with 3 tables?
There are 3 tables - Addresses, People, Documents, storing records of addresses, people and documents (your KO).
Each table has a unique field (key) and other fields.
The logic of the tables is as follows:
Each address can correspond to one or more people.
Each address can correspond to one or more documents.
Simply put:
Ivanov lives at Lenin
's address Petrov lives
at Zhukov's address Bashkirov lives at Zhukov's address
//
Document 1 is located at Lenin
's address Document 2
is located at Zhukov's address Document 3 is located at Zhukov's address
Similarly with people and documents.
Ivanov lives at Lenin's address (it was already higher)
Ivanov owns document 1.
and so on.
Each object (Address, person, document) can own one or more other objects.
Question such - as it is better to organize work with such 3 tables? Samples, etc.
For example: display all people who own document 1 and document 2.
Join only? Or does it make sense to create an intermediate table?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question