[REBOL] Database Compactness?
From: robbo1mark::aol::com at: 21-May-2002 9:43
This is one for the guru's or Rt staff,
Which of the following provides a more compact and secure representation for a database?
an object!
db1: context [ group1: [#1 "A Value"] ]
or a block!
db2: reduce [ 'group1 [#1 "A Value"] ]
They both allow path retrieval ie.
>> db1/group1/#1
== "A Value"
>> db2/group1/#1
== "A Value"
>>
As well as insertions / removals
>> append db1/group1 [#2 "A Thing"]
== [#1 "A Value" #2 "A Thing"]
>> probe db1
make object! [
group1: [#1 "A Value" #2 "A Thing"]
]
>> append db2/group1 [#2 "A Thing"]
== [#1 "A Value" #2 "A Thing"]
>> probe db2
[group1 [#1 "A Value" #2 "A Thing"]]
I welcome help / opinions on this matter for the REBOL-TRIPLES project to design and
create REBOL/ASSOCIATES database which aims to produce a "Sentences" like product with
associated model database.
thanx,
Mark Dickson