Chapter :-5 (English)
| Site: | AssessmentKaro |
| Course: | Database Management System |
| Book: | Chapter :-5 (English) |
| Printed by: | Guest user |
| Date: | Saturday, 18 April 2026, 6:51 PM |
Description
Topic Wise Chapter (English)
1. MySQL
MySQL
MySQL is an open-source relational database management system (RDBMS) used to store, organize, and manage data.
It uses SQL (Structured Query Language) to create, read, update, and delete data in tables made up of rows and columns.
MySQL is widely used in web applications, software systems, and enterprise projects because it is fast, reliable, and easy to use.
In simple words:
👉 MySQL is software that helps you store and manage data in an organized way.
Looks like you’re asking about types of SQL commands 🙂
Here’s a clear, exam-friendly breakdown:
1. Data Definition Commands (DDL – Data Definition Language)
These commands define or change the structure of database objects like tables, schemas, etc.
Common DDL commands:
· CREATE – creates a new table, database, view, etc.
· ALTER – modifies an existing table structure
· DROP – deletes a table or database permanently
· TRUNCATE – removes all records from a table (structure remains)
Example:
CREATE TABLE Student (
idINT,
nameVARCHAR(50)
);
2. Data Manipulation Commands (DML – Data Manipulation Language)
These commands are used to add, change, or remove data stored in tables.
Common DML commands:
· INSERT – adds new records
· UPDATE – modifies existing records
· DELETE – removes records
Example:
INSERT INTO Student VALUES (1, 'Asha');
3. Data Retrieval Commands (DQL – Data Query Language)
These commands are used to retrieve data from the database.
Main DQL command:
· SELECT – fetches data from one or more tables
Example:
SELECT*FROMStudent;
Quick Summary Table
|
Type |
Purpose |
Commands |
|
DDL |
Defines database structure |
CREATE, ALTER, DROP, TRUNCATE |
|
DML |
Manipulates data |
INSERT, UPDATE, DELETE |
|
DQL |
Retrieves data |
SELECT |
If you want this tailored for exam answers, notes, or with more examples, just say the word 👍
A network error occurred. Please check your connection and try again. If this issue persists please contact us through our help center at help.openai.com.
2. Operator
Operator
Operators are symbols or words that tell the computer (or in math) to perform an action or operation on values or variables.
In simple words:
👉 Operators work on data to produce a result.
Examples
· + adds numbers
· - subtracts
· * multiplies
· / divides
Exam
3. Arithmetic Operators
Arithmetic Operators
Definition:
Used to perform basic mathematical calculations.
Examples: + , - , * , / , %
Advantages:
· Simple and fast calculations
· Easy to understand and use
Disadvantages:
· Division by zero causes errors
· Limited to numeric data types
4. Relational (Comparison) Operators
Relational (Comparison) Operators
Definition:
Used to compare two values and return true or false.
Examples: == , != , > ,
< , >= , <=
Advantages:
· Essential for decision-making (if, while)
· Improves logical flow control
Disadvantages:
· Wrong comparisons can cause logical errors
· Floating-point comparisons may be inaccurate
5. Logical Operators
Logical Operators
Definition:
Used to combine multiple conditions.
Examples: && (AND),
|| (OR), ! (NOT)
Advantages:
· Allows complex conditions
· Makes programs more flexible
Disadvantages:
· Can become confusing in complex expressions
· Logical errors are hard to debug
6. Assignment Operators
Assignment Operators
Definition:
Used to assign values to variables.
Examples: = , += , -= , *= ,
/=
Advantages:
· Reduces code length
· Improves readability
Disadvantages:
· Misuse can overwrite important values
· Can cause confusion for beginners
7. Unary Operators
Unary Operators
Definition:
Operate on a single operand.
Examples: ++ , -- , - , !
Advantages:
· Useful for counters and flags
· Saves code lines
Disadvantages:
· Pre/post increment can be confusing
· Overuse reduces readability
8. Bitwise Operators
Bitwise Operators
Definition:
Perform operations at the bit level.
Examples: & , | , ^ , ~ ,
<< , >>
Advantages:
· Faster low-level operations
· Useful in system programming
Disadvantages:
· Hard to understand
· Rarely used in high-level applications
9. Conditional (Ternary) Operator
Conditional (Ternary) Operator
Definition:
A shorthand for if-else.
Syntax: condition ? value1
: value2
Advantages:
· Short and concise
· Reduces code size
Disadvantages:
· Reduces readability if overused
· Not suitable for complex logic
10. Special Operators
Special Operators
Definition:
Operators with specific purposes.
Examples:
· sizeof – finds size of data type
· , (comma) – separates expressions
· . – accesses structure/class members
Advantages:
· Provides extra functionality
· Helps in memory management
Disadvantages:
· Language-specific usage
· Can confuse beginners
11. Operators Quick Table
📌Table (Quick View)
|
Operator Type |
Main Use |
|
Arithmetic |
Calculations |
|
Relational |
Comparison |
|
Logical |
Condition combining |
|
Assignment |
Value assignment |
|
Unary |
Single operand operations |
|
Bitwise |
Bit-level operations |
|
Conditional |
Short decision making |
|
Special |
Special purposes |