in

The ORM Foundation

Get the facts!

Equality constraints and their effect in relational models

Last post Fri, Nov 18 2011 19:15 by Ken Evans. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Fri, Nov 18 2011 16:49

    Equality constraints and their effect in relational models

    Hi,

    I'd like to know if an equality constraint in an ORM model has any effect over its relational view or if it only has an informational role.

    I have a model which I've attached to this post. In the Asset_Movement table I'm getting two columns:

    FK1: asset_Account_Asset_Sym

    FK2: asset_Sym

    but these columns should be only one because their values must be equal. I though that the equality constraint could enforce this but nothing is happening.

    I'd like if someone could help me with this. I'd also appreciate if someone could point me out to an example showing the usage of an equality constraint.

    Thanks,

    Jose Carlos

    Filed under: ,
  • Fri, Nov 18 2011 19:15 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: Equality constraints and their effect in relational models

    Hello Jose,

    Here is an example of an equality constraint that I have taken from page 225 of Terry's book.
    I would have thought that this constraint would generate some additional DDL but my tests show that the DDL is the same with and without the constraint. I have asked Matt to comment.

    Ken

     

     

     

     


Page 1 of 1 (2 items)
© 2008-2024 ------- Terms of Service