My CS Tutorial

info.mycstutorial@gmail.com | +91 82 21 90 90 45

Database Concepts & SQL Basics: Practice Worksheets With Answer Keys

Database Concepts & SQL Basics - Worksheets

Master Database concepts, relational models, keys (primary, foreign, candidate, alternate), DDL, and DML with 5 sets of interactive worksheets and answer keys.

Worksheet Set 1: Database Concepts & DBMS Fundamentals

Focus: Introduction to database concepts, need for databases, and Database Management Systems (DBMS).

COMPUTER SCIENCE / INFORMATICS PRACTICES

Worksheet Set 1: Database Concepts & DBMS

Name: ________________________ Roll No: _________ Date: ____________

Q1. Define a database. How is it different from a simple file processing system?

Q2. What is data redundancy? Explain how a DBMS helps reduce data redundancy.

Q3. State any two major advantages of using a Database Management System (DBMS) over traditional file systems.

Q4. What do you understand by data inconsistency? Give a brief reason why it occurs in file-based systems.

Q5. Define data sharing and data security in the context of database systems.

Q6. What is metadata? Where is it stored in a DBMS architecture?

Q7. Explain the role of a Database Administrator (DBA).

Q8. What is data independence? Differentiate between logical and physical data independence.

Q9. Give two examples of popular Relational Database Management Systems (RDBMS).

Q10. Explain what is meant by “data integrity” in a database.

Worksheet Set 2: Relational Data Model Terminology

Focus: Tuple, relation, attribute, degree, cardinality, and domain.

COMPUTER SCIENCE / INFORMATICS PRACTICES

Worksheet Set 2: Relational Data Model Terminology

Name: ________________________ Roll No: _________ Date: ____________

Q1. Define a relation in the context of a relational data model.

Q2. What is a tuple? Give its alternative name in tabular representation.

Q3. Define an attribute and state its alternative name.

Q4. What is meant by the ‘degree’ of a relation?

Q5. Define the ‘cardinality’ of a relation.

Q6. What is the concept of a ‘domain’ in a database table?

Consider a table named Employee containing 5 columns and 12 rows. Answer Q7 and Q8 based on this.

Q7. What is the degree of the Employee table?

Q8. What is the cardinality of the Employee table?

Q9. Explain why rows in a relation do not have a fixed sequential order.

Q10. Can an attribute have values outside its defined domain? Justify.

Worksheet Set 3: Database Keys

Focus: Candidate key, primary key, alternate key, and foreign key.

COMPUTER SCIENCE / INFORMATICS PRACTICES

Worksheet Set 3: Database Keys

Name: ________________________ Roll No: _________ Date: ____________

Q1. Define a candidate key in a relational table.

Q2. What is a primary key? How does it differ from a general candidate key?

Q3. Explain the term ‘alternate key’.

Q4. What is a foreign key? Why is it used in relational databases?

Q5. Can a primary key accept NULL values? Why or why not?

Q6. Consider a table Student with columns RollNo, AdhaarNo, and Email, all of which uniquely identify students. If RollNo is chosen as the primary key, what are AdhaarNo and Email called?

Q7. Can a foreign key accept NULL values? Give a valid scenario.

Q8. What is a composite primary key?

Q9. State the rule of referential integrity.

Q10. Explain why a primary key constraint implicitly enforces both UNIQUE and NOT NULL constraints.

Worksheet Set 4: Advantages of SQL & Data Definition Language (DDL) (10 Questions)

Focus: Advantages of SQL and DDL commands (CREATE, ALTER, DROP).

COMPUTER SCIENCE / INFORMATICS PRACTICES

Worksheet Set 4: Advantages of SQL & DDL

Name: ________________________ Roll No: _________ Date: ____________

Q1. What does SQL stand for? State its primary purpose.

Q2. State three key advantages of using Structured Query Language (SQL).

Q3. What is Data Definition Language (DDL)? Name any three DDL commands.

Q4. Write an SQL statement to create a database named Hospital.

Q5. Write an SQL statement to create a table Doctor with columns DocID (int, primary key) and DocName (varchar(30), not null).

Q6. Write an ALTER TABLE command to add a new column Specialization of type varchar(25) to the Doctor table.

Q7. Write a command to delete the entire structure of the Doctor table permanently from the database.

Q8. Distinguish between DDL and DML in brief.

Q9. Write a query to drop/delete the database named Hospital.

Q10. What is the purpose of the DESCRIBE command in DDL operations?

Worksheet Set 5: DQL (SELECT) & DML Commands

Focus: Data Query Language (SELECT), Data Manipulation Language (INSERT, UPDATE, DELETE).

COMPUTER SCIENCE / INFORMATICS PRACTICES

Worksheet Set 5: DQL (SELECT) & DML Commands

Name: ________________________ Roll No: _________ Date: ____________

Q1. What is Data Query Language (DQL)? Name the principal command associated with it.

Q2. Define Data Manipulation Language (DML) and list three DML commands.

Q3. Write a query to display all records from a table named Employee.

Q4. Write a query to insert a new row into an Employee table with EmpID = 101 and Name = 'Rohan'.

Q5. Write an UPDATE query to change the salary of employee 101 to 60000.

Q6. Write a DELETE query to remove records of employees whose salary is less than 20000.

Q7. Explain the difference between DQL and DML.

Q8. Write a query to display unique departments from an Employee table.

Q9. What happens if you execute an UPDATE statement without a WHERE clause?

Q10. What happens if you execute a DELETE FROM table_name; statement without a WHERE clause?


By Anjeev Kr Singh – Computer Science Educator
Published on : September 19, 2026 | Updated on : September 19, 2026

About the Author

Anjeev Kr Singh

Anjeev Kr Singh

Computer Science Educator, Author, and HOD. Guiding CBSE students in CS, IP, IT, WA & AI via mycstutorial.in. Creator of Question Bank for Class 10 & 12 students.

You cannot copy content of this page

Scroll to Top