Computer Knowledge

Database and SQL

3,929 Questions

Master structured query language commands, database joins, table constraints, and alias generation. This section covers relational database management concepts and query outputs essential for technical aptitude. These technical questions feature prominently in banking IT officer exams and computer knowledge sections.

SQL queries and aliasesDatabase table constraintsDatabase joins and transformationsStored procedures and functions

Database and SQL Questions

Multiple choice
  1. Primary key and foreign key of a database are not the same.

  2. Structure of the database is not defined during the database construct.

  3. Users are not affected by changes to the structure of the database.

  4. Structure of the database can be altered by anyone.

  5. Changes made to the physical structure is affected to the logical structure of the database.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct meaning of the data independence property of the database, as users are not affected by changes made to the structure of the database.

Multiple choice
  1. The name should not contain more than 16 characters.

  2. The name must start with a letter.

  3. The name can contain letters, numbers and underscores.

  4. The name should not contain spaces.

  5. The table name may contain any special character other than underscore.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

This is not the correct statement as no other special character other than underscore can be be used to name any table in a database.

Multiple choice
  1. In 2nd NF, primary key contains multiple attributes.

  2. In 3 NF, a relation is decomposed and set up a new relation for each partial key.

  3. A functional dependency exists only when both constraints functionally dependent on each other.

  4. All of the above.

  5. Only (1) and (3).

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

All are the true statements.

Multiple choice
  1. The database system can apply the DML (Data Manipulation Language) operations on multiple rows simultaneously.

  2. The application programs affect on account of any operation in the changes in the disk storage.

  3. The application programs will remain unimpaired in case of data are physically centralized or distributed.

  4. The integrity constraints can not be applied on application programs.

  5. Both (2) and (4).

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is false as Codd specify the 'Physical data independence rule so any change in the storage can not affect the programs.

Multiple choice
  1. BCNF is the higher version of third normal form (3NF).

  2. A database design is in BCNF if each entity in the set constitute the design.

  3. BCNF performs dependency preservation.

  4. All of the above.

  5. Both (2) and (3).

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Every BCNF decomposition is not dependency preservation. It means that one attribute in the relational schema does not include dependency.