All Questions
Tagged with inheritance polymorphic-associations
2 questions
5
votes
2
answers
14k
views
Best practise for polymorphic associations in MySQL
I have a MySQL database with 3 tables holding the main classes of data:
companies (company_id)
persons (person_id, company_id)
loans (loan_id, company_id)
Both a 'loan' and a 'person' belong ...
7
votes
2
answers
5k
views
Polymorphic Association - is it bad?
In the following schema:
Collections
Upvotes
Reports
Upvotes
Reviews
Upvotes
I'm tempted to have a single Upvotes table with a single "entityId" column that stores either the CollectionId, ...