Database-MySQL [3i Infotech Placement]: Sample Questions 151 - 152 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 151

Edit

Write in Short

Short Answer▾

What is Relationship set?

Explanation

Understanding of Relationship Sets with Example
  • A relationship set is the set of all relationship instances that participates in any relationship, so as to define a relationship between various participating entity types.
  • For example, 2 entity types employee and department are related Via a relationship type ′ works for ′ .

Question 152

Question

MCQ▾

Find the ODD datatype out

Choices

Choice (4)

a.

VARCHAR2

b.

RAW

c.

BOOLEAN

d.

RECORD

Answer

d.

Explanation

  • Record is a group of related data items stored in fields, each with its own name and datatype.
  • Record variable can hold a table row or some columns from a table row.
  • Record is the ODD datatype.
  • Combination of different scalar datatypes is the record.
  • Visualized as a row of data.
  • Contains all the contents of a row.

Declaring a record:

  • Three ways to declare
    1. Table-based record
    2. Cursor-based record
    3. Programmer-define record
Three Ways to Declare

How RECORD Works

  • We can assign a PL/SQL record to another PL/SQL record.
  • We can assign PL/SQL record NULL value.
  • Used as an argument of parameter in a function
  • We can return record from a function.
  • To check if the record is NULL, we have to check individual fields of the record.
  • To compare two records, we have to compare each individual field of each record.

Developed by: