Tag: databases

Questions Related to databases

  1. UPDATE the records in the table

  2. MODIFY the data type of the column

  3. DROP the table column

  4. DEFINE a default value for the column

  5. DELETE the records in the table

  6. ADD a new column to the table


Correct Option: B,C,D,F
  1. TRUNCATE is DDL and DELETE is DML

  2. TRUNCATE is DML and DELETE is DDL

  3. TRUNCATE is DCL and DELETE is DML

  4. TRUNCATE is DML and DELETE is DCL


Correct Option: A
  1. Can be defined on a single column or multiple columns in the table.

  2. Can be defined only on a single column in the table.

  3. A UNIQUE index is automatically created once PRIMARY KEY is defined on the table.

  4. A NON-UNIQUE index is automatically created once PRIMARY KEY is defined on the table.

  5. NOT NULL constraint is implicitly enforced on the columns which are part of the PRIMARY KEY

  6. NULL constraint is implicitly enforced on the columns which are part of the PRIMARY KEY


Correct Option: A,C,E
  1. Can be defined only on a single column in the table.

  2. Can be defined on a single column or multiple columns in the table.

  3. A UNIQUE index is automatically created once UNIQUE KEY is defined on the table.

  4. A NON-UNIQUE index is automatically created once UNIQUE KEY is defined on the table.

  5. NULL values are NOT acceptable on the columns, which are part of UNIQUE KEY

  6. NULL values are acceptable, which are part of UNIQUE KEY


Correct Option: B,C,F
  1. Must be defined as a part of column definition

  2. It's NOT necessary to define it as a part of column definition

  3. Can be applied to the column which may hold UNKNOWN data

  4. Can NOT be applied to the column which may hold UNKNOWN data


Correct Option: A,D
  1. Must evaluate to BOOLEAN expression

  2. Not necessarily evaluates to BOOLEAN expression

  3. Requires that a column (or combination of columns) satisfy a condition for every row in the table excluding nulls.

  4. Columns which, are part of CHECK constraint, may accept NULL values

  5. Columns which, are part of CHECK constraint, can NOT accept NULL values


Correct Option: A,C,D
  1. Defines relations between the tables

  2. The table that includes the foreign key is called the dependent or child table

  3. The table that includes the foreign key is called the parent table

  4. The table that is referenced by the foreign key is called the parent table

  5. The table that is referenced by the foreign key is called the dependent or child table


Correct Option: A,B,D