|
|
|
|
|
|
|
|
Download - Interbase Scripts and Stories
|
|
|

|
Marco
Bommeljé searched his hard disk and collected interesting things relating
to Interbase and Firebase. He introduces each of the downloads below.
Employee3.gdb (dialect 3)
Both
Interbase and Firebird ship a Dialect 1 example database. For training purposes,
I made a Dialect 3 version of the EMPLOYEE.GDB. The downloadable zip-file
contains the GBK as well as a readme.txt file with further information on
the changes.
[download]
IBHealth
A
couple of years ago, we got a most peculiar request: whether we could assist
in making a backup of an Interbase database. A strange request, because everyone
knows that making backups should be daily routine. However, this organisation
had been running an Interbase database for over six (!!!) years without ever
running GBAK. Over the years, the database had grown to appr. 12 Gb. The
last employee with any Interbase know-how had left the organisation a couple
of years ago... I left an earlier version of this document as a starters
guide for the newly appointed DBA, who was expert in all things Oracle.
[continue >>]
Where_Used.sql
As
a DBA, I have spent much time reverse-designing databases. Often, databases
are created with a case-tool generated script that is not considered worth
saving. Then, when changes are needed, you have to carefully consider the
impact of the changes. Fortunately, the Interbase catalog tables are really
easy to "read" and query. Analysing dependencies among database objects is
straightforward in most cases.
The not-so-easy-to-trace
dependencies are those that are "hidden" in source code. Database objects
such as triggers, procedures and views are defined in source code that gets
compiled. The dependencies in the compiled code are stored in a separate
catalog table: RDB$DEPENDENCIES. Some additional JOINs make this table easier to interpret.
[continue >>]
ChangeDatabaseOwner.sql
The first time
I resorted to updating Interbase's system tables directly, it made me quite
nervous. However, for some major operations on the database, updating the
system tables seems to be the best of all the worst alternatives. This is
how I changed the ownership of a database...
[continue >>]
ChangeRelationOwner.sql
Once I had changed
the database ownership, doing the same for the ownership of tables, views
and procedures seems easy. This script shows the steps involved. It
works, but it is better to think about security issues at an early stage
of development and avoid having to do these awkward things.
[continue >>]
Department_Tree.sql
Tree
hierarchical structures are a source of religious warfare among database
people. Oracle has introduced a CONNECTING BY clause as a "solution" for
querying tables with a self-association. Joe Celko proposes to model such
structures as "nested sets", which is great for querying, but impossible
to maintain in interactive applications.
Fortunately,
Interbase has SELECT PROCEDUREs that can be programmed to recurse, walk a
tree and return a sensible table structure. This is an example of how to
list the "org chart" of departments in the employee database.
[continue >>]
Marco Wobben's IB/FB tools
Marco Wobben developed a number of smart tools to enable us working more
efficiently with Interbase/Firebird. Each of them is enhanced regularly,
so you need to check frequently for updates.
[continue >>]
|
|
|
 |
 |
 |
|
|
|
(C)2003 - Last updated: 16 Apr 2003 |
|
|
|