> 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
<[email protected]> 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" <[email protected]>
> To: "General Discussion of SQLite Database" <[email protected]>
> 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
> <[email protected]> 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" <[email protected]>
>> To: "General Discussion of SQLite Database" <[email protected]>
>> 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 <[email protected]> 
>> wrote:
>>
>>> From: Kavita Raghunathan <[email protected]>
>>> Subject: [sqlite] Question on converting objects into relational db
>>> To: "sqlite-users" <[email protected]>
>>> 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
>>> [email protected]
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> [email protected]
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> _______________________________________________
>> sqlite-users mailing list
>> [email protected]
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to