Search the web
Sign In
New User? Sign Up
information_modeling · Information Modeling
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
ActiveFacts inquiry   Message List  
Reply | Forward Message #213 of 237 |
Re: [information_modeling] ActiveFacts inquiry

Mark,

> I'm not a Object-Relationship-Model expert, more an end-user.

Thanks for your inquiry. You need to be aware that there are two
different (but overlapping) things that claim the acronym ORM.
The original one is Object Role Modeling, which was created by
Terry Halpin in the 1980's, see www.orm.net and ormfoundation.org.

The newer and more widely known one is Object/Relational Mapping,
which I write as O/RM. It means a data access layer that takes objects
and persists them in a relational database. This is what ActiveRecord
and Og do.

ActiveFacts will do that too, eventually, but first I'm working on the
Object Role Modeling part, which supports the creation of fact-based
models. Fact-based models are essentially sixth-normal form relational
structures, with some higher-level constructs like subtyping etc, and
most importantly, significant support for describing the data
*semantics*.
In fact, I'm using the term "semantic modeling" more and more, as I
find that the important addition of semantics to information models also
benefits process models and other system artefacts. However...

ActiveFacts doesn't yet take a model and transform it into a relational
database design. That's on the cards soon, and isn't terribly hard, but
I'm otherwise occupied...

> DataMapper and Og differ from AR and DRYSql in that they start with
> the Ruby class and try to map that to a DB. Og does this with a
> decorated class definition that otherwise behaves as a normal Ruby
> class.
> With that background it won't surpise you that I'm curios about the
> state of, or intentions of 'translating' Ruby classes to DB's using
> ActiveFacts?
> From reading the tutorial and looking at the example/administration.rb
> I'm wondering if the (decorated) Ruby-class -> AF-Model isn't the
> preferred route?

As you discovered, I thought about it, and decided it's a bad idea.
Although it works ok for defining physical database models (3NF),
the kind of language needed for an *elementary* model is just too far
from the kind of syntax that's possible with a Ruby DSL. Instead...

I'm creating a new query language, the Constellation Query Language.
CQL has many advantages over SQL, the most important one being
that queries written in CQL are immune to the most common kinds
of schema migration that occur, including attribute migration. The
queries are almost plain-language, meaning that they're easy to read.
The difficulties that SQL's join syntax creates simply don't exist in
CQL.

When CQL is done, you'll be able to define your information models in
a few lines of text, and compile those down to a 3NF relational
database.
Queries will also be written in CQL, and dynamically translated into
efficient SQL.

CQL will integrate with Ruby through my "polyglot" gem. With this,
you'll be able to:

require "cql"
require "fred"

and the cql gem will find the file "fred.cql", parse it, and create Ruby
objects and classes from it. This works by "cql" requiring "polyglot"
and
registering the filetype extension ".cql" with polyglot, which uses a
modified "require". IOW, the "model" won't be created in Ruby, but
*compiled to* Ruby at load time (and later, to other languages).

> I'm less familar with DRYSql (though you can read an exchange I had
> with the author on his blog), and have never used AR.

I submitted patches to DRYSql to provide support for multi-part keys for
use with AF's reflection capabilities.

Clifford Heath.




Mon Dec 3, 2007 11:01 am

clifford_heath4
Offline Offline
Send Email Send Email

Forward
Message #213 of 237 |
Expand Messages Author Sort by Date

Hi Devs, Thanks for all the work that has gone into making Active Facts possible. As well as thanks for making it freely available. I'm not a...
pitcat_regime
Offline Send Email
Dec 3, 2007
10:32 am

Mark, ... Thanks for your inquiry. You need to be aware that there are two different (but overlapping) things that claim the acronym ORM. The original one is...
Clifford Heath
clifford_heath4
Offline Send Email
Dec 3, 2007
11:01 am

Hi Clifford, Thanks for the prompt and detailed response... ... Thanks for the clarifiation. ... Ok, I think this point comes up later - but I may...
pitcat_regime
Offline Send Email
Dec 3, 2007
10:54 pm

On 04/12/2007, at 9:54 AM, pitcat_regime wrote ... The problem with DRYSql's method is that a relational database has already had most of the semantic...
Clifford Heath
clifford_heath4
Offline Send Email
Dec 4, 2007
12:20 am

Hi clifford, Thanks for a fascinating exchange, I will get the Halpin book. Work might get in the way of concerted study but hopefully over time I'll work...
pitcat_regime
Offline Send Email
Dec 4, 2007
4:45 am

A big Ooops... I misread the sentence as containing a negative <snip> ... I know, I'm _not_ one of them ... Mark ... issues. ... Language. ... All the ... is a...
pitcat_regime
Offline Send Email
Dec 4, 2007
5:46 am

... He's working on a new edition, but the existing one is juicy enough to be more than worth the price :-). ... Og exists to save and retrieve objects....
Clifford Heath
clifford_heath4
Offline Send Email
Dec 4, 2007
6:59 am

Thanks again Clifford! Seem to be saying that alot lately :) <snip> ... Yes, I see what you mean - I started to draft what I thought ...
pitcat_regime
Offline Send Email
Dec 4, 2007
9:19 am

Mark, You mentioned having done a rogaine in Perth. Are you an Aussie, and if so, where located? I'm in Melbourne. Clifford Heath....
Clifford Heath
clifford_heath4
Offline Send Email
Dec 4, 2007
8:57 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help