|Relational Database for HP-41 modules|
Message #11 Posted by Raymond Del Tondo on 23 June 2004, 5:26 a.m.,
in response to message #10 by Ángel Martin
I'd vote for a table for the XROM entries.
Following is an excerpt of two tables which could
form the basis for a relational database of ROM pacs.
Since there are more than one module with the same XROM number (XR_ID1),
you'll need a three-fold primary key for the table XROM.
Note that there are pacs with more than one customer order number,
like the X-Functions module.
Each of these has it's own record in the PRODUCT table.
CREATE TABLE PRODUCT
PROD_ID1 VARCHAR (12) PK ; This field is the customer order#
PROD_ID2 VARCHAR (12) AK ; HP internal reorder number
TITLE VARCHAR (80) ; The product title
XR_ID1 FK ; These both fields together relate to all XROM
XR_ID3 FK ; entires for this ROM pac
PRIMARY KEY (PROD_ID1)
FOREIGN KEY (XR_ID1,XR_ID3) REFERENCES TABLE XROM
CREATE TABLE XROM
XR_ID1 SMALLINT PK ; (0-31)
XR_ID2 SMALLINT PK ; (0-63)
XR_ID3 SMALLINT PK ; (0-n) This holds a counter
FcnName VARCHAR (12) ; Fcn names can be more than 7 chars
Description VARCHAR (80)
PRIMARY KEY (XR_ID1,XR_ID2,XR_ID3)
Note this is not real creation code, it only shouldd
give an idea where to start, and where to go.
It has to be refined, and syntax has to be adjusted
for a real world SQL database, like ORACLE, or SQLBase...
Any questions? Feel free to ask;-)
Edited: 23 June 2004, 8:29 a.m.