Cascade Update relationship w/out a required record (1 Viewer)

cnstarz

Registered User.
Local time
Today, 12:12
Joined
Mar 7, 2013
Messages
89
Is there a way to enforce one-to-many relationship with cascading updates without requiring the related table to have a related record? For example, how can I get a one-to-many relationship on [tbl_Colors].[Color_Name] (one-side) and [tbl_Cars].[Color_Name] (many-side) without every record in tbl_Cars having a related record in tbl_Colors?

What I'm wanting to do is ensure that if a [tbl_Colors].[Color_Name] record is ever changed/renamed (ie: from "Red/Brown" to "Maroon") , then the change is replicated to all other tables that are joined to [tbl_Colors].[Color_Name]. But, not every related record is going to have a Color_Name specified.
 

sneuberg

AWF VIP
Local time
Today, 10:12
Joined
Oct 17, 2014
Messages
3,506
The many side of a one-to-many side relationship isn't required to have a record or a records with a value from the one side. If for example you have a table of products and one of the fields is color. If you give the product the color maroon then maroon need to be in the color table but if the product has no color you can just leave it blank (null). So you can have enforce relational integrity with cascaded updates and eat your colorless cake too.
 
Last edited:

Users who are viewing this thread

Top Bottom