You are on page 1of 4

IDMS in brief

Day 1
History. Developed by Cullinet Software Inc Supported by Computer Associates (CA). What is a database? Collection of data. Controlled redundancy Managed access, security and integrity. Why have databases? Reduced redundancy Avoids inconsistency Shared access Reduces programming efforts Supports standards, and complex relationships Storage can be altered in a controlled manner. Types of database models. Four main types Flat files : Data stored in a series of files, with no controls on redundancy. Hierarchical : Can appear as follows A B E F C G

In such a model to navigate from the node G to F one would have to traverse through the root A. Network : Can appear as follows A B E F C G

Thus the principal difference is that we can have a relationship between two nodes at the same level, in this case being F and G.

Relational

: This relates data by grouping in the form of tables.

Consider the principal difference between relational and network models. If you have two entities, say Emp and Grade, in a relational model you would have the concept of a foreign key linking the two entities, thus we could have something like Grade No in the Emp table which links it to a tuple in the Grade table. However for a network model, this relationship would have been implemented without the use of any additional fields in the Emp record. This is done with the use of pointers. Architecture of the database. Databases have three views Internal : This is the physical view, closest to the actual storage of data Conceptual : This is the logical view, given to the community or a group Internal : This is a subset of the conceptual view given to an individual. Illustrated this appears as follows

Internal

Parts of the conceptual view needed for the moment Entity : Data objects, these are called records in IDMS For records it is important to understand this difference Record type : This is the definition of the record, giving its attributes Record instance : This is one occurrence of the record. Relationships : Interactions between data objects, called Sets in IDMS. The internal view Area : This can be thought of in the manner of files Page : In terms of virtual memory, subset of areas Line : Holding a record instance, on each page Book Page Line.

Important: All record instances of one record type will necessarily occur in one area.

Storage attributes of records Length : Records can either be stored as Fixed length : As the name suggests, the entire record instance is stored in a contiguous block of memory, on the line Variable length : Here the root part of the record is stored on the current line, with the remaining part on some other portion of memory. The overhead of retrieval of both parts is with the DBMS. Type Fixed length Advantages Faster access Disadvantages Wasted space, as the DBMS has to skip the current page if there is not enough space on it for storing the current record Access is slowed down May increase I/O's.

Variable length

Better space utilization

Compression: The records can either be stored as Uncompressed : As the name suggests Compressed : This could compress data upto as much as 50%. When to avoid compression Performance is an issue, as decompression is going to take time Short-lived records Small records Packed decimal fields. Record Modes CALC : This mode uses a hashing algorithm to convert the storage key of the record to an address where the record will be stored VIA : When a record, say B is stored via another record, say A, the instances of that record B, say B1, B2, and so on will get clustered around an instance of record A, say A1 Significance of Calc and Via The concept of Owners and Members Owners are stored in the Calc mode : Thus all instances of an owner will be well distributed in the database Members are stored in the Via mode : Thus all instances of the members, belonging to a particular owner, shall be clustered around that owner Result of this manner of storage : Ideally all instances of the owner and members, would get clustered on the same page, and since a page is the unit brought in to the main memory from virtual memory, this would reduce the number of I/O's for accessing a set.

The concept of DBKEY (database key) Unique address location needs to be found for a record instance in the database Use of a combination of line and page numbers Four byte address having 3 (page no) and 1 (line no) Pages are unique across all areas. DIRECT : You specify the dbkey, and if that location is free, the record instance is stored there SEQUENTIAL : Here, the record instances are stored one after the other line by line. Clustering This refers to the coming together of instances of owner records Harmful as all members then have no place to be accommodated on the same page

You might also like