[Q] Tag-Note relationship, any suggestion?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Q] Tag-Note relationship, any suggestion?

Chun, Sungjin
Hi,

my web application uses following classes;

NOTE: which has "contents" and "tags"
TAG: which has "name"

What I want is getting notes using tag and simple but crude idea could be
using dictionary and set;

MainDBDictionary(an instance of dictionary).

inserting:
MainDBDictionary at: #SomeTagName put: (aSetOfNotesUnderThisTag add: aNewNote)

fetching:
MainDBDictionary at: #SomeTagName

current implentation does not above model; in fact I'm using SQLite but I want to remove
dependency on SQLite or other RDB.

Can above model be directly mapped into OODB? For example Magma?
If not, any suggestion on better design or reference/documentation on this?

Thank you in advance.


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [Q] Tag-Note relationship, any suggestion?

Sebastian Sastre-2
Hi Chun,

        yes you can store that in magma if you want and there is no mapping needed. Depending on volume consider to evaluate well before migration.

        cheers,

Sebastian

 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de "S.J.Chun"
> Enviado el: Jueves, 10 de Abril de 2008 05:11
> Para: Seaside-generaldiscussion
> Asunto: [Seaside] [Q] Tag-Note relationship, any suggestion?
>
> Hi,
>
> my web application uses following classes;
>
> NOTE: which has "contents" and "tags"
> TAG: which has "name"
>
> What I want is getting notes using tag and simple but crude
> idea could be
> using dictionary and set;
>
> MainDBDictionary(an instance of dictionary).
>
> inserting:
> MainDBDictionary at: #SomeTagName put:
> (aSetOfNotesUnderThisTag add: aNewNote)
>
> fetching:
> MainDBDictionary at: #SomeTagName
>
> current implentation does not above model; in fact I'm using
> SQLite but I want to remove
> dependency on SQLite or other RDB.
>
> Can above model be directly mapped into OODB? For example Magma?
> If not, any suggestion on better design or
> reference/documentation on this?
>
> Thank you in advance.
>
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Q] Tag-Note relationship, any suggestion?

Dale
In reply to this post by Chun, Sungjin
S.J.Chun wrote:

>Hi,
>
>my web application uses following classes;
>
>NOTE: which has "contents" and "tags"
>TAG: which has "name"
>
>What I want is getting notes using tag and simple but crude idea could be
>using dictionary and set;
>
>MainDBDictionary(an instance of dictionary).
>
>inserting:
>MainDBDictionary at: #SomeTagName put: (aSetOfNotesUnderThisTag add: aNewNote)
>
>fetching:
>MainDBDictionary at: #SomeTagName
>
>current implentation does not above model; in fact I'm using SQLite but I want to remove
>dependency on SQLite or other RDB.
>
>Can above model be directly mapped into OODB? For example Magma?
>If not, any suggestion on better design or reference/documentation on this?
>
>Thank you in advance.
>  
>
Speaking for GemStone (anOODB), the answer is yes. If MainDBDictionary
is stored in a class variable or other global, then every object put
into the dictionary is persisted. The mental model for GemStone is that
_any_ object that would be preserved by an image save (and not subject
to garbage collection) in Squeak will be persisted in the GemStone db at
commit time.

Dale
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside