Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
ratherBeKiting's user avatar
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, ...
RobVious's user avatar
  • 171