0

databases Online Quiz - 6

Description: databases Online Quiz - 6
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Which of the following is true about DBD ?

  1. multiple DBD s for each database

  2. none of these

  3. cannot be used by DL/I

  4. created by a process called DBDGEN


Correct Option: D

A segment has 3 occurrences for a parent. This segment is called a

  1. multiple

  2. twin

  3. sibling

  4. none of these


Correct Option: B

What information is not included in DBD

  1. access method

  2. segment name

  3. parameter

  4. key field length


Correct Option: C
  1. network

  2. relational

  3. hierarchical

  4. object-oriented


Correct Option: C

What is the advantage of IMS DB?

  1. Faster access

  2. easy implementation

  3. high flexibility

  4. simple management


Correct Option: A

Which of the following is true about DBD ?

  1. multiple DBD s for each database

  2. cannot be used by DL/I

  3. created by a process called DBDGEN

  4. none of these


Correct Option: C

A segment has 3 occurrences for a parent. This segment is called a

  1. multiple

  2. twin

  3. sibling

  4. none of these


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Multiple - This option is incorrect because the term "multiple" is not used to describe a segment with 3 occurrences for a parent.

Option B) Twin - This option is correct because the term "twin" is used to describe a segment with 3 occurrences for a parent. In genetics, twins refer to two offspring produced from the same pregnancy. In the context of segments, a twin segment refers to a segment that occurs three times for a parent.

Option C) Sibling - This option is incorrect because the term "sibling" is not used to describe a segment with 3 occurrences for a parent. In genetics, siblings refer to individuals who share at least one common parent.

Option D) None of these - This option is incorrect because option B, "twin," is the correct answer.

The correct answer is B) Twin. This option is correct because it accurately describes a segment with 3 occurrences for a parent.

IMS Db uses what kind of database management

  1. network

  2. relational

  3. hierarchical

  4. object-oriented


Correct Option: C

What is the advantage of IMS DB?

  1. Faster access

  2. easy implementation

  3. high flexibility

  4. simple management


Correct Option: A
  1. multiple DBD s for each database

  2. none of these

  3. cannot be used by DL/I

  4. created by a process called DBDGEN


Correct Option: D

A segment has 3 occurrences for a parent. This segment is called a

  1. multiple

  2. twin

  3. sibling

  4. none of these


Correct Option: B
  1. access method

  2. segment name

  3. parameter

  4. key field length


Correct Option: C

Proc opt for path call

  1. C

  2. P

  3. D

  4. K

  5. L


Correct Option: B

Which of the following are not mentioned in PSB

  1. Number of sensitive segments

  2. dataset

  3. Segment name

  4. Key value


Correct Option: B

SENSEG NAME=CUSTOMER,PARENT=0, PROCOPT=K Referring to the code above, what is the purpose of the SENSEG statements?

  1. To provide the database name

  2. To name the fields in the DBD

  3. To tell the program the data field segment sense sizes during any process stage

  4. To identify the segments in the database to which the application program is sensitive


Correct Option: D

You issue a GNP call from a program and receive a status code of GP. Referring to the above scenario, which one of the following describes the cause of this error?

  1. The segment level specified is not lower than the level of the established parent.

  2. There are no more segments for this message.

  3. The program has issued a call where no parent segment exists.

  4. An invalid length has been detected on a variable length record.


Correct Option: C

AI Explanation

To answer this question, you need to have an understanding of the GNP (Generalized Node Program) and the possible status codes it can return.

The GNP is a program that is used to manipulate hierarchical data structures called segments. When you issue a GNP call from a program, you can receive various status codes as a response, indicating the success or failure of the operation.

In this scenario, the status code received is GP, and the cause of this error is described as:

C. The program has issued a call where no parent segment exists.

This means that the program has attempted to perform an operation on a segment without a valid parent segment. In a hierarchical structure, segments are organized in a parent-child relationship, where a child segment is nested within a parent segment. In order to perform operations on a child segment, a valid parent segment must exist.

Since the program issued a call where no parent segment exists, the GP status code is returned to indicate this error.

Therefore, the correct answer is C. The program has issued a call where no parent segment exists.

The first statement in a COBOL IMS program

  1. DLITCBL

  2. CBLTDLI

  3. GOBACK

  4. PCB mask

  5. DBD


Correct Option: A

AI Explanation

To answer this question, we need to understand the different elements involved in a COBOL IMS program.

Option A) DLITCBL - This option is incorrect. "DLITCBL" is not a valid COBOL IMS program statement.

Option B) CBLTDLI - This option is incorrect. "CBLTDLI" is not a valid COBOL IMS program statement.

Option C) GOBACK - This option is incorrect. "GOBACK" is a COBOL statement used to terminate a program, but it is not specific to IMS programs.

Option D) PCB mask - This option is incorrect. "PCB mask" refers to the Program Control Block (PCB) mask used in IMS programs, but it is not the first statement in a COBOL IMS program.

Option E) DBD - This option is incorrect. "DBD" refers to the Database Descriptor (DBD) used in IMS programs, but it is not the first statement in a COBOL IMS program.

The correct answer is A) DLITCBL. This option is correct because "DLITCBL" is the first statement in a COBOL IMS program. It is used to initiate the IMS environment and establish communication between the COBOL program and the IMS database.

What is the difference in coding between inserting segments into an existing database and loading a database?

  1. The SSA must be qualified

  2. There is no difference.

  3. The key sequence of the data in loading

  4. There is no need for parentage in loading.

  5. The PCB processing options


Correct Option: E

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) The SSA must be qualified - This option is incorrect because it does not address the difference in coding between inserting segments into an existing database and loading a database.

Option B) There is no difference - This option is incorrect. There is a difference in coding between inserting segments into an existing database and loading a database.

Option C) The key sequence of the data in loading - This option is incorrect. The key sequence of the data does not necessarily determine the difference in coding between inserting segments and loading a database.

Option D) There is no need for parentage in loading - This option is incorrect. The need for parentage in loading a database depends on the specific requirements of the database and the relationships between the data.

Option E) The PCB processing options - This option is correct. The difference in coding between inserting segments into an existing database and loading a database can be related to the PCB (Program Control Block) processing options. The PCB defines the access path to the database and can affect how the data is loaded or inserted.

The correct answer is E) The PCB processing options. This option is correct because it highlights the potential difference in coding when dealing with the PCB processing options between inserting segments and loading a database.

CALL ‘CBLTDLI’ USING ‘GU ‘ LS-PCB-MASK, WS-IO-AREA SEGMENTA*P SEGMENTC Based on above code what will be retrieved

  1. Will retrieve segment C and parentage will be set at segment C

  2. Will retrieve segment C and parentage will be set at segment A

  3. Will retrieve segment A and parentage will be set at segment A

  4. Will retrieve segment A and parentage will be set at segment C

  5. Error out


Correct Option: B

AI Explanation

To answer this question, we need to understand the purpose of the CALL statement and the parameters being passed.

In this code snippet, the CALL statement is used to call a subroutine named 'CBLTDLI'. The USING phrase is used to pass parameters to the subroutine.

The parameters being passed are:

  • 'GU ' - This is a control option indicating that the utility function should be performed.
  • LS-PCB-MASK - This is a parameter used to specify which segments should be included in the retrieval.
  • WS-IO-AREA - This is a parameter used to pass the input/output area for the utility function.

Now, let's analyze the options:

Option A) Will retrieve segment C and parentage will be set at segment C - This option is incorrect. According to the code snippet, the segment to be retrieved is determined by the value of the LS-PCB-MASK parameter, not by the CALL statement. The parentage refers to the relationship between segments, and it is not mentioned in the code snippet.

Option B) Will retrieve segment C and parentage will be set at segment A - This option is correct. The LS-PCB-MASK parameter is passed to the subroutine, indicating that segment C should be retrieved. The parentage, which refers to the relationship between segments, is not specified in the code snippet.

Option C) Will retrieve segment A and parentage will be set at segment A - This option is incorrect. The LS-PCB-MASK parameter is passed to the subroutine, indicating that segment C should be retrieved, not segment A.

Option D) Will retrieve segment A and parentage will be set at segment C - This option is incorrect. The LS-PCB-MASK parameter is passed to the subroutine, indicating that segment C should be retrieved, not segment A.

Option E) Error out - This option is incorrect. There is no indication in the code snippet that an error will occur.

Based on the analysis above, the correct answer is B) Will retrieve segment C and parentage will be set at segment A. This option aligns with the code snippet provided.

What status code is returned when a segment insert attempted duplicate insert?

  1. LS

  2. A

  3. IS

  4. L

  5. II


Correct Option: E
- Hide questions