Entity Relationship Multiple 1:1's
Posted
by Evan
on Stack Overflow
See other posts from Stack Overflow
or by Evan
Published on 2010-05-16T23:33:44Z
Indexed on
2010/05/16
23:40 UTC
Read the original article
Hit count: 329
I have an application where I have a generic object (table) called Hull. Each hull in the table is unique.
I have another object that has three hulls, but they are specifically the Port_Hull, Center_Hull and Starboard_Hull.
Rather than create a One to Many relationship, I was trying to create a one to one relationship for each one, but this results in numerous errors unless I make the relationship from Hull to Vessel one to many (which it is not). Any idea how I go about this, or should I abandon the concept and make the vessel to hull relationship one to many and deal with lists that always have three entries?
p.s. Using uniqueidentifiers as many users can be adding records while disconnected.
Hull Table
- HullID uniqueidentifier (primary key)
- plus bunch of hull data fields
Vessel Table
- VesselID uniqueidentifier (primary key)
- MainHullID uniqueidentifier (tried as key and non-key)
- PortHullID uniqueidentifier
- StarboardHullID uniqueidentifier
- plus bunch of Vessel data fields
© Stack Overflow or respective owner