Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Format

More

Examples

map-name

store-clause

change-relation-map-clause

WITH_LIMIT_OF

area-name

rel name

rel name field name

USING field-name

PLACEMENT_VIA_INDEX

NO_PLACEMENT_VIA_INDEX

COMPRESSION clause

REORGANIZE clause

RDB/VMS Relational Database Operator CHANGE_STORAGE_MAP — VMS RDB_4.0

 Changes the storage map definition for a relation.  You can also
 change which index Rdb/VMS uses when it stores new records whether
 records will be stored in a compressed format, and whether data will
 be reorganized.

Additional information available:

FormatMoreExamples

Format

 CHANGE STORAGE MAP map-name ──>──┐
 ┌────────────────────────────────┘
 └─┬────────>─────────┬─┬────────────────>──────────────┬─┐
   └─> store-clause ──┘ └─> change-relation-map-clause ─┘ │
 ┌───────────────────────────<────────────────────────────┘
 └─> 
E

N

D
─────┬────────>──────┬─────> typebox (S)typebox (T)typebox (O)typebox (R)typebox (A)typebox (G)typebox (E) typebox (M)typebox (A)typebox (P) ────> . └─> map-name ───┘

Additional information available:

map-namestore-clausechange-relation-map-clause

map-name

 The name of the storage map you want to modify.

store-clause

 store-clause =

 STORE ──┐
 ┌───────┘
 └┬> 
W

I

T

H

I

N
┬> area-name ┬────────────────────>─────────────┬┬─> typebox (;) ┬─┬─> │ │ └> 
F

O

R
─┬┬┬> rel-name ─┬───────────┤│ │ │ │ │ ││└─── , <─────┘ ││ │ │ │ │ │└┬> rel-name.field-name ─┬┘│ │ │ │ │ │ └───────── , <──────────┘ │ │ │ │ │ └──────────── , <───────────┘ │ │ │ └────────────────────────<─────────────────────────────┘ │ └> 
U

S

I

N

G
─┬─> field-name ─┬─> 
W

I

T

H

I

N
──────>──────┐ │ └─────── , ─────┘ │ │ ┌───────────────────────<────────────────────────┘ │ └┬─> area-name ─> 
W

I

T

H

L

I

M

I

T
typebox (O)F ─┬> literal ─┬─> typebox (;) ─┬─┐ │ │ └──── , <───┘ │ │ │ └───────────────────<──────────────────────────────┘ │ │ ┌─────────────────────────<───────────────────────────┘ │ └───────> area-name ───────────>──────────────────────────────────┘

Additional information available:

WITH_LIMIT_OF

area-namerel namerel name field nameUSING field-name

area-name

 The name of the storage area you want records stored in.  You must
 define this storage area with the DEFINE DATABASE statement before
 you refer to it in the store clause.

rel name

 The name of the relation whose segmented strings you want to store in
 the specified storage area.  If you want to store the segmented
 strings of more than one relation in the storage area, separate the
 names of the relations with commas.

rel name field name

 The name of the relation and segmented string field that you want to
 store in the specified storage area.  If you want to store more than
 one segmented string field in the storage area, separate the list
 items with commas.

USING field-name

 The names of the fields whose values will be used as limits for
 partitioning the relation across multiple storage areas.  Rdb/VMS
 compares values in the fields to the values in the WITH LIMIT OF
 clause to determine where to initially store the record.

WITH_LIMIT_OF

 The maximum value for the index key that will reside in the specified
 storage area.

 The number of literals in this clause must be the less than or equal
 to the number of fields in the USING clause.  Repeat this clause to
 partition the index entries among multiple storage areas.

 When you define a multisegmented index using multiple keys and use
 the STORE USING...WITH LIMITS clauses, if the values for the first
 key are all the same, then set the limit for the first key at that
 value.  By doing this, you ensure that the value of the second key
 determines the storage area in which each record will be stored.

 Note that the last storage area you specify CANNOT have a WITH LIMIT
 OF clause associated with it.

 If you change the limits for a storage area, records that were
 already stored in the area are not moved according to the new limit
 clause.  However, new records will be stored into the relation
 according to the new limits you specify.

change-relation-map-clause

 change-relation-map-clause =

 ──┬┬─> 
N

O

P

L

A

C

E

M

E

N

T

V

I

A

I

N

D

E

X
───────────────┬─> │└─> 
P

L

A

C

E

M

E

N

T

V

I

A

I

N

D

E

X
──> index-name ──┤ ├┬─> 
D

I

S

A

B

L

E
──┬─> 
C

O

M

P

R

E

S

S

I

O

N
────────────┤ │└─> 
E

N

A

B

L

E
───┘ │ └──> 
R

E

O

R

G

A

N

I

Z

E
─────┬──────>────┬─────────┘ ├─> 
A

R

E

A

S
──┤ └─> 
P

A

G

E

S
──┘

Additional information available:

PLACEMENT_VIA_INDEXNO_PLACEMENT_VIA_INDEX

COMPRESSION clauseREORGANIZE clause

PLACEMENT_VIA_INDEX

 Indicates that Rdb/VMS should attempt to store a record in a way that
 optimizes access to that record via the indicated path.  Rdb/VMS
 chooses a target page for any record being stored by rules that take
 into account the type of index defined (sorted or hashed), the type
 of storage areas involved (uniform or mixed), and how indexes and
 relations are assigned to each other.

 The index named in the PLACEMENT VIA INDEX clause must be defined for
 the same relation that the storage map is being defined for.

NO_PLACEMENT_VIA_INDEX

 Negates the PLACEMENT VIA INDEX clause, so that subsequent records
 stored are not stored via the index named in the PLACEMENT VIA INDEX
 clause.  This option is only available on the CHANGE STORAGE MAP
 statement.  If you specify the CHANGE STORAGE MAP statement without
 the PLACEMENT VIA INDEX option or the NO PLACEMENT VIA INDEX option,
 the statement executes as if the clause specified on the DEFINE
 STORAGE MAP statement or last CHANGE STORAGE MAP statement had been
 used.

COMPRESSION clause

 Specifies whether data compression will be enabled or disabled for
 the records when they are stored.  ENABLE COMPRESSION is the default.

REORGANIZE clause

 Causes rows previously stored in specified relations to be moved
 according to the partitions specified in the CHANGE STORAGE MAP
 statement.

More

 To change a storage map for a relation with the CHANGE STORAGE MAP
 statement, you need the Rdb/VMS CHANGE privilege for the relation.

 If the database is created with the DICTIONARY IS REQUIRED option,
 you must invoke the database by path name, rather than file name,
 before you issue this statement.

 You must specify either a store-clause, a [NO]PLACEMENT VIA INDEX
 clause, a REORGANIZE clause, or a COMPRESSION clause in a CHANGE
 STORAGE MAP statement.

 In the change-relation-map-clause, you can select one or more of the
 three clauses ([NO]PLACEMENT VIA INDEX clause, REORGANIZE clause, or
 COMPRESSION clause) in any order, but you cannot repeat a clause.
 Note that when the REORGANIZE clause is used, records are moved and
 assigned to new dbkeys.

 If you omit the store-clause in the CHANGE STORAGE MAP statement, you
 can create a second index by mistake.

 You must execute this statement in a read/write transaction.  If
 there is no active transaction and you issue this statement, Rdb/VMS
 starts a read/write transaction implicitly.

 Other users are allowed to be attached to the database when you issue
 the CHANGE STORAGE MAP statement.  However, they are not allowed to
 be using the relation whose map is being changed.

Examples

 Example 1

 The following example disables compression for the CANDIDATES_MAP
 storage map:

 RDO>  CHANGE STORAGE MAP CANDIDATES_MAP
 cont>   DISABLE COMPRESSION
 cont> END CANDIDATES_MAP STORAGE MAP.

 Example 2

 The following example assigns new limits for storage areas:

 RDO>  CHANGE STORAGE MAP EMPLOYEES_MAP
 cont>  STORE USING EMPLOYEE_ID
 cont>    WITHIN EMPIDS_LOW WITH LIMIT OF "00300";
 cont>           EMPIDS_MID WITH LIMIT OF "00600";
 cont>           EMPIDS_OVER
 cont> END EMPLOYEES_MAP STORAGE MAP.

 Current data will not be moved according to the new limits.  However,
 when new data is stored, it will be stored according to the new
 limits in the storage map.

 Example 3

 The following example defines a new storage area EMPIDS_MID2 to
 handle the employee IDs 600-900, and to reorganize the data from one
 existing storage area, EMPIDS_OVER.  The current data which is stored
 within the limits of employee IDs 601-900 will be moved according to
 the new limits.  When the new data is stored, it will be stored
 according to the new limits set in the storage map definition.

 RDO> CHANGE STORAGE MAP EMPLOYEES_MAP
 cont>  STORE USING EMPLOYEE_ID
 cont>        WITHIN EMPIDS_LOW WITH LIMIT of "00300";
 cont>           EMPIDS_MID WITH LIMIT OF "00600";
 cont>           EMPIDS_MID2 WITH LIMIT OF "00900";
 cont>           EMPIDS_OVER
 cont>           REORGANIZE
 cont> END EMPLOYEES_MAP STORAGE MAP.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026