Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-13 Thread Gustavo Vera
Well, I´m aware that problems in the future are a possibility with the
approach I choose to take. That´s the reason why I´m trying to take all the
cares I can to avoid those future problems as much as I can. In the mean
time, I´m winning a lot of time by avoiding using or implementing the
"possible but tedious" (I´m citing Jim Correia here) migration
functionalities using the Core Data API directly. I know the advantages and
disadvantages, and I´m ready to "pay the price" when that moment arives. I´m
aware that I don´t have a full understand of the underlying sqlite
structure, but I know (and learned) enough to keep using my approach. I´m
just trying to increase my knowledge to extend in time my capacity of using
the current approach.

Does anybody know if the original designers of  the underlying sqlite
structure are available to clarify some details about it? Just in case?

By the way, thanks for the Leopard Core Data migrator info, I´m gonna check
that when the moment of porting to Leopard arrives (for the moment, we are
developing this app on and for Tiger only).

Thanks to everybody for your suggestions!

On Wed, Aug 13, 2008 at 6:49 PM, Louis Gerbarg <[EMAIL PROTECTED]> wrote:

> Performing migrations by altering the underlying structure of files you do
> not understand will most likely result in data corruption. Even if the file
> appears to work correctly now, that does not mean it is correct, and it does
> not mean that it will continue to work in the future, especially if you have
> violated any assumption that future schema migrators make about the DB file.
> Louis
>
> On Wed, Aug 13, 2008 at 9:56 AM, Gustavo Vera <[EMAIL PROTECTED]>wrote:
>
>> Maybe I should not, but I'm doing it anyway :D
>> I'm looking inside and also I'm manipulating the structure and data of the
>> sqlite file since about 200 revisions in my project. I'm doing this to
>> provide newer versions of the app that has the possibility of performing
>> database migrations / upgrades from older versions of the app if
>> available.
>> With the new functionalities, occasionally a change in the database
>> structure results necessary, and when the change is simple (for example,
>> just adding a new attribute to an entity) altering the data model and the
>> data structures in an old sqlite is far easier and faster than
>> implementing
>> the migration functionality suggested in the documentation. In fact, I
>> think
>> this is faster and easier even when more complex changes are necessary.
>> Anyway... I was wondering if I should take care of the Z_UUID during the
>> perform of this upgrades, or if I can just ignore it. I'm currently
>> ignoring
>> it... can this become a problem in the future?
>>
>>
>> On Tue, 12 Aug 2008 17:28:39 -0300, Marcelo Alves
>> <[EMAIL PROTECTED]> wrote:
>>
>> >
>> >  It is a implementation detail. You should not look inside the sqlite
>> file.
>> >
>> > 2008/8/12 Gustavo Vera <[EMAIL PROTECTED]>:
>> > > What's the use of the Z_UUID in the Z_METADATA table?
>> > > Is some kind of check sum or something like that?
>> > > CoreData uses this value for something?
>> > > Why is this value different every time the DB is regenerated?
>> > > Is the generation of it a random-based one? Or is it based on
>> > > random+"another thing"?
>> > >
>> > > Please don't answer my question with another question!!! At least not
>> at
>> > > first instance! :D
>> > >
>> > > Thanks in advance!
>> >
>> ___
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/lgerbarg%40gmail.com
>>
>> This email sent to [EMAIL PROTECTED]
>>
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-13 Thread Louis Gerbarg
Performing migrations by altering the underlying structure of files you do
not understand will most likely result in data corruption. Even if the file
appears to work correctly now, that does not mean it is correct, and it does
not mean that it will continue to work in the future, especially if you have
violated any assumption that future schema migrators make about the DB file.
Louis

On Wed, Aug 13, 2008 at 9:56 AM, Gustavo Vera <[EMAIL PROTECTED]> wrote:

> Maybe I should not, but I'm doing it anyway :D
> I'm looking inside and also I'm manipulating the structure and data of the
> sqlite file since about 200 revisions in my project. I'm doing this to
> provide newer versions of the app that has the possibility of performing
> database migrations / upgrades from older versions of the app if available.
> With the new functionalities, occasionally a change in the database
> structure results necessary, and when the change is simple (for example,
> just adding a new attribute to an entity) altering the data model and the
> data structures in an old sqlite is far easier and faster than implementing
> the migration functionality suggested in the documentation. In fact, I
> think
> this is faster and easier even when more complex changes are necessary.
> Anyway... I was wondering if I should take care of the Z_UUID during the
> perform of this upgrades, or if I can just ignore it. I'm currently
> ignoring
> it... can this become a problem in the future?
>
>
> On Tue, 12 Aug 2008 17:28:39 -0300, Marcelo Alves
> <[EMAIL PROTECTED]> wrote:
>
> >
> >  It is a implementation detail. You should not look inside the sqlite
> file.
> >
> > 2008/8/12 Gustavo Vera <[EMAIL PROTECTED]>:
> > > What's the use of the Z_UUID in the Z_METADATA table?
> > > Is some kind of check sum or something like that?
> > > CoreData uses this value for something?
> > > Why is this value different every time the DB is regenerated?
> > > Is the generation of it a random-based one? Or is it based on
> > > random+"another thing"?
> > >
> > > Please don't answer my question with another question!!! At least not
> at
> > > first instance! :D
> > >
> > > Thanks in advance!
> >
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/lgerbarg%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-13 Thread Jim Correia

On Aug 13, 2008, at 9:56 AM, Gustavo Vera wrote:


Maybe I should not, but I'm doing it anyway :D
I'm looking inside and also I'm manipulating the structure and data  
of the

sqlite file since about 200 revisions in my project. I'm doing this to
provide newer versions of the app that has the possibility of  
performing
database migrations / upgrades from older versions of the app if  
available.


My recommendation is that if you cannot use the Leopard Core Data  
migrator, that you migrate your data using the Core Data API and not  
work with sqlite directly. It is possible (but tedious) and will  
insulate you from implementation details in the sqlite stores. It also  
will have the advantage that your code should work as-is (or with  
minimal modifications) with other store types.


Jim
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-13 Thread Marcelo Alves
2008/8/13 Gustavo Vera <[EMAIL PROTECTED]>:
> Maybe I should not, but I'm doing it anyway :D
> I'm looking inside and also I'm manipulating the structure and data of the
> sqlite file since about 200 revisions in my project. I'm doing this to
> provide newer versions of the app that has the possibility of performing
> database migrations / upgrades from older versions of the app if available.
> With the new functionalities, occasionally a change in the database
> structure results necessary, and when the change is simple (for example,
> just adding a new attribute to an entity) altering the data model and the
> data structures in an old sqlite is far easier and faster than implementing
> the migration functionality suggested in the documentation. In fact, I think
> this is faster and easier even when more complex changes are necessary.
> Anyway... I was wondering if I should take care of the Z_UUID during the
> perform of this upgrades, or if I can just ignore it. I'm currently ignoring
> it... can this become a problem in the future?


Well, I'm not a Core Data expert, but locking yourself to sqlite
engine does not look correct to me. Apple can add/remove/change
persistent stores anytime. And remember, Core Data is a object graph
management framework, not a database.


:: marcelo.alves
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-13 Thread Gustavo Vera
Maybe I should not, but I'm doing it anyway :D
I'm looking inside and also I'm manipulating the structure and data of the
sqlite file since about 200 revisions in my project. I'm doing this to
provide newer versions of the app that has the possibility of performing
database migrations / upgrades from older versions of the app if available.
With the new functionalities, occasionally a change in the database
structure results necessary, and when the change is simple (for example,
just adding a new attribute to an entity) altering the data model and the
data structures in an old sqlite is far easier and faster than implementing
the migration functionality suggested in the documentation. In fact, I think
this is faster and easier even when more complex changes are necessary.
Anyway... I was wondering if I should take care of the Z_UUID during the
perform of this upgrades, or if I can just ignore it. I'm currently ignoring
it... can this become a problem in the future?


On Tue, 12 Aug 2008 17:28:39 -0300, Marcelo Alves
<[EMAIL PROTECTED]> wrote:

>
>  It is a implementation detail. You should not look inside the sqlite file.
>
> 2008/8/12 Gustavo Vera <[EMAIL PROTECTED]>:
> > What's the use of the Z_UUID in the Z_METADATA table?
> > Is some kind of check sum or something like that?
> > CoreData uses this value for something?
> > Why is this value different every time the DB is regenerated?
> > Is the generation of it a random-based one? Or is it based on
> > random+"another thing"?
> >
> > Please don't answer my question with another question!!! At least not at
> > first instance! :D
> >
> > Thanks in advance!
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-12 Thread Shawn Erickson
On Tue, Aug 12, 2008 at 1:17 PM, Gustavo Vera <[EMAIL PROTECTED]> wrote:
> What's the use of the Z_UUID in the Z_METADATA table?

Likely a UUID ("Universally Unique Identifier").

> Is some kind of check sum or something like that?

Not likely.

> CoreData uses this value for something?

Likely.

> Why is this value different every time the DB is regenerated?

Different instance of the database so different unique id, as a guess.

> Is the generation of it a random-based one? Or is it based on
> random+"another thing"?

man uuid

-Shawn
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What's the use of the Z_UUID in the Z_METADATA table?

2008-08-12 Thread Marcelo Alves
  It is a implementation detail. You should not look inside the sqlite file.

2008/8/12 Gustavo Vera <[EMAIL PROTECTED]>:
> What's the use of the Z_UUID in the Z_METADATA table?
> Is some kind of check sum or something like that?
> CoreData uses this value for something?
> Why is this value different every time the DB is regenerated?
> Is the generation of it a random-based one? Or is it based on
> random+"another thing"?
>
> Please don't answer my question with another question!!! At least not at
> first instance! :D
>
> Thanks in advance!
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/marcelo.alves%40redefined.cc
>
> This email sent to [EMAIL PROTECTED]
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


What's the use of the Z_UUID in the Z_METADATA table?

2008-08-12 Thread Gustavo Vera
What's the use of the Z_UUID in the Z_METADATA table?
Is some kind of check sum or something like that?
CoreData uses this value for something?
Why is this value different every time the DB is regenerated?
Is the generation of it a random-based one? Or is it based on
random+"another thing"?

Please don't answer my question with another question!!! At least not at
first instance! :D

Thanks in advance!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]