Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread CityDev


Simon Slavin-2 wrote:
> 
> You can use property lists.  
> 

It's an interesting question as to what that gives you. It's clearly not a
relation if you know how it was formed but - just thinking about it briefly
- it may still behave as a relation as far as SQL is concerned. But it looks
dodgy to me.

-- 
View this message in context: 
http://www.nabble.com/Question-on-converting-objects-into-relational-db-tp25385539p25443743.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread Simon Slavin

On 14 Sep 2009, at 10:38am, CityDev wrote:

> Bear in mind a relational database is designed around relations.  
> It's not
> obvious what your 'data model' is but there is a suggestion it  
> contains
> variable types of things. If you want to store variable things then  
> many of
> the features of a relational database don't work.
>
> Often an object maps reasonably to an entity, and an entity shares its
> structure with other entities of the same entity type. In this case  
> you can
> easily map object attributes to fields in a table.
>
> Maybe you are storing something more esoteric. You may have to  
> serialize the
> object rather than store it as fields.

You can use property lists.  And you can use a relational database to  
implement property lists.  For instance, TABLE properties:

Object  PropertyValue
Car PurchaseDate2001
Car Colour  Orange
Camera  Colour  Silver
Camera  MakePanasonic
Cat Colour  Black

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread CityDev

Bear in mind a relational database is designed around relations. It's not
obvious what your 'data model' is but there is a suggestion it contains
variable types of things. If you want to store variable things then many of
the features of a relational database don't work.

Often an object maps reasonably to an entity, and an entity shares its
structure with other entities of the same entity type. In this case you can
easily map object attributes to fields in a table. 

Maybe you are storing something more esoteric. You may have to serialize the
object rather than store it as fields.

-- 
View this message in context: 
http://www.nabble.com/Question-on-converting-objects-into-relational-db-tp25385539p25432919.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Sebastian Bermudez
Objects maps to tables...
fields maps to objects properties..

if you want just store all objects and read all objects
create an entitites tables like:
create table entity ( object as text )
and serialize that objects to database.




--- El jue 10-sep-09, Shaun Seckman (Firaxis) <shaun.seck...@firaxis.com> 
escribió:

> De: Shaun Seckman (Firaxis) <shaun.seck...@firaxis.com>
> Asunto: Re: [sqlite] Question on converting objects into relational db
> Para: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
> Fecha: jueves, 10 de septiembre de 2009, 1:18 pm
> 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
> 


  Yahoo! Cocina

Encontra las mejores recetas con Yahoo! Cocina.


http://ar.mujer.yahoo.com/cocina/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Pavel Ivanov
> Wouldnt using sqlite give me other benefits like easy
> of reading and writing data ?
>
> Any other reasons why I would need a database vs a simple file dump ?

Yes, there're benefits like easy searching by some attribute without
loading everything into memory and maybe even without scanning through
all the entities. But for this you have to forget about saving the
whole entity as blob, split it into different attributes, save each
attribute in its own column and thus "model data from SQLite as an
object" when reading.
As you see I've quoted your words which you said you don't want to do,
hence my confusion about your goals and requirements.

Pavel

On Thu, Sep 10, 2009 at 12:23 PM, Kavita Raghunathan
<kavita.raghunat...@skyfiber.com> wrote:
> Interesting thought. Want to know more.
>
> Wouldnt using sqlite give me other benefits like easy
> of reading and writing data ?
>
> Any other reasons why I would need a database vs a simple file dump ?
>
> - Original Message -
> From: "Pavel Ivanov" <paiva...@gmail.com>
> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
> Sent: Thursday, September 10, 2009 9:16:36 AM GMT -08:00 US/Canada Pacific
> Subject: Re: [sqlite] Question on converting objects into relational db
>
> So why do you think you need a database?
> If you want just a persistent storage then maybe simple dump of memory
> used by all entities into a file will be enough...
>
> Pavel
>
> On Thu, Sep 10, 2009 at 12:01 PM, Kavita Raghunathan
> <kavita.raghunat...@skyfiber.com> wrote:
>> 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
> ___
> 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


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
Sounds worth looking at. I will, thanks!

- Original Message -
From: "Shaun Seckman (Firaxis)" <shaun.seck...@firaxis.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, September 10, 2009 9:18:26 AM GMT -08:00 US/Canada Pacific
Subject: Re: [sqlite] Question on converting objects into relational db

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
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
Interesting thought. Want to know more.

Wouldnt using sqlite give me other benefits like easy
of reading and writing data ?

Any other reasons why I would need a database vs a simple file dump ?

- Original Message -
From: "Pavel Ivanov" <paiva...@gmail.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, September 10, 2009 9:16:36 AM GMT -08:00 US/Canada Pacific
Subject: Re: [sqlite] Question on converting objects into relational db

So why do you think you need a database?
If you want just a persistent storage then maybe simple dump of memory
used by all entities into a file will be enough...

Pavel

On Thu, Sep 10, 2009 at 12:01 PM, Kavita Raghunathan
<kavita.raghunat...@skyfiber.com> wrote:
> 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
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Shaun Seckman (Firaxis)
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


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Pavel Ivanov
So why do you think you need a database?
If you want just a persistent storage then maybe simple dump of memory
used by all entities into a file will be enough...

Pavel

On Thu, Sep 10, 2009 at 12:01 PM, Kavita Raghunathan
<kavita.raghunat...@skyfiber.com> wrote:
> 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


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
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


Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Ken
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  wrote:

> From: Kavita Raghunathan 
> Subject: [sqlite] Question on converting objects into relational db
> To: "sqlite-users" 
> 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 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