Solved and Verified
1. What is the primary purpose of a database?
ANSWER: To store and manage data in an organized way for easy retrieval and manipulation.
2. What does DBMS stand for?
ANSWER: Database Management System.
3. What is the role of a DBMS?
ANSWER: It is software that interacts with end users, applications, and the database itself to capture and
analyze data.
4. What is data redundancy?
ANSWER: The duplication of data in multiple locations within a database, which can lead to
inconsistencies.
5. What is data inconsistency?
ANSWER: When different and conflicting versions of the same data appear in different places.
6. What is a primary key?
ANSWER: A unique identifier for each record in a database table. It cannot be null.
7. What is a foreign key?
ANSWER: An attribute in one table that matches the primary key of another table, used to establish a
relationship between the two tables.
8. What is a composite key?
ANSWER: A primary key that consists of more than one attribute.
,9. What is an entity?
ANSWER: A person, place, thing, or event about which data is stored.
10. What is an attribute?
ANSWER: A characteristic or property of an entity.
11. What is a relational database?
ANSWER: A database that organizes data into tables (relations) which are linked based on common
attributes.
12. What is a tuple?
ANSWER: Another term for a row or record in a database table.
13. What is a flat file?
ANSWER: A simple database stored in a single file, often without structured relationships (like a
spreadsheet).
14. What is a query?
ANSWER: A request for data or information from a database.
15. What is SQL?
ANSWER: Structured Query Language, the standard language for relational database management
systems.
16. What is the purpose of the SELECT statement in SQL?
ANSWER: To retrieve data from one or more tables.
17. What does the FROM clause in a SQL query specify?
ANSWER: The table(s) from which to retrieve the data.
, 18. How do you select all columns from a table named 'Customers'?
ANSWER: `SELECT * FROM Customers;`
19. What is the WHERE clause used for?
ANSWER: To filter records and extract only those that fulfill a specified condition.
20. How would you find all customers from the city 'London'?
ANSWER: `SELECT * FROM Customers WHERE City = 'London';`
21. What are the logical operators AND and OR used for in a WHERE clause?
ANSWER: To combine multiple conditions.
22. What is the ORDER BY clause used for?
ANSWER: To sort the result-set in ascending or descending order.
23. How do you sort a query result in descending order?
ANSWER: By using the DESC keyword, e.g., `ORDER BY ColumnName DESC`.
24. What is a JOIN in SQL?
ANSWER: A clause used to combine rows from two or more tables, based on a related column between
them.
25. What is an INNER JOIN?
ANSWER: A join that returns records that have matching values in both tables.
26. What is a LEFT JOIN?
ANSWER: A join that returns all records from the left table, and the matched records from the right
table. The result is NULL from the right side if there is no match.