How can not-nullable attributes be modeled?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can not-nullable attributes be modeled?

Thiemo
Hi

I cannot think of a way to model not-nullable attributes. All I can think of is a trigger on a child table that checks whether all the parent table records have got a valid attribute value. Caveat is that the load on the child table always needs to be such that all data of a load corresponding to the load of the parent table is commited in one transaction. Did I write gobblegog?

Are there best practices?

Kind regards

Thiemo
Reply | Threaded
Open this post in threaded view
|

Re: How can not-nullable attributes be modeled?

roenbaeck
Administrator
I am not sure what is best practice, but what I have used in my own implementations is an AFTER trigger. See this post: http://www.anchormodeling.com/?p=1006
Reply | Threaded
Open this post in threaded view
|

Re: How can not-nullable attributes be modeled?

Thiemo
Thanks for the advice and the hint