Search Header Logo
DDL QZ

DDL QZ

Assessment

Presentation

Instructional Technology

10th Grade

Practice Problem

Hard

Created by

Valsa Gerard

FREE Resource

23 Slides • 0 Questions

1

media

2

media

Listen to instructions carefully.

Stay focused always.

Seek for assistance whenever required.

Notify the teacher by raising your hand when you are in need.

Keep quite and listen carefully when your class mate is talking.

Every member must contribute actively to the discussions.

All students must be polite and courteous.

Do not talk when you are not asked to do so.

Take responsibility of your learning.

Ways of Working

3

media

The

Imagination

Challenge

:

"Imagine

you

are

assigned

with

designing

a

database

for

a

Employee

Database

for

a

company

.

Discuss

and

justify

the

design

decisions

you

would

make,

including

the

choice

of

tables,

attributes,

and

relationships,

to

ensure

efficient

data”

.

4

media

EMPID

NAME

SALARY

DESIGNATION

DEPARTMENT

101

NIHAL

8500

HR MANAGER

ADMIN

102

ARJUN

7500

ACCOUNTANT

ACCOUNTS

103

SAYED

10000

IT MANAGER

IT

104

CHRIS

4500

SALES MAN

SALES

The Imagination Challenge

5

media

What

would

you

do

if

you

need

to

add/Edit/delete additional columns in the
existing database?

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database

tables.

Analyze the data in the database using Data Manipulation Language

(DML) commands.

6

media

Learning Outcome:

At

the

end of

this

lesson students

will

be

able

to:

Apply DDL commands specifically Create, Alter, and Drop

in database tables.

Analyze the data in the database using Data

Manipulation Language (DML) commands.

7

media


The DDL language is used to change the structure of
the database

DDL commands affect the whole table of the database.


DDL has basically defined the column(attributes) of
the table.

Eg. CREATE, ALTER, DROP

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database tables.

Analyze the data in the database using Data Manipulation Language (DML)
commands

8

media

DML is used to delete, update and update data
in the database.

DML commands affect the one or two rows of the table.

This language is used to manage the data in the
database.

Eg. SELECT, INSERT, UPDATE, DELETE

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database

tables.

Analyze the data in the database using Data Manipulation Language
(DML) commands

9

media

DDL

CREATE

ALTER

DROP

DML

SELECT

INSERT

UPDATE

DELETE

DDL and DML commands

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database

tables.

Analyze the data in the database using Data Manipulation Language
(DML) commands.

10

media

11

media

ALTER TABLE Customers
ADD Email varchar(25);

ALTER

Alters command allows you to alter the structure of the

database.
Syntax: ALTER TABLE table_name
ADD column_name datatype;

Example

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database

tables.

Analyze the data in the database using Data Manipulation Language
(DML) commands.

12

media

ALTER TABLE Customers
DROP COLUMN Email;

To delete a column in a table, use the following syntax (notice that some
database systems don't allow deleting a column):

ALTER TABLE table_name
DROP COLUMN column_name;

Learning Outcome:

Apply DDL commands specifically Create, Alter, and Drop in database

tables.

Analyze the data in the database using Data Manipulation Language
(DML) commands.

13

media

EMPID

NAME

SALARY

DESIGNATION

DEPARTMENT

101

NIHAL

8500

HR MANAGER

ADMIN

102

ARJUN

7500

ACCOUNTANT

ACCOUNTS

103

SAYED

10000

IT MANAGER

IT

104

CHRIS

4500

SALES MAN

SALES

14

media

Flexi Tasks

TASK2

Create a Table Employee and
insert

values

into

the

table

Employee.
Display all the records from

the table employee.

Display all the records from

the table Employee whose
salary is <6000.

Drop the column Department
Extended Task:
Add a new column email to
the table Employee.

Create a Table Employee

and insert values into the
tale employee.

Increase the salary of

CHRIS by 5000.

Add a new column email

to the table Employee.

Drop the column

department from the
table employee.

Extended Task
Alter TABLE employee with
Email id and Mob Number.

Create a Table Employee

and insert values into the
table Employee.

Display all the employees

name from the table
Employee where
designation is “HR
MANAGER” and SALARY
>7000.

Alter TABLE employee with
Email id and Mob Number.
Extended Task : Drop the
column Department and
check the status of the
database table.

15

media

16

media

17

media

18

media

19

media

Mistake Investigation

1. ALTER TABLE Employee

ADD Email (25):

4. DROP TABLE Employee

:

5. Update Employee
set Designation = “Programmer”
where empid = 103;

2. ALTER TABLE Customers

DROP COLUMN Email;

20

media

1. SELECT * FROM Employee;
ORDER BY salary;

2. ALTER TABLE Employee

PoBoxNum varchar(55)

3. DROP
employee;

21

media

Q1. The __________ language is used to change the

structure of the database.

Ans. DDL
Q2. _______

command allows you to alter the structure

of the database.

Ans. Alter

Q3.

Update is an example of ____ command

Ans. DML

22

media

23

media

Consider the following critical thinking question related to the SQL ALTER command:

"You have inherited a legacy database with a table that contains a large amount of data
and is frequently accessed by multiple applications. One of the columns in the table
needs to be renamed to reflect a new business requirement. How would you approach
using the SQL ALTER command to rename the column while minimizing downtime and
ensuring data integrity? What potential challenges or risks might you encounter, and
how would you mitigate them? Additionally, how would you handle the impact on
dependent objects, such as views, stored procedures, or application code, that
reference the renamed column?"

To develop the ability to apply Data Definition Language (DDL) commands, specifically Create, Alter,
and Drop, in order to manipulate database tables effectively.

media

Show answer

Auto Play

Slide 1 / 23

SLIDE