Panji
Panji

Reputation: 21

Multiple one to many relationship for one table

I'm new to Database Design. I have read this question

Multiple one-to-many relationship for one table

I have the same question, and In my case, I have one table "Risk" which have 3 attributes with one-to-many relationships, One risk can have multiple "Activity" & " Channel" & "Transaction Method" so i created this design

enter image description here

I haven't seen a database design like this through my research. My question is this design allowed or any suggestion for my case?

Thank you.

Upvotes: 0

Views: 1002

Answers (1)

Bill Karwin
Bill Karwin

Reputation: 562230

I think you're on the right track, but you have a few details to fix:

  • I think Detail Channel should reference Channel_ID, not Activity_ID, right? This looks like a copy & paste mistake.

  • Likewise, the detail table for Transaction Method should reference TransactionMethod_ID, not Activity_ID.

  • And the table name for the detail table for Transaction Method needs a different name. Each table in a database must have a unique name, and you already have a table with that name.

  • Channel and Transaction Method need an ID column if you reference them by their respective ID.

Upvotes: 1

Related Questions