+ 2

what are you supposed to do in the case of turnary degree when converting the ER diagram to relational schema?

database relational schema

20th Dec 2020, 9:47 PM
Mohamed Soliman
Mohamed Soliman - avatar
4 Respuestas
+ 2
Hi Mohamed, You can create an intermediate table linking all 3 tables. Considering you have tables A, B and C, and each one has keys idA, idB and idC, then your ternary table will be something like T, with columns idA, idB and idC. If you give more details your model, I could give you an example.
22nd Dec 2020, 7:54 AM
Eduardo S. Luz
Eduardo S. Luz - avatar
+ 1
I get it thanks a lot sir
23rd Dec 2020, 12:52 AM
Mohamed Soliman
Mohamed Soliman - avatar
0
thanks so much for your reply Eduardo but what is the Prime Key going to be in this T table?
23rd Dec 2020, 12:45 AM
Mohamed Soliman
Mohamed Soliman - avatar
0
You can have a composite pk, with all 3 keys, or have an auto generated Id,(autoincrement). All depends of your requirements.
23rd Dec 2020, 12:50 AM
Eduardo S. Luz
Eduardo S. Luz - avatar