




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Question 1
What is a database?
Answer:
An organized collection of related data.
Question 2
What does a Database Management System (DBMS) manage?
Answer:
Data storage, retrieval, modification, security, integrity, and concurrent access.
Question 3
What does a relational database organize data into?
Answer:
Tables.
Question 4
In a database, what does a row represent?
Answer:
A record.
Question 5
What does a column represent in a database?
Answer:
An attribute.
Question 6
What is a schema in the context of databases?
Answer:
It defines the database structure, including tables, columns, data types, relationships, and constraints.
Question 7
What is metadata?
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Data describing database structures.
Question 8
Why is redundant data problematic in databases?
Answer:
It can cause inconsistencies when copies are updated differently.
Question 9
What is the role of a database administrator?
Answer:
To manage permissions, availability, backups, recovery, and performance.
Question 10
What is data independence?
Answer:
The ability to change one database level without requiring changes at another.
Question 11
What are the common data types in SQL?
Answer:
INT, DECIMAL, FLOAT, CHAR, VARCHAR, DATE, TIME, DATETIME.
Question 12
What does a PRIMARY KEY do in a database?
Answer:
Uniquely identifies each row and cannot contain NULL.
Question 13
What is the purpose of a FOREIGN KEY?
Answer:
To enforce references to another key.
Question 14
What does the NOT NULL constraint require?
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Question 22
What does the DISTINCT keyword do in SQL?
Answer:
Removes duplicate result rows.
Question 23
What is the purpose of the GROUP BY clause?
Answer:
Forms groups based on one or more columns.
Question 24
What does the HAVING clause do in SQL?
Answer:
Filters groups after aggregation.
Question 25
What is an INNER JOIN in SQL?
Answer:
Returns matching row pairs only from joined tables.
Question 26
What is a LEFT JOIN in SQL?
Answer:
Returns all left rows and matching right rows.
Question 27
What does the COUNT(*) function do?
Answer:
Counts all rows in a result set.
Question 28
What is the difference between COUNT(column) and COUNT(*)?
Answer:
COUNT(column) counts non-NULL values, while COUNT(*) counts all rows.
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Question 29
What does the SUM function do in SQL?
Answer:
Totals non-NULL values.
Question 30
What is the purpose of the ORDER BY clause?
Answer:
Sorts the results of a query.
Question 31
What does the LIKE operator do in SQL?
Answer:
Matches text patterns in a query.
Question 32
What does the IS NULL condition check for?
Answer:
Checks if a value is missing or unknown.
Question 33
What is a self-join in SQL?
Answer:
Joins a table to itself using separate aliases.
Question 34
What is a cross join?
Answer:
Returns every possible row pairing from two tables.
Question 35
What is the result of crossing 4 rows with 3 rows in SQL?
Answer:
It produces 12 rows.
Question 36
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Question 43
How do you create a view in SQL?
Answer:
By using the command CREATE VIEW ViewName AS SELECT ....
Question 44
What is the difference between ordinary views and materialized views?
Answer:
Ordinary views store the query definition, while materialized views store results and require refreshing.
Question 45
What is a primary key?
Answer:
A chosen candidate key that uniquely identifies a row.
Question 46
What is a composite key?
Answer:
A key that contains multiple columns.
Question 47
What is a surrogate key?
Answer:
An artificial identifier, such as an assigned ID.
Question 48
What is referential integrity?
Answer:
It requires each non-NULL foreign key value to match an existing referenced key.
Question 49
What is a one-to-many relationship?
Answer:
A relationship where one parent can relate to many children.
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Question 50
What is a weak entity?
Answer:
An entity that depends on another entity for identification.
Question 51
What does normalization do?
Answer:
It organizes relations to reduce unnecessary redundancy and modification anomalies.
Question 52
What is a functional dependency?
Answer:
A relationship where each X value determines exactly one Y value.
Question 53
What is the first normal form (1NF)?
Answer:
It requires each field to contain one value rather than a list or repeating group.
Question 54
What is the second normal form (2NF)?
Answer:
It is in 1NF and every non-prime attribute depends on the whole of every candidate key.
Question 55
What is the third normal form (3NF)?
Answer:
For every nontrivial functional dependency, X must be a superkey or A must be a prime attribute.
Question 56
What is Boyce-Codd normal form (BCNF)?
Answer:
Every determinant in a nontrivial functional dependency is a superkey.
Answer:
Answer:
Answer:
Answer:
Answer:
Answer:
Answer: