1

I am learning databases and sql. I am trying to understand if one single parent table can have multiple child tables, and if yes, just how common is it in financial companies? If this is allwoed, is such a structure typically used in database design, or does one strive for a one parent table linked to just one child?

In other word, let's take a table with a primary key. Can we link it to say three other tables via appropriately defined foreign keys in those respective tables?

1
  • 1
    "let's take a table with a primary key". Any unique key will do to allow a child table to refer to. Jan 20, 2022 at 18:20

1 Answer 1

1

You are essentially asking if an entity can have relationships with more than one other entity, and the answer is obviously yes. Foreign keys are just physical manifestations of those relationships in SQL databases.

Take the Customer entity as an example: clearly it has a relationship to the Account entity, but also to Credit Report, Customer Service Call, and whatever else you can correlate to Customer. All these will require foreign keys to enforce referential integrity.

1
  • Thank you for your explanation @mustaccio
    – Sasha1001
    Jan 20, 2022 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.