Subject RE: [firebird-support] system object table
Author Vahan Yoghoudjian
Hi Alan

Thanks for your quick response...

Previously in BDE we used to do the same thing, we had this "registry"
table that used to hold the version number of the data, and like you do,
every time the application had a newer version the update procedure was
started...
But what I want to do there is to improve a little bit of performance,
for instance if the update flag is up the application has to read all the
table definitions in the code field by field, index by index and check if
the current table matches its definitions whereas instead of doing this I
would like to have a version number for each object. I have hundreds of
table in the application, in the new version of the application if only the
definition of one table was changed, I'd like to go directly to that table
and alter it according to the new definition instead of scanning all objects
one by one...

Of course the precaution of being the only user to be connected to the
database at that time is already taken into consideration

Thanks again
Vahan

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]On Behalf Of Alan McDonald
Sent: Friday, June 03, 2005 8:50 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] system object table


> Good Morning
>
> I was trying to find the system table in Firebird that stores
> the object
> names and their properties but could not find it... first of all is there
> such a table in Firebird? and if there is can I restructure it by adding
> fields to it?
>
> My application has all the table definitions hardcoded (also stored
> procedures, UDFs...) whenever I update my application and one of those
> object definitions was modified i want my application to update it
> automatically on the server. The reason why we do this is of
> course is when
> we release new versions we just send the .exe to the client which
> should do
> all the updating work...
>
> I want to store the version numbers given to this objects into a table
> in the database and whenever I launch a new version of the application I
> want the application to scan the object tables to retrieve the
> names of the
> objects that should be Altered and alter them....
>
> Thanks in advance
>
> Vahan

I doubt this is a good recipe. I have a version table. I also have update
scripts in my applications. The app starts and tests the version table
first. if it's higher than the app, the app terminates. if it's lower than
the app then the app runs scripts to update the database. Tools like
database comparer will create the script for you and you run it in a script
component taking necessary precautions against being the only user connected
at the time of the script firing etc.
Alan




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




----------------------------------------------------------------------------
----
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

b.. To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




[Non-text portions of this message have been removed]