[V4MD] Object Pointers
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Aug 7 21:32:54 CDT 2004
On 8/7/04 9:23 PM, "Daniel Crowder" <daniel at monumental-i.com> wrote:
>> Yes of course.
>>
>> Just set both ObjectPtr to have CASCADE deletion.
>> Then Valentina will a automatically delete records in Link table.
>>
>>
>>
> Just to confirm: When the ObjectPtr field type is set to CASCADE the
> following would happen:
>
> I have a product database record. It has a CATEGORY_ID that is an
> ObjectPTR (Cascade delete on) that points to a particular record in a
> CATEGORIES table. If I delete the category record it points to - the
> entire product record is deleted since it contains a cascade delete
> enabled ObjectPtr.
Yes.
Although before we have talk about Product, Media, LinkProductMedia
Tables.
Now you use also Category table
Just one advice.
We prefer to use name CATEGORE_PTR.
At least of end, sense of this field is *pointer*.
Yes, many RDBMS offer to use in both tables xxx_ID names.
I think this is not very logical.
> -CONVERSELY-
>
> Using the same scenario as above: if the same ObjectPTR was set to
> restrict and NOT cascade. When I tried to delete that particular record
> in CATEGORIES it would have thrown an error because of the dependency
> and not delete the category record as a result.
Yes.
You must manually delete all child records,
Only after this you will be allowed delete
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list