you should be keeping your database just as your trying to keep your
database -- non-modified.
database scheme''s should remain stable during any runtime.
adding/deleting tables during production is asking for trouble to
occure in many ways. as well im not aware of any database that allows
multi-table column referencing. its entirely to complicated and
unneeded.
On 9/16/05, Rich Morin <rdm-go8te9J4rpw@public.gmane.org>
wrote:> Looking at the ORM write-up in Locomotive, I don''t see how to
handle
> new relationships on a dynamic basis. In this application, I''m
likely
> to be encountering unexpected relationships on a continuing basis. I
> I don''t want to be updating my table definitions on the fly, so I
need
> a way to add new relationships in a "semi-structured" manner.
>
> One possible implementation would use an "edge list", as seen in:
>
> * RDF (http://en.wikipedia.org/wiki/Resource_Description_Framework)
>
> * RGL (Ruby Graph Language; http://rubyforge.org/projects/rgl/)
>
> That is, along with the static relationships encoded by foreign keys,
> I could encode arbitrary (including dynamic) relationships in an
"edges"
> table, as:
>
> <scifi>
>
> create table edges (
> src_table varchar(100),
> src_id int not null,
>
> dst_table varchar(100),
> dst_id int not null,
>
> e_type_id int not null,
>
> id int not null auto_increment,
> primary key (id)
> );
>
> </scifi>
>
> In one possible use, you could ask an object for a list of its edges.
> Along with reporting on the ones it implements via foreign keys, it
> could tell you about ones that are encoded in the "edges" table.
You
> could then iterate over the reported edges, seeing what you have.
>
> Before I wander off in this direction, however, I''d like to ask
for
> feedback. Is there some better way to handle this sort of problem?
> Are there caveats (aside from performance, which is not likely to be
> a gating issue in this application)?
>
> Inquiring minds need to know...
>
> -r
> --
> email: rdm-go8te9J4rpw@public.gmane.org; phone: +1 650-873-7841
> http://www.cfcl.com - Canta Forda Computer Laboratory
> http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Zachery Hostens <zacheryph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>