Advanced SQL
Q. In a DBMS architecture, what does the term 'data independence' refer to?
A.
The ability to change the data structure without affecting the application
B.
The ability to access data from multiple sources
C.
The ability to store data in different formats
D.
The ability to secure data from unauthorized access
Show solution
Solution
Data independence refers to the ability to change the data structure without affecting the applications that use the data.
Correct Answer: A — The ability to change the data structure without affecting the application
Learn More →
Q. In an ER diagram, what does a diamond shape represent?
A.
Entity
B.
Attribute
C.
Relationship
D.
Weak entity
Show solution
Solution
In an ER diagram, a diamond shape represents a relationship between entities.
Correct Answer: C — Relationship
Learn More →
Q. In an ER model, what does a diamond shape represent?
A.
Entity
B.
Attribute
C.
Relationship
D.
Weak Entity
Show solution
Solution
In an ER model, a diamond shape represents a relationship between entities.
Correct Answer: C — Relationship
Learn More →
Q. In DBMS architecture, what does the term 'physical data independence' refer to?
A.
The ability to change the logical schema without changing the physical schema
B.
The ability to change the physical storage without affecting the logical schema
C.
The ability to access data from multiple sources
D.
The ability to enforce security measures
Show solution
Solution
Physical data independence refers to the ability to change the physical storage of data without affecting the logical schema.
Correct Answer: B — The ability to change the physical storage without affecting the logical schema
Learn More →
Q. In SQL, which clause is used to filter records after grouping?
A.
WHERE
B.
HAVING
C.
GROUP BY
D.
ORDER BY
Show solution
Solution
The HAVING clause is used to filter records after grouping in SQL.
Correct Answer: B — HAVING
Learn More →
Q. In the context of DBMS architecture, what does 'three-tier architecture' refer to?
A.
Data, Application, Presentation
B.
Client, Server, Database
C.
User, Application, Database
D.
Data, Logic, User Interface
Show solution
Solution
Three-tier architecture in DBMS refers to the separation of data, application logic, and presentation layers into three distinct tiers.
Correct Answer: A — Data, Application, Presentation
Learn More →
Q. What does the term 'concurrency control' refer to in a DBMS?
A.
Managing multiple database connections
B.
Ensuring data consistency during simultaneous transactions
C.
Optimizing query performance
D.
Backing up data
Show solution
Solution
Concurrency control refers to the management of simultaneous operations on a database without conflicting.
Correct Answer: B — Ensuring data consistency during simultaneous transactions
Learn More →
Q. What is a foreign key in a relational database?
A.
A key that uniquely identifies a record
B.
A key that links two tables together
C.
A key that is used for indexing
D.
A key that is automatically generated
Show solution
Solution
A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table.
Correct Answer: B — A key that links two tables together
Learn More →
Q. What is the main purpose of indexing in a database?
A.
To store data
B.
To enforce data integrity
C.
To speed up data retrieval
D.
To manage transactions
Show solution
Solution
The main purpose of indexing in a database is to speed up data retrieval operations.
Correct Answer: C — To speed up data retrieval
Learn More →
Q. What is the purpose of a foreign key in a relational database?
A.
To uniquely identify a record
B.
To create a relationship between two tables
C.
To enforce data integrity
D.
All of the above
Show solution
Solution
A foreign key serves to create a relationship between two tables and enforce data integrity by ensuring that the value in one table corresponds to a valid record in another.
Correct Answer: D — All of the above
Learn More →
Q. What is the purpose of normalization in a database?
A.
To increase redundancy
B.
To eliminate data anomalies
C.
To improve query performance
D.
To simplify database design
Show solution
Solution
Normalization is a process that organizes data to reduce redundancy and improve data integrity by eliminating data anomalies.
Correct Answer: B — To eliminate data anomalies
Learn More →
Q. What is the purpose of the 'GROUP BY' clause in SQL?
A.
To sort the result set
B.
To aggregate data across multiple records
C.
To filter records
D.
To join multiple tables
Show solution
Solution
'GROUP BY' is used to aggregate data across multiple records, often used with aggregate functions like COUNT, SUM, AVG.
Correct Answer: B — To aggregate data across multiple records
Learn More →
Q. Which normal form eliminates transitive dependencies?
A.
First Normal Form (1NF)
B.
Second Normal Form (2NF)
C.
Third Normal Form (3NF)
D.
Boyce-Codd Normal Form (BCNF)
Show solution
Solution
The Third Normal Form (3NF) eliminates transitive dependencies in a relational database.
Correct Answer: C — Third Normal Form (3NF)
Learn More →
Q. Which of the following is a characteristic of a transaction in a database?
A.
Atomicity
B.
Redundancy
C.
Isolation
D.
Both Atomicity and Isolation
Show solution
Solution
Transactions in a database are characterized by properties known as ACID: Atomicity, Consistency, Isolation, and Durability.
Correct Answer: D — Both Atomicity and Isolation
Learn More →
Q. Which of the following is a characteristic of a transaction in a DBMS?
A.
Atomicity
B.
Redundancy
C.
Isolation
D.
Both Atomicity and Isolation
Show solution
Solution
A transaction in a DBMS is characterized by Atomicity and Isolation, ensuring that transactions are completed fully or not at all.
Correct Answer: D — Both Atomicity and Isolation
Learn More →
Q. Which of the following is NOT a type of join in SQL?
A.
INNER JOIN
B.
OUTER JOIN
C.
CROSS JOIN
D.
LINK JOIN
Show solution
Solution
LINK JOIN is not a recognized type of join in SQL; the common types are INNER JOIN, OUTER JOIN, and CROSS JOIN.
Correct Answer: D — LINK JOIN
Learn More →
Q. Which SQL clause is used to filter records in a query?
A.
ORDER BY
B.
GROUP BY
C.
WHERE
D.
HAVING
Show solution
Solution
The 'WHERE' clause is used to filter records in a SQL query based on specified conditions.
Correct Answer: C — WHERE
Learn More →
Q. Which SQL statement is used to remove a table from a database?
A.
DELETE TABLE
B.
DROP TABLE
C.
REMOVE TABLE
D.
ALTER TABLE
Show solution
Solution
The correct SQL statement to remove a table from a database is 'DROP TABLE'.
Correct Answer: B — DROP TABLE
Learn More →
Showing 1 to 18 of 18 (1 Pages)