The ORM Foundation

Get the facts!

Search

Page 1 of 2 (20 items) 1 2 Next >
  • Re: Generated constraint names

    Thanks, Matt. For the time-being, I just wrote a script to rewrite the generated DDL (adding the default values and changing the casing). But I certainly would be interested in this longer term.    
    Posted to NORMA (Forum) by maubrey on Tue, Apr 22 2014
  • Re: Generated constraint names

     As a follow-up to this, is there a way to have NORMA specify column default values?  For example, rather than this:    created_at TIMESTAMP NOT NULL  I need:   created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP      
    Posted to NORMA (Forum) by maubrey on Sat, Mar 29 2014
  • Generated constraint names

    I have NORMA configured to use snake_case naming for generated DDL. So I get names like table_name and variable_name. Perfect. But for the generated constraint and domain names, it seems to still be using some CamelCase: CREATE DOMAIN myapp.Vote AS SMALLINT CONSTRAINT ValueTypeValueConstraint1 CHECK (VALUE IN (-1, 1)); CREATE DOMAIN ...
    Posted to NORMA (Forum) by maubrey on Sat, Mar 8 2014
  • Re: Question on BBB exercise 3.3

    I think I understand now. I was thinking the fact would be stored as "City is in Country" and that the role "are in the same country" would be derived. But I see now that I was jumping the gun and should have restricted myself to the fact as it was expressed. Thank you!
    Posted to User experience (Forum) by maubrey on Wed, Oct 16 2013
  • Question on BBB exercise 3.3

    I'm working through the exercises in the Big Brown Book. Exercise 3.3 question 1 asks: Assuming suitable entity types and reference modes are understood, which of the following sentences fit our standard pattern for expressing exactly one elementary fact? The key says the correct answer is: A, F, and J, but I don't ...
    Posted to User experience (Forum) by maubrey on Sun, Oct 13 2013
  • Re: Help modeling email constraints for user

    [quote user="Ken Evans"][quote user="maubrey"]Although, philosophically, you could argue that the "personnel number" is a surrogate key -- it's just an externally allocated surrogate key. But it serves the same purpose and was probably introduced for the same reason by the "original" ...
    Posted to User experience (Forum) by maubrey on Thu, Sep 19 2013
  • Re: Help modeling email constraints for user

    [quote user="Ken Evans"]I follow relational principles and only use surrogate keys when the natural keys are compound and large. For example, many organisations assign a "personnel number." to each employee, so using "Person(.nr) fits this paradigm. (i.e. it is a natural key whereas the autonumber ".id" ...
    Posted to User experience (Forum) by maubrey on Wed, Sep 18 2013
  • Re: Help modeling email constraints for user

    Thanks for your thoughts, Ken. [quote user="Ken Evans"]User If by "User" you mean "Person", then you might consider using Person instead of "User". If you are going to have "Person" somewhere in your model then you might as well not use "User" at all.[/quote] I did get bitten by ...
    Posted to User experience (Forum) by maubrey on Tue, Sep 17 2013
  • Re: Help modeling email constraints for user

    [quote user="Clifford Heath"]That is incorrect, because it allows an email to be alternative for one user, but primary for another. It also allows the same email to be alternative for any number of users. [/quote] That's actually what I was going for, I think. In the previous mail I mentioned "I've now changed the ...
    Posted to User experience (Forum) by maubrey on Tue, Sep 17 2013
  • Re: Help modeling email constraints for user

    I managed to get an external exclusion constraint across both roles of each predicate: http://minus.com/l4R7zsPu8j3uH The verbalization looks right: For each User and Email, at most one of the following holds: that User has that alternative Email; that User has that primary Email. But adding sample populations, it's ...
    Posted to User experience (Forum) by maubrey on Tue, Sep 17 2013
Page 1 of 2 (20 items) 1 2 Next >
© 2008-2024 ------- Terms of Service