2025 |170 QUESTIONS WITH ACCURATE SOLUTIONS
1. If you wanted to modify the SQL command to include only employees
with a salary between 50000 and 70000, which of the following
commands would be correct?
SELECT name, salary FROM Employee WHERE salary > 50000
AND salary < 70000 ORDER BY salary ASC;
SELECT name, salary FROM Employee WHERE salary BETWEEN
50000 AND 70000 ORDER BY salary DESC;
SELECT name, salary FROM Employee WHERE salary >= 50000
AND salary <= 70000 ORDER BY salary DESC;
SELECT name, salary FROM Employee WHERE salary > 50000
ORDER BY salary ASC;
2. What is the term for an index where 0 or 1 indicates whether the attribute
of a row has the possible values?
Unique index.
Hierarchical index.
Bitmap index.
Binary index.
3. Which term identifies an ordered collection of elements enclosed in
parenthesis in a tablespace?
Column
Field
Tuple
Cell
,4. Which statement about a FOREIGN KEY constraint is true?
An index is automatically created for a FOREIGN KEY constraint.
A FOREIGN KEY constraint allows that a list of allowed values be
checked before a value can be added to the constrained column.
A FOREIGN KEY column can have a different data type from the
primary key column that it references.
A FOREIGN KEY constraint requires the constrained column to
contain values that exist in the referenced Primary or Unique
key column of the parent table. (*)
5. Describe the role of the EQUIJOIN in SQL and how it differs from other
types of joins.
An EQUIJOIN only retrieves rows from one table.
An EQUIJOIN retrieves rows with matching values in specified
columns from both tables.
An EQUIJOIN is used to join a table to itself.
An EQUIJOIN combines all rows from both tables regardless of
matching values.
6. Which SQL function is used to find the smallest value in a set of values?
SUM
AVG
MIN
COUNT
7. Which wildcard character is used to represent zero or more characters
when searching for a specified pattern using a LIKE operator?
<
%
, >
-
8. Describe the role of foreign key constraints in a relational database.
Foreign key constraints are primarily used for indexing purposes.
Foreign key constraints allow any value to be inserted into a
foreign key column without restrictions.
Foreign key constraints are used to delete records from a table
without any conditions.
Foreign key constraints ensure referential integrity by restricting
the values that can be inserted into a foreign key column based
on the values in the referenced primary key column.
9. A database table called Patients contains a Patient_ID column. What type
of database key is the Patient_ID?
Foreign key
Composite key
Primary key
Superkey
10. Describe the main focus of conceptual design in database development.
Conceptual design is concerned with optimizing database
performance through indexing.
Conceptual design focuses on defining the database
requirements and structure without being tied to any specific
database technology.
Conceptual design is the process of creating entity-relationship
diagrams.
, Conceptual design involves the physical implementation of the
database on a specific system.
11. What is the primary characteristic of a primary key in a database?
Numeric
Null
Duplicate
Not Null
12. What type of index organizes column values and row pointers in a
hierarchical structure?
Dense index
Multi-level index
Secondary index
Sparse index
13. What is the purpose of Data Control Language (DCL) in SQL?
To manage database access
To define database structure
To query data from the database
To manipulate data within the database
14. Which statements may be rejected when a foreign key constraint is
specified?
INSERT
SELECT
ORDER BY
CHECK