0
0
SQLquery~5 mins

Database design best practices in SQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is normalization in database design?
Normalization is the process of organizing data to reduce duplication and improve data integrity by dividing tables and defining relationships.
Click to reveal answer
beginner
Why should you use primary keys in tables?
Primary keys uniquely identify each record in a table, ensuring each row can be referenced and preventing duplicate records.
Click to reveal answer
beginner
What is the purpose of foreign keys?
Foreign keys link records between tables, enforcing referential integrity by ensuring related data exists in the referenced table.
Click to reveal answer
beginner
Why is it important to avoid redundant data in a database?
Avoiding redundant data saves storage space, reduces errors, and makes updates easier because data is stored in one place only.
Click to reveal answer
intermediate
What does indexing do in a database?
Indexing speeds up data retrieval by creating a quick lookup structure, similar to an index in a book.
Click to reveal answer
Which of the following best describes a primary key?
AA unique identifier for each record in a table
BA field that stores large text data
CA key used to encrypt data
DA field that can contain duplicate values
What is the main goal of normalization?
ATo organize data to reduce redundancy
BTo store data in one large table
CTo speed up queries by adding indexes
DTo increase data duplication
Which key enforces a relationship between two tables?
APrimary key
BForeign key
CCandidate key
DComposite key
Why should you avoid storing the same data in multiple places?
AIt makes the database faster
BIt helps with backup
CIt causes data inconsistency and wastes space
DIt improves security
What does an index do in a database?
ADeletes old data automatically
BEncrypts data for security
CStores backup copies
DSpeeds up data retrieval
Explain the importance of primary keys and foreign keys in database design.
Think about how tables connect and keep data consistent.
You got /4 concepts.
    Describe what normalization is and why it is used in databases.
    Consider how to keep data clean and avoid repetition.
    You got /4 concepts.