Many to many relation. How?

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Dec 6 10:51:05 CST 2004


On 12/7/04 2:28 AM, "Ralf Sander" <ralf at end-if.de> wrote:

Hi Ralf,

> In FileMaker, a many to many relation can be build by storing many
> related values in one record separated by returns.
> 
> e.g.
> tablea, field "ids"
> record 1:
> id1
> id2
> id3
> 
> 
> 
> 
> tableb, field "id"
> record 1:
> id1
> record 2:
> id2
> record 3:
> id3
> 
> questions:
> 
> 1. Is this possible in v, too?

1) first of all. This is NOT STANDARD way for Relational model.
    I mean FileMaker.

2) if you very want you can store several IDs into some field.
    this can be String, VarChar, BLOB or TEXT field,
    up to you.

> 2. How will the select statement look like?

That is the problem. This is not correct way for RDBMS,
So there is no query in SQL for this.

> 3. In FileMaker, there exists a limitation for the lenght of a single
> relation string (32 bytes, I think) Is there a limitation in Valentina?

Limitations of each field type describe in the ValentinaKernel.pdf
BLOB and TEXT do not have limit on size.

> 4. How can I produce save unique values in a server invironment?
 
> You will say: Use object pointers and a third table, but that does not
> produce save ids.

What you mean "save ids" ?

You mean CUSTOM GENERATED values ?
Then you should self generate them.

> If I delete a record in table b, another record will
> take it's place, right?

Right. But if you use ObjectPtr with option CASCADE,
Then all linked records will be deleted also automatically.
So there is no reference integration failure.

* Finally, in RDBMS model, to get M : M link you must to have third table.
* you can simulate FM way, but then it is your responsibility
READ/WRITE/UPDATE this list of linked values.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list