You could either store the object as a blob in the database or if you
had your own custom collection of these objects it's possible that you
could create a virtual table that can be used as the glue between SQLite
and this collection.

-Shaun

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kavita Raghunathan
Sent: Thursday, September 10, 2009 12:02 PM
To: kennethinbox-sql...@yahoo.com; General Discussion of SQLite Database
Subject: Re: [sqlite] Question on converting objects into relational db

The entity consists of an entity ID, and an attribute list. The
attribute list could
be thought of as an array of integers or vector of integers, and the
like.

The problem I'm encountering by my affinity towards object oriented is:
I dont want to keep 2 sets of data. One inside sqlite, and one to read
from sqlite and model it as an object.
It would be cool if I could store this object
in the database.

----- Original Message -----
From: "Ken" <kennethinbox-sql...@yahoo.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, September 10, 2009 8:45:11 AM GMT -08:00 US/Canada
Pacific
Subject: Re: [sqlite] Question on converting objects into relational db

table might have columns, integer ID and BLOB entity.

But it would be better if you could fully describe the "Entity" internal
types instead of just a var arg...



--- On Thu, 9/10/09, Kavita Raghunathan
<kavita.raghunat...@skyfiber.com> wrote:

> From: Kavita Raghunathan <kavita.raghunat...@skyfiber.com>
> Subject: [sqlite] Question on converting objects into relational db
> To: "sqlite-users" <sqlite-users@sqlite.org>
> Date: Thursday, September 10, 2009, 10:30 AM
> 
> I have a very high level question, not dealing with bits
> and bytes of sqlite: 
> 
> I currently have an object called entity_list, that has a
> list of all entities on the system. 
> While thinking about it, it sounds like a list of entities
> is like having a database. Would 
> it be possible to transfer the object entity-list into a
> sqlite database ? 
> 
> 
> How would my schema look ? 
> 
> 
> I have enclosed an idea of how my class looks. Any links to
> useful information is 
> appreciated! 
> 
> 
> Kavita 
> 
> 
> --------------- 
> 
> class entity_list 
> { 
> public: 
> entity_list(); 
> ~entity_list(); 
> entity *get_specific_entity(int entity_id); 
> entity *add_entity(int entity_id, void *attr_list,...); 
> remove_entity(int entity_id); 
> vector<entity*> m_entity_list; 
> 
> 
> private: 
> }; 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to