Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

cource (IT404) Fundmentals Data Base Purpose The purpose of this assignment is t

ID: 3708922 • Letter: C

Question

cource (IT404) Fundmentals Data Base

Purpose

The purpose of this assignment is to help you learn more about SQL.

Brief Introduction

SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system.

Action Items

• Compare and contrast DDL commands with DML commands. You are requested to submit one example of SQL query for DDL and one for DML and discuss them with your friends.

• All students have to participate at least 3 times in the discussions.

Explanation / Answer

SQLis simply a ANSI standard provides two benefits (i) the theory of acessing several records through a single command (ii) rquirement to removes the requirement that a way to acheive a record.It contains several kinds of statements like DDL,DML ,DQL and DCL.The utilization of SQL involve changing database table,structure of index.

comparision between DML and DDL as below

1.DML is a set of computer languages employed with computer programms for operation of data.DDL is employed particularly to elucidate the structure of database.

The four basic operations involved in DML are SELECT,DELETE,INSERT,UPDATE

1). example for select statement select *from tblemployee

which results aal existing records in a table

2). insert statement Insert into bank values(1001,'sony',CHICAGO');

it is employed to insert record into a table as per the requirement.

3) update statement update Dept set deptno=555 where Deptno=30;

4) delete statement delete Dept set Deptno=545 where Deptno=29;

where clause indicates the record to delete.

............................................................................................................................................................

2).The ultmiate famous method of DML is SQL which contains several modifying statements.DDL typically employs the CREATE command.

1).Example for create statement as below  

create table bank

(

empId int constraint emp-pk primary key,

emp name varchar(50) not null,

location char(55) not null

);

2) example for ALTER command

employed to add,delete and update columns in a prevailing table. Alter table tblemp add emp-id int;

3) example for DROP statement

employed to remove a record in a created table(unable to rollback). delete from tblemp where id=110;