Introduction to SQL
Q. In an ER model, what does an entity represent?
-
A.
A relationship
-
B.
A table
-
C.
A column
-
D.
A constraint
Solution
In an Entity-Relationship (ER) model, an entity represents a table in the database.
Correct Answer: B — A table
Q. What does concurrency control in a DBMS ensure?
-
A.
Data redundancy
-
B.
Data integrity during simultaneous access
-
C.
Faster data retrieval
-
D.
Data backup
Solution
Concurrency control ensures data integrity when multiple users access the database simultaneously.
Correct Answer: B — Data integrity during simultaneous access
Q. What is normalization in database design?
-
A.
The process of organizing data to reduce redundancy
-
B.
The process of creating a database
-
C.
The process of indexing data
-
D.
The process of backing up data
Solution
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Correct Answer: A — The process of organizing data to reduce redundancy
Q. What is the purpose of a primary key in a database table?
-
A.
To uniquely identify each record
-
B.
To link tables together
-
C.
To enforce data types
-
D.
To store large amounts of data
Solution
A primary key is used to uniquely identify each record in a database table.
Correct Answer: A — To uniquely identify each record
Q. Which of the following is a type of SQL join?
-
A.
INNER JOIN
-
B.
OUTER JOIN
-
C.
CROSS JOIN
-
D.
All of the above
Solution
INNER JOIN, OUTER JOIN, and CROSS JOIN are all types of SQL joins used to combine rows from two or more tables.
Correct Answer: D — All of the above
Q. Which of the following is NOT a component of DBMS architecture?
-
A.
Database Engine
-
B.
User Interface
-
C.
Data Warehouse
-
D.
Database Schema
Solution
A Data Warehouse is not a component of DBMS architecture; it is a separate system used for reporting and data analysis.
Correct Answer: C — Data Warehouse
Q. Which SQL statement is used to retrieve data from a database?
-
A.
GET
-
B.
SELECT
-
C.
FETCH
-
D.
RETRIEVE
Solution
The SELECT statement is used to retrieve data from a database in SQL.
Correct Answer: B — SELECT
Showing 1 to 7 of 7 (1 Pages)