Guys what you think its the best solution for this scenario, where i have these three tables. I want to relate the tbl_client with the tbl_checkingAccount and tbl_SavingAccount.
If I have one table to related them, the foreign key of the agregated table would come from two diferent tables. What way i found was to have two tables, agregating the tblClient - tblCheckingAccount, and another one tblClient - tblSavingAccount.
The problem is, those tables have the same attributes, the only diferente is where the foreign key comes from.
In the world I live in, a client can have a savings account. And a client can have a checking account. Or both. Or more than one of each. Any of those would then (naturally) be linked to the client that owns them.
In your world, though, a checking account can't exist without a savings account to link it to. Perhaps that's a reflection of reality where you live? But anyway, if that's the requirement then the savings account must be linked to the client who owns it. There's no need to link a checking account to a client because it's owned by the owner of the savings account which it's linked to.
I've been selected to go to the moon! All thanks to this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop