Kbase P18140: How to create a version 9 structure file?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/07/2009 |
|
Status: Verified
GOAL:
Conceptual understanding of a Version 9 structure file.
GOAL:
How to create a version 9 structure file?
GOAL:
What is an area?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
FIX:
Progress 9 now has a new feature called an AREA.
Each area you define can conceptually be considered a separate database within the larger database you create.
Each separate database (area) follows the rules defined in the older version 8 for a multi-volume database:
1) The maximum number of extents possible for an area is 256 files.
2) There can be only 1 variable extent for a data area and that extent must be the last extent.
3) Tables, indices or both may live in an area.
The way you define areas is through the structure file (.st file).
Several Areas are predefined and must exist in your .st file:
1) All databases must have an area names "Schema Area", always area 6
2) All databases must have a "Primary Recovery Area", also known as the Before Image area, always area 3
3) After you have defined those two mandatory areas you may define upto 993 of your own personal areas.
An example of the sports2000.st file follows with some comments added.
# Here you see that the Primary Recover area is very briefly described by the
# line indicating a variable Before Image file.
b .
# Here you see a data area described. This is the schema area
# and it is the default extent where all your data will be transferred
# if you do not define otherwise within your data definition file.
d "Schema Area":6,32 .
#
d "Employee":7,32 . f 320
d "Employee":7,32 .
#
d "Inventory":8,32 . f 608
d "Inventory":8,32 .
#
d "Cust_Data":9,32 . f 320
d "Cust_Data":9,32 .
#
d "Cust_Index":10,32 . f 320
d "Cust_Index":10,32 .
#
d "Order":11,32 . f 1280
d "Order":11,32 .
#
d "Misc":12,32 . f 320
d "Misc":12,32 .
Each area is given a name within quotation marks.
Each is numbered from 7 (the first area number which can be defined by the user) up to a maximum possible value of 1000.
The d at the beginning of the line defines this a line defining a data area.
The name allows us to more easily think of what we will put into this area later.
The number is necessary from Progress' perspective because internally we deal with the area number but from our command line tools you use the name to reference the area.
The number after the comma signifies the number of records which will be allowed (if they fit) into one block.
Progress allows for any one of the following possible values:
1,2,4,8,16,32,64,128, 256
Depending on the average record size for a particular table you may be able to fit more records into a block for certain tables.
Having more records in a block decreases the time and effort necessary to retrieve the records.
After you define the maximum number of records per block you describe the location that extent is to be placed on the disk structure.
In this example the period (.) is operating system shorthand for the current working directory.
After the location there are 4 possible values that can follow:
1) Nothing else on the line indicates that the extent is variable
2) If there were an r on the line it would indicate the extent was to reside on a raw partition
3) If there were an f on the line it would indicate the extent was fixed in size 4) If there were a v on the line it would indicate that the extent was variable but a number would follow indicating its maximum permitted size.
If the extent was fixed, raw, or had a v type variable extent then a number would follow (measured in K - kilobytes).
The number should be evenly divis.ible by 16..