HP3000-L Archives

January 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Sat, 19 Jan 2002 08:30:42 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
You might try setting up EMPNO as an auto-master controlling the detail set
EMPLOYEE (primary key).  Then DEPARTMENT can be a manual master linked to
the detail set EMPLOYEE too (as a secondary key).  You might even want to
set name in EMPLOYEE as a sort field for dept, so when you retrieve by dept,
the entries will come back to you in name sorted order.

Of course, there are several other methods for setting these sets up
(especially if you have a TPI product), but this is at least one KISS
method.


Hope this helps,


Ray Shahan

> -----Original Message-----
> From: Dave Diaz [SMTP:[log in to unmask]]
> Sent: Saturday, January 19, 2002 1:23 AM
> To:   [log in to unmask]
> Subject:      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 *

ATOM RSS1 RSS2