What is the meaning of "Currency ????" ?- The current location in the database is known is Currency.
- IDMS/R maintains pointers to keep track of the location identification in the database.
- Pointers are maintained by IDMS/R to a number of different record occurrences as each run unit executes.
- IDMS/R maintains a Currency Table for each run unit.
- IDMS/R maintains four types of currency tables for every run unit.
- Most recent record occurrence of each record type is identified by db-key. IDMS/R maintains unique record currency for each record.
- This is the most recent record occurrence of every set that is accessed by the program. Separate currency key for each set is maintained by IDMS/R.
- Area currency is the most recent record occurrence of every area that is accessed by the program. Separate currency for each area is maintained by IDMS/R.
Run Unit Currency:
- RUC is the database key of the most recent record occurrence that is accessed by the program.
What is a database?- Def: Database is a collection of organized information.
- Database should have the property of controlled redundancy.
- Security and integrity should be managed by the database.
Types of database models.
- Database models are of four types:
1. Flat files:
- The whole data is persisted in a series of files without controls and redundancy.
2. Hierarchical Database:
- The database architecture resembles a tree structure.
3. Network Database:
- The network database architecture resembles that of hierarchical database with some variations.
- The main difference is that a relationship between two nodes at the same level, say F and G (siblings) can be established;
4. Relational Database:
- In relational database, the data is represented in the form of tables.
What are storage attributes of records?- The following are the storage attributes of records:
Length : Records can either be stored as fixed length or variable length.
a. Fixed length : The whole record instance is persisted in a contiguous block of memory on the line
b. Variable length : The root part of the record is persisted on the current line. The remaining part of the record is persisted on some other part of the memory.
Difference between Fixed length and Variable length records.- Fixed length records access is faster.
- Variable length records maintains better utilization of space.
2. Compressed : Records can be stored as compressed or uncompressed format.
a. Compressed : The record’s data can be compressed upto 50%.
b. Uncompressed: The records are represented as they are.
What is DBKEY? Explain.- The DBKEY is used for identifying the record instance in the database in a unique address location.
- It is the combined usage of line and page numbers.
- A four byte address has 3 and 1, where 3 is the page nos and 1 is the line no.
- Pages are always unique across all the areas.
- DIRECT ACCESS: When the dbkey is specified, the record is persisted, if the location is free.
- SEQUENTIAL ACCESS: The instances of records are persisted one after the other, and line by line.
What is the difference between local and central version operating modes?The following are the differences between local and central operating modes:
- A batch program, which is operates in local mode, has its own copy of IDMS DBMS loaded into its address space.
- It is suggested for Batch Retrieval programs.
- The operation of local mode is faster.
- When the records are updated, offline areas are taken. Other users have no access to the database even in retrieval mode.
- JCL can run in any of the regions.
- A single copy of IDMS DBMS will control various operations of a particular IDMS set application programs run unit.
- All CCOBOL/Online are to be used only Central Version.
- The operations of local mode is slow
- There is no need of taking offline area.
- Concurrent users can access the same area at a time.
- JCL mandatorily run in a particular region.
Name and explain the three location modes?The three location modes are calc, via and direct:
- The values of any field of a record is converted into a combination of page no and line no.
- This process is implemented by means of a hashing algorithm.
- A record can be accessed directly .
- The member is persisted near to the owner .
- The member can be accessed only by owner.
- The storage location is specified in the application program.
What is an area sweep and when is it used?- IDMS/R scans through all the available records in an area in physical sequence, while performing an area.
- The order of records retrieval will have little bit of relationship to some logical sequence of records.
- Area sweeps are utilized when all the records need to be retrieved in an area irrespective of the order.
- Extraction jobs are commonly implemented by Area sweeps.
What is OOK-Rec?- The full form of OOK is One Of a Kind.
- It is the meta schema record of IDD.
- The IDD meta schema is generation at the time of installation.
- For every database different name is given and there will be one OOK record that holds the database name and other information.
What is a junction record?- A member record type.
- Allows many-to-many relationship between its 2 owner records.
- For example, for a company database, DEPARTMENT record is a junction record for the EMPLOYEE and PROJECT record types.
What is a set? What pointers are required, what are possible? How may sets be ordered?- A set is known as a owner record.
- Members records can be included in owner record.
- There are three types of pointers are required:
1. next, prior and owner.
2. only next is required.
3. The possible order of arrangements of sets are five; they are:
i. first – inserts at the beginning.
ii. last – inserts at the end.
iii. next – inserts after the current record.
iv. prior – inserts prior to the current record.
v. sorted – inserts as per the sort value.
Distinguish among erase, erase permanent, erase selective and erase all?- Erase : Cancels the record’s membership in a specified set of occurrences.
Named records only will be removed.
- Erase Permanent :
Deletes the specific record.
Deletes owned mandatory occurrences.
Disconnects all the optional members.
- Erase Selective :
Deletes the record.
All mandatory members are deleted.
All optional members not connected to the remaining sets will be removed.
- Erase All : Deletes a specified records, mandatory records and optional records.
Explain about few error status codes of IDMS.
- All error codes are of 4 characters.
- First two are called as:
2. MinorMAJOR CODES:
|00||All the DML Statements|
|Code||Database Function Status|
|00||Successful completion of the DML operation, if combined with major code 00. Incomplete DML operation , if combined with major non zero.|
|01||When combined with major code 16, the IF operation yields a false value.|
|02||The db-key is used either FIND/OBTAIN or direct db-key is suggested for a STORE.|
|05||Violation of the specified DML function is caused a duplicates-not-allowed option for a CALC, sorted or index set.|
|06|| Indicates the non establishment of the currency for the named record / set / area.|
Discuss some of the terminology of IDMS.- The following are some of the IDMS jargon:
a. DBKEY: It is a 4 byte key, typically 3 byte page number and 1 byte line index, used to uniquely identify each physical stored IDMS record.
b. AREA: Represents a range of IDMS pages used to persist IDMS data. The critical factors are starting-page, number of pages, and page-size.
c. FILE: IBM data set is represented as a FILE. Various areas are mapped to different files on one-to-one, one-to-many or many-to-one basis.
d. DMCL: Journals, buffers and files for an IDMS system are tied together. One global DMCL for a CV is always available. Local jobs have custom tailored. The DMCLs are managed by the DBAs
e. CV vs Local: The batch jobs are run under Central Version or in Local mode
Central Version provides lock protection facility A backup is needed before running a local-update job.
Various report jobs will run in local mode
f. Schema/Sub Schema: A schema has logical database definition
A sub schema is a sub set of schema. One batch program should refer for one schema/ sub schemaEvery batch program must refer to one sub schema / schema.
What is Integrated Data Dictionary?- IDD’s prime requirement is to maintain the database definitions.
- IDD was interfaced by DBAs and other designated users using a database language known as Data Dictionary Definition Language(DDDL).
- IDD is used even to store definitions and code for various other products of IDMS such as ADS/Online and IDMS-DC.
- The power of IDD is the extensibility that could be utilized for creation of definitions of anything. Certain enterprises uses IDD for the development of in-house documentation.
Explain about logical data model of IDMS.- The logical data model is the data model offered to CODASYL(Conference On Data System Languages).
- The prime structure of this model is records and sets.
- All the records essentially follows COBOL pattern, consisting of fields of different types, which allows internal structure, like repeating items and groups.
- The most distinctive structure is the 'set'.
- The ‘set’ represents a one-to-many relationship among records – one owner and many members.
- A record can be a member in different sets, which is the key factor for distinguishing network model from hierarchical models.
- Each set belongs to a set identified by a name. Every set is an ordered sequence of records.
- A record is an owner and member of any number of sets.
- The database key is directly related to the physical address of the record on a disk.
- Records could be accessed directly by using database key, followed by set of relationships or by direct access using the key values.
Explain Storage architecture of IDMS.- The organization of databases is in terms of files.
- The files are mapped to areas , which are pre-formatted.
- The areas are subdivided into pages.
- Each page corresponds to physical blocks on the disk.
- A fixed number of pages is allotted in a file for each area by the DBA, and defines the records to be stored in each area and how they are to be stored.
- The free space is only tracked for all the pages in order to reduce I/O requirements.
What methods are available for persisting records in an IDMS database? Explain.- There are four methods are available for persisting records in an IDMS database.
- The target is specified by the user and persists as close as possible to that page.
- The records are simply places each record at the end of the area.
- A hashing algorithm is utilized for deciding the place of the record.
- The hash key provides an efficient retrieval of the records.
- The CALC records are linked to the page of CALC owner record by utilizing a single link-list.
- VIA attempts to store a record near its owner in a particular set.
- The records are clustered on the physical page as the owner
- The records are persisted in a different IDMS areas, yet remain clustered together for efficiency.