everything is a file. you create a db with:
CREATE-FILE [DB_NAME] 3 43In the above the 3 and 43 are modulos??? and somehow represent the size of the file as well as the file dictionaly. The command above basically creates a file as well as a file dictionary or a specification on the schema if you will. Now to create the schmea:
[ED|DE] DICT PEOPLE P-ID
in above it's either ED or DE. Then enter the command
I
This will put you in an inline insert mode. Have to refer to the MVBase docs for specifics but the following:
>001 A 002 1 003 Customer ID 004 005 006 007 ML(#-####-####) 008 009 L 010 12
The main thing here is 002 which is the order in which this fields shows up and 003 which is the header. 007 is the formatting of the text, 009 is justification and 010 is the width allocated in the command prompt for the column.
After this is done we need to create a data file for the dictionary like so:
>ED DATA PEOPLE [id][id] can be anything it's just the name that you give the file. The important thing about this datafile is that it has to match the dictionary file. If in the DICT file you state on 002 that this field is item 1 then this the value in the data file NEEDS to be on the first line like so
>001 Arash
Lasty you query the file like so
>LIST PEOPLE FIRST-NAMEwhich should result in
>PEOPLE......First Name... ASHARI Arash
Next up....connecting and retriving this from Java! =)
No comments:
Post a Comment