D. Answer the following.
Q1. What is an RDBMS? Give two real-life applications.
Answer: → An RDBMS is a Relational Database Management System that stores data in tables with relationships
between them.
→ Real-life applications: Online Retail (e-commerce), Electronic Health Records (EHRs).
Q2. Briefly explain the data types and constraints used in MySQL.
Answer:
→ Data Types: Used to define the kind of data an attribute can hold.
Example: CHAR, VARCHAR, INT, FLOAT, DATE
→ Constraints: Used to maintain data accuracy and integrity.
Example: NOT NULL, UNIQUE, DEFAULT, PRIMARY KEY, FOREIGN KEY
Q3. Why is WHERE condition necessary with UPDATE statement?
Answer: → The WHERE condition is necessary with the UPDATE statement to change only specific records in a table.
If we don’t use WHERE, then all the rows will get updated,
SQL Command → UPDATE Students SET Marks = 90 WHERE RollNo = 5;
Q4. Write short notes on:
Answer:→a) Types of keys – Primary, Foreign, Candidate, Composite keys used to identify & relate records in a database.
b) DDL – Data Definition Language is used to define database structure (e.g., CREATE, ALTER, DROP).
c) SQL – Structured Query Language used to interact with relational databases.
Q5. What do you understand by a Database? Describe advantages of DBMS.
Answer: → A Database is a structured collection of data that can be easily accessed and managed.
→ Advantages of DBMS: Secure storage, reduced redundancy, easy retrieval and update, data integrity, and
backup features.
E. Application-Based Questions
Answer1: Kartik’s mistake in CREATE statement:
He did not use correct CREATE TABLE syntax. The Correct syntax is CREATE TABLE STUDENT (...);
Answr2: Rita's correct answer for data type of birthday is DATE
F. Competency-Based Questions
Answer1: Rules for creating/updating a database in SQL:
• End statements with a semicolon.
• Use correct syntax.
• Enclose strings in single quotes.
• Use USE <database_name> before creating tables.
• Carefully use WHERE clause when updating data.
Answer2: Steps to help your brother create a table in SQL:
o Step 1: Open MySQL.
o Step 2: Select database using USE <database_name>;
o Step 3: Use CREATE TABLE Table_Name command with proper attribute names, data types, & constraints.
o Step 4: End statement with a semicolon ;
o Step 5: Confirm creation using SHOW TABLES;