You should get plenty of answers to this one!
my 2 cents-
You may get away with DEPT as a master completely, as there may not be many
other pieces of data that intersect it, other than Dept no.
I would expect though that Employee will probably need some other indexes of
similar nature to Dept, and one option is to make it a detail - one auto
Master on Employee no gives the indexing to that key, and a another
path(key) to the Dept as a manual master. Dept codes you allocate, and are
generally stable. Employee numbers are less controlled, usually - just
sequential (or Seq with check digit). This only adds a small overhead to
employee retrieval (Find, GET 5 instead of GET 7). Other probable keys that
come to mind - SS no, status (active, terminated etc), payroll type, skill
codes etc etc.
Usually, as soon as I see one or two extra data items that MIGHT want to
selected for, I go for detail, but YMMV.
JP
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
Behalf Of Dave Diaz
Sent: Sat, January 19, 2002 10:23 AM
To: [log in to unmask]
Subject: [HP3000-L] Help with IMAGE question
I am quite familiar with SQL but new to IMAGE. One common data structuring
technique in SQL is the use of a 'secondary index' on a table to provide
fast access by an alternative access path from the primary index, as in ;
create table employee (
empno number (5),
name char (30),
dept char (4)
)
create unique index empix on employee (number);
create index empdep on employee (dept);
create table department (
dept char (4),
depname char (30),
manager number (5)
)
create unique index deptix on department (dept);
This allows all employees of a specific department to be retrieved
efficiently.
What is the best / recommended way to structure this data in IMAGE. If I
have 2 master sets EMPLOYEE and DEPARTMENT I don't think I can make EMPLOYEE
a detail of DEPARTMENT, so I must create a detail set say DEPTEMP which has
items DEPT and EMPNO which is a detail of DEPARTMENT chained on DEPT and
containing the employee number (or record number?) of the EMPLOYEE master.
Have I got this right or have I missed something ?
Dave Diaz
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|