in

The ORM Foundation

Get the facts!

Link several ORM models together

Last post Tue, May 13 2008 18:46 by Anonymous. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • Mon, May 12 2008 7:23

    • ericdes
    • Top 100 Contributor
    • Joined on Mon, May 5 2008
    • Posts 4

    Link several ORM models together

    Is there a way to link keys (foreign keys) from one model to another that are located in a separate schema?

  • Mon, May 12 2008 21:16 In reply to

    Re: Link several ORM models together

    Eric, I think your question is tool related... which means that the answer depends on the tool.

    I don't think it's possible yet in NORMA, but my ActiveFacts project has a facility for handling it. I use some SBVR terminology; a model or schema is called a vocabulary. A vocabulary may import another vocabulary and define "correspondences" between the concepts (entity types, value types and aliases) of the two vocabularies. It's currently not possible to define alternate readings for imported fact types unless the fact type is objectified.

    I introduced the idea of "alias" as being a local name for an imported concept, so an import may serve merely to translate from one language to another. Alternatively, if I have two vocabularies that overlap at some points, I can define the concepts that correspond. For example, one vocabulary might refer to a Client, another to a User, another to an Account, and each might have related support software that uses those terms. When I merge them into one software system, I can choose to declare that the terms correspond exactly to the same concept, and the resultant concept plays all roles as declared in each of the merged vocabularies.

    That's the theory... I'm still working out how it'll function in practise. You can view the ORM diagrams of my metamodel by browsing the source code repository at http://activefacts.rubyforge.org/svn/examples/images/Metamodel. See Objects.png first, then Import.png. ActiveFacts is built on a base library of source code that's generated directly from this NORMA model.

    The ActiveFacts home page is here

    Filed under:
  • Tue, May 13 2008 14:50 In reply to

    • ericdes
    • Top 100 Contributor
    • Joined on Mon, May 5 2008
    • Posts 4

    Re: Link several ORM models together

     Yes, defintively, my question was related to Norma. I'd love to be able to target different database schemas in a same project. It's on my whish list!

     I looked at your ActivaFacts page, it sure looks like there is a lot to digest! My idea for now is to use an O/R mapping tool such as LLBLGen Pro. 

  • Tue, May 13 2008 18:46 In reply to

    Re: Link several ORM models together

     The source code of NORMA contains some support for Codesmith's NetTiers (an O/RM tool). If NORMA can emit a schema file for NetTiers, you might be able to get it to produce the code for your multiple database. I haven't used NetTiers, but I've built similar, and it seems likely.

     I'm glad my presentation of ActiveFacts at least indicates I've done something with the last year of my life Smile Hopefully soon I'll have more finished usable software too... Then I just have to improve the presentation.

    Filed under:
Page 1 of 1 (4 items)
© 2008-2024 ------- Terms of Service