Computer Knowledge

Database and SQL

4,213 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. Unique Column

  2. Unique Row

  3. A row than can be duplicated

  4. A Column that can be duplicated

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

A primary key is a column (or set of columns) in a database table that uniquely identifies each record. It must contain unique values and cannot contain null values.

Multiple choice
  1. Number

  2. Password

  3. Text

  4. Primary Key

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

VARCHAR stands for Variable Character, which is a data type used to store alphanumeric text strings of varying length.

Multiple choice
  1. Columns

  2. Rows

  3. Varchars

  4. Ints

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

When creating a table, you must define the structure, which consists of the columns and their associated data types.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

The four constraints that can be specified on relational databases are _____________________.

  1. Domain constraints, Key constraints, Entity integrity constraints and Referential integrity constraints.

  2. Key constraints, Database constraints, Normalisation constraints and Referential integrity constraints.

  3. Domain constraints, Database constraints, Normalisation constraints and Entity integrity constraints.

  4. None of these.

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

There are four different constraints, which can be specified on relational databases. They are domain constraints; key constraints; entity integrity constraints and referential integrity constraints.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

Entity integrity constraint states that no ______ key value can be null because it is used to identify individual tuple in a relation.

  1. Secondary

  2. Primary

  3. Partial

  4. Particular

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

Entity integrity constraint is one of the constraints on relational database. It states that no primary key value can be null because it is used to identify individual tuple in a relation. Null value implies that we cannot identify such tuples or identify these as alike. A failure to distinguish them means they are duplicates.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

The integrity constraints, specified on ________, must hold in every database state of that schema.

  1. Database

  2. Database relation

  3. Database schema

  4. Database system

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

It is a merit for special consideration. The integrity constraints, specified on database schema, must hold in every database state of that schema.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

While ______ and ________ constraints are specified on individual relation, the _______ constraint is specified between two or more relations.

  1. Key, Entity, Referential Integrity

  2. Entity, Candidate, Referential Integrity

  3. Key, Attribute, Referential Integrity

  4. Candidate, Referential Integrity, Attribute

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

While key and entity constraints are specified on individual relation, the referential integrity constraint is specified between two or more relations. This constraint is specified to maintain consistency among the tuples in such relations.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

Every relation that has at least one key by default, which is the combination of all its attributes is called _________ by default, which specifies  uniqueness constraint.

  1. Financial key

  2. Super-key

  3. Attribute key

  4. Candidate key

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

Each data record, which corresponds to a tuple of a relation, in a table must be distinct. Every relation has at least one key by default, which is the combination of all its attributes. This key is called super-key by default.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

____________ is defined as that part of super-key from which any attribute cannot be removed without sacrificing the uniqueness constraint.

  1. Super key

  2. Minimal super-key

  3. Candidate key

  4. Attribute key

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

Minimal super-key (also called Key) is defined as that part of super-key from which any attribute cannot be removed without sacrificing the uniqueness constraint.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

___________ operation is carried out to remove a tuple from a relation.

  1. Modify

  2. Delete

  3. Update

  4. Insert

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

There are three basic types of updates: insert, delete and modify. Delete operation is carried out to remove a tuple from a relation. A particular data record from a table can be removed by performing such a operation. The delete operation can violate only referential integrity, if tuple being removed is referenced by foreign key from tuples in the database.

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

_______ operation on Relational Data Model does not cause violation any integrity constraints.

  1. Retrieval

  2. Updates

  3. Data processing

  4. None of the above

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

There are two categories of operations on relational model: updates and retrieval operation on Relational Data Model does not cause violation any integrity constraints. 

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

Which of the following are the constraints of database schemas?
a. Domain constraints, Key constraints, Entity integrity constraints, Referential integrity constraints
b. Domain constraints, Data constraints, Entity integrity constraints, Referential integrity constraints

  1. Only "a"

  2. Only "b"

  3. Both "a" and "b"

  4. None of the above

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

A relational database schema is a set of relation schemas and a set of integrity constraints. There are four different constraints, which can be specified on relational database. These are: domain constraints, key constraints, entity integrity constraints, referential integrity constraints. 

Multiple choice accountancy application of electronic spreadsheet in accounting introduction and importance of ms excel micosoft office rational data model (rdm)

While key and entity constraints are specified on individual relation, the referential integrity constraints is specified between _________ relations. 

  1. one or more

  2. two or more

  3. one or two

  4. none of the above

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

While key and entity constraints are specified on individual relation, the referential integrity constraints is specified between two or more relations. This constraint is specified to maintain consistency among the tuples of such relations.

Multiple choice accountancy accounting software - tally concept of entity and relationship designing and creating simple tables, forms, and queries objective in dbms

Selecting reports from objects list provided by LHS of Database Window and clicking at New object button of tool bar is step ___ in procedure in access for designing a simple.

  1. 1

  2. 2

  3. 3

  4. 4

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

In standard MS Access procedures for creating a new object, selecting the object type and clicking the New button is the initial step to initiate the creation process.