DATABASE PROJECT
Objective:
Throughout the term, you will design and construct a database
pertaining
to your research work, research work in your lab, or some area of
interest withing the topic areas of the course. This project will use
the ACeDB database system. The final product will be a database, which
should be clearly organized, internally consistent and well documented.
1) Try out the
demonstration ACeDB database. Explore the sample database to get a
feeling for how it works. To run the demonstration, type 'acedemo' at the command line.
2) Read A quick guide to
ACeDB for Users (Sanger Centre)
3)
Read 39.769
Lecture 10 Part 2 Section 3 "Object-oriented databases"
4) Design
a schema using TGIF, and the template schema schema_template.obj as a
starting point. Send the schema
to Dr. Fristensky for comment before you implement. Updata your schema
in the file schema.gif
5) Tutorial: Loading
a database, modifying models, and entering data
6) Create your
database, using existing classes from the sample data base as templates
for your own customized classes:
a) Start by deleting
the existing database directory and creating a new, empty database
directory. Make sure this directory is world-readable and
world-executable.
b) Make a copy
of wspec/models.wrm (eg. models.wrm.bak). You can use this file to copy
classes. Now, delete all classes from models.wrm. (You can leave in the
comment lines at the beginning of the file if you wish).
c) Start up
pmgace and reinitialize. An empty database will be created.
d) One at a
time, add classes to models.wrm. You can copy classes from
models.wrm.bak and modify them. At first, it may be best to not even
include all data fields in a class, but to slowly add data fields and
read in the models each time.
e)
During the addition of models, you may discover flaws in your schema,
or things that just make more sense if done another way. Modify your
schema, and modify the models to match the schema.
f) Continue
adding classes until all classes have been successfully read.
Save the
database at each step.
7) Populate the database
with your data. Depending on the data, you can either add data using
the
graphic interface, or by creating and reading .ace files, as shown in
the tutorial. You don't need to create a large database. Just make sure
that each class has at least a few objects to illustrate how your data
classes look and how they fit together.
As you add
data, you may discover that the database would work better if you
change
one or more models. Again, update the schema and the models. When you
change a model, the data fields that no longer fit the model will be
'grandfathered'. That is, the data will be retained in separate fields.
If this occurs, you should re-enter the grandfathered data into the new
fields, and then delete the old fields.
8) When your database is
complete do the following steps:
- Make sure
that all files and directories in the database directory are
world-readable:
cd database
chmod a+r *
- Make sure
that the final version of your schema is on your web site.
- You may
also wish to write an introductory paragraph or two describing your
database.
- Send me an
email message indicating that your database is ready
The
database assignment must be complete by the last day of classes.
Criteria
for evaluation will include:
- Schema is
understandable
- Schema is
a natural representation of real data
- Data
is not duplicated in two different classes
- Classes
are kept as small as is reasonable
- Classes
minimize use of Text and LongText, where data could be represented in
more 'machine-readable' ways
- The
database must be consistent with the schema
- Where
possible, links that can be made should be made. For example, in the
sample database, each Genotype object should point to a Species object,
because all Genotype objects belong to a Species.
- All links
work
- All data
should fit the models ie. no grandfathered data should be present from
earlier versions of the models.
|
Resources:
www.acedb.org
For quick hints
on some common database operations:
ACeDB
HOWTO
The
only really complete and (almost) up to date manual on ACEDB: