For those of you who are living and developing a database design, have you ever found good reason to have multiple FKs in a table that all point to the same parent table?
Recently, we had to deal with a situation where we had a table containing six columns, which were all FK columns in the same parent table. We are debating whether this indicates poor design on our part or whether it is more common than we think.
Many thanks.
. , , , , . , , - -, user_to user_from user_id users.
user_to
user_from
user_id
users
6- , , - , , , .
(.. ). - , 6 .
, : Item1, Item2, Item3, ( ), , , .
, , :
, CreatedBy, LastModifiedBy, AcceptedBy, ProposedBy,
, PK , . ( ), , , , .
, 6 , ... , . " ", ?
FK .
, , ,
, :
, stuffID. stuffID1, stuffID2 . 3 FK.
Having a database of an online store, there should be one table containing addresses and one table containing orders - now so that there are two tables fk in the address table, one of which contains delivery, and the other containing the key of the billing address.
Personality table {personID otherpersonattributes ...} InterPersonRelationships table {personID1 personID2 relationshiptype}
It is very natural to have two different FKs in the same parent table in this situation.
Source: https://habr.com/ru/post/1745499/More articles:NAnt errors when generating assembly information after a project are updated to VS2010 - .netWhat PowerShell data formats are the easiest to read? - powershellDetermine if a server is listening on a given port - c #For jQuery or not for jQuery? - performanceCan I make this blind relative to the absolute conversion path (for the perforce depot path) better? - algorithmHow can I programmatically (using reflection?) Change the body of the method and save my changes back to disk - reflectionИнформация о часовом поясе .NET - timezoneHow to templatize partial custom templates? - c ++Android: scaling buttons with background image - androidПереопределение метода save() модели, использующей django-mptt - djangoAll Articles