SlideShare a Scribd company logo
1 of 26
B.Tech III Sem ‘A’
DATABASE MANAGEMENT
SYSTEMS
Topics Covered
 Database users
 Database Architecture
 DDL
 DML
Student
Std_ID Name
Addr
Sec
DoB
Std_ID Name Addr Sec DoB
189X1A05XY Sree Sanfransisco A 01/01/1999
189X1A05XZ Sri Germany B+ 01/01/2000
ER Model Relational Model
ER Model Vs. Relational Model
Naive / Prgmers / Sophisticated / DBA
Appl.
interface
s
Appl.
programs
Query
tools
Admin
tools
Query Processor
Object
code
Compiler
DML
Queries
DDL
Interpreter
Query Evaluation Engine
Storage Manager
Buffer
Manager
File
Manager
Authorization &
integrity manager
Transaction
Manager
Data Indice
s
Data
Dictionar
y
Disk Storage
Users
DDL Commands
DDL:
Data Definition
Language
 CREATE
 ALTER
 DROP
 RENAME
DML:
Data Manipulation Language
 INSERT
 UPDATE
 DELETE
 SELECT
DCL:
Data Control Language
 GRANT
 REVOKE
 COMMIT (TCL)
 ROLLBACK (TCL)
DDL: Create
CREATE TABLE
CUSTOMER1(
ID Number(2),
NAME NVARCHAR2 (20),
AGE INT,
ADDRESS NVARCHAR2
(30) ,
SALARY DECIMAL (10, 2)
create table cust_temp as
select id, name from
customer1;
CREATE TABLE STUDENT2
(
ID INT NOT NULL,
NAME VARCHAR(20) NOT
NULL,
AGE INT NOT NULL,
DDL: Alter
 ALTER TABLE table_name ADD column_name
datatype;
 ALTER TABLE table_name DROP COLUMN
column_name;
 ALTER TABLE table_name MODIFY COLUMN
column_name datatype;
 ALTER TABLE table_name MODIFY column_name
datatype NOT NULL;
DDL Command: DROP &
Rename
 Drop table student;
 Rename student1 to student2;
 TRUNCATE TABLE customer1;
DML: Data Manipulation Language
 INSERT
 UPDATE
 DELETE
 SELECT
DML Example: Insert
insert into customer1values(90, 'Codd',60,'San Fransisco',
150000);
insert into customer1 values(&id,
'&name',&age,'&address',&salary);
SELECT * FROM EMPLOYEE
UPDATE Customer1 set ID=18, WHERE Name='henry
korth';DELETE FROM Customer1 WHERE Name='Henry Korth' AND
age=60;
Today’s Topics
 DCL
 Entity Relationship Model
 Basic concepts
 Cardinality of Relationship
 ER Diagram Notations
 ER Diagrams: Examples
DCL: Data Control Language
 GRANT : used to grant or give the privileges.
 REVOKE : used to avoid or object the privileges.
 COMMIT: used to save the data permanently.
 ROLL BACK : Used to revert changes in the
transactions since the last commit or rollback
command was issued
DCL: Commit
DELETE FROM
CUSTOMERS
WHERE AGE = 25;
SQL> COMMIT;
Rollback
 ROLLBACK command is the transactional
command used to undo transactions that have
not already been saved to the database.
 This command can only be used to undo
transactions since the last COMMIT or
ROLLBACK command was issued.
 DELETE FROM CUSTOMERS WHERE AGE =
25;
DCL : Grant & Revoke
create user korth identified by henry
 Connect as system/ora10g
GRANT SELECT, INSERT, UPDATE, DELETE
ON Emp_Det TO korth;
REVOKE DELETE ON Emp_details FROM
Entity Relationship Model
 The ER data model facilitates database design
by allowing specification of an enterprise
schema that represents the overall logical
structure of a database.
 The E-R data model employs three basic
concepts: entity sets, relationship sets, and
attributes
Entity Sets
 Entity: Real-world object distinguishable from other
objects. An entity is described (in DB) using a
set of attributes.
 Entity Set: A collection of similar entities. E.g., all
employees.
 All entities in an entity set have the same set of attributes.
 Each entity set has a key.
 Each attribute has a domain.
Entity Sets
Relationship Sets
 Relationship: Association among two or more
entities.
 A relationship set is a mathematical relation
among n  2 entities, each taken from entity sets
{(e1, e2, … en) | e1  E1, e2  E2, …, en 
En}
where (e1, e2, …, en) is a relationship
Relationship: Depositor
Relationship: Borrower
Attributes
 An entity is represented by a set of
attributes, that is descriptive properties
possessed by all members of an entity
set.Example:
customer = (customer_id, customer_name, customer_street,
customer_city )
loan = (loan_number, amount )
Attribute types
 Simple : Attribute is simple, if its value can not be divided into subparts.
For example Std_ID, GPA.
 Composite : Attribute is composite, if its value can be divided into
subparts. Ex: Name: First Name; Middle Name; Last Name
Address: H.No; street; city; pincode
 Single-valued : Attribute is a single-valued, if it has only one value for a
particular entity
 Multivalued : Attribute is multivalued, if it has a set of values for a
particular entity. Ex: Phone number
 Derived: Attribute is a derived, if its value can be derived from the values
of other related attributes or entities. Ex: Age, given dateofbirth
ER Diagram Notations
 Rectangles represent entity sets
 Ellipses represent attributes
 Diamonds represent relationship sets
 Lines link attributes to entity sets and link entity
sets to relationships sets
Continued…
 ER Diagram Notations
 ER Diagram Examples

More Related Content

What's hot (20)

SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
Sql operator
Sql operatorSql operator
Sql operator
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
SQL
SQLSQL
SQL
 
Relational model
Relational modelRelational model
Relational model
 
Sql operators & functions 3
Sql operators & functions 3Sql operators & functions 3
Sql operators & functions 3
 
Inner join and outer join
Inner join and outer joinInner join and outer join
Inner join and outer join
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
RDBMS
RDBMS RDBMS
RDBMS
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Oraclesql
OraclesqlOraclesql
Oraclesql
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
Database user’s
Database user’sDatabase user’s
Database user’s
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
joins in database
 joins in database joins in database
joins in database
 

Similar to DBMS Notes: DDL DML DCL

6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdfLPhct2
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introductionSmriti Jain
 
Chapter 7 (Part I) - User Defined Datatypes.pdf
Chapter 7 (Part I) - User Defined Datatypes.pdfChapter 7 (Part I) - User Defined Datatypes.pdf
Chapter 7 (Part I) - User Defined Datatypes.pdfTamiratDejene1
 
xml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdfxml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdfssusere05ec21
 
SQL express course for begginers
   SQL express course for begginers   SQL express course for begginers
SQL express course for begginersDmytro Hvozdov
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Ankit Dubey
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Ankit Dubey
 
Introduction to-csharp
Introduction to-csharpIntroduction to-csharp
Introduction to-csharpSDFG5
 
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...NALESVPMEngg
 
Introduction-to-Csharp.ppt
Introduction-to-Csharp.pptIntroduction-to-Csharp.ppt
Introduction-to-Csharp.pptAlmamoon
 

Similar to DBMS Notes: DDL DML DCL (20)

Dbms ER Model
Dbms ER ModelDbms ER Model
Dbms ER Model
 
6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdf
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
02.adt
02.adt02.adt
02.adt
 
ER Modeling.ppt
ER Modeling.pptER Modeling.ppt
ER Modeling.ppt
 
Xml
XmlXml
Xml
 
PPT
PPTPPT
PPT
 
ch2
ch2ch2
ch2
 
Chapter 7 (Part I) - User Defined Datatypes.pdf
Chapter 7 (Part I) - User Defined Datatypes.pdfChapter 7 (Part I) - User Defined Datatypes.pdf
Chapter 7 (Part I) - User Defined Datatypes.pdf
 
xml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdfxml-150211140504-conversion-gate01 (1).pdf
xml-150211140504-conversion-gate01 (1).pdf
 
Unit04 dbms
Unit04 dbmsUnit04 dbms
Unit04 dbms
 
SA Chapter 10
SA Chapter 10SA Chapter 10
SA Chapter 10
 
SQL express course for begginers
   SQL express course for begginers   SQL express course for begginers
SQL express course for begginers
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01
 
RDBMS
RDBMSRDBMS
RDBMS
 
Introduction to-csharp
Introduction to-csharpIntroduction to-csharp
Introduction to-csharp
 
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
 
Introduction-to-Csharp.ppt
Introduction-to-Csharp.pptIntroduction-to-Csharp.ppt
Introduction-to-Csharp.ppt
 

More from Sreedhar Chowdam

Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
Design and Analysis of Algorithms (Knapsack Problem)
Design and Analysis of Algorithms (Knapsack Problem)Design and Analysis of Algorithms (Knapsack Problem)
Design and Analysis of Algorithms (Knapsack Problem)Sreedhar Chowdam
 
DCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPDCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPSreedhar Chowdam
 
Data Communication and Computer Networks
Data Communication and Computer NetworksData Communication and Computer Networks
Data Communication and Computer NetworksSreedhar Chowdam
 
Data Communication & Computer Networks
Data Communication & Computer NetworksData Communication & Computer Networks
Data Communication & Computer NetworksSreedhar Chowdam
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operationsSreedhar Chowdam
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem SolvingSreedhar Chowdam
 
Python Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, ExceptionsPython Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, ExceptionsSreedhar Chowdam
 
Python Programming by Dr. C. Sreedhar.pdf
Python Programming by Dr. C. Sreedhar.pdfPython Programming by Dr. C. Sreedhar.pdf
Python Programming by Dr. C. Sreedhar.pdfSreedhar Chowdam
 
Python Programming Strings
Python Programming StringsPython Programming Strings
Python Programming StringsSreedhar Chowdam
 
C Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementC Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementSreedhar Chowdam
 
C Programming Storage classes, Recursion
C Programming Storage classes, RecursionC Programming Storage classes, Recursion
C Programming Storage classes, RecursionSreedhar Chowdam
 
Programming For Problem Solving Lecture Notes
Programming For Problem Solving Lecture NotesProgramming For Problem Solving Lecture Notes
Programming For Problem Solving Lecture NotesSreedhar Chowdam
 
Data Structures Notes 2021
Data Structures Notes 2021Data Structures Notes 2021
Data Structures Notes 2021Sreedhar Chowdam
 

More from Sreedhar Chowdam (20)

Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
Design and Analysis of Algorithms (Knapsack Problem)
Design and Analysis of Algorithms (Knapsack Problem)Design and Analysis of Algorithms (Knapsack Problem)
Design and Analysis of Algorithms (Knapsack Problem)
 
DCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCPDCCN Network Layer congestion control TCP
DCCN Network Layer congestion control TCP
 
Data Communication and Computer Networks
Data Communication and Computer NetworksData Communication and Computer Networks
Data Communication and Computer Networks
 
DCCN Unit 1.pdf
DCCN Unit 1.pdfDCCN Unit 1.pdf
DCCN Unit 1.pdf
 
Data Communication & Computer Networks
Data Communication & Computer NetworksData Communication & Computer Networks
Data Communication & Computer Networks
 
PPS Notes Unit 5.pdf
PPS Notes Unit 5.pdfPPS Notes Unit 5.pdf
PPS Notes Unit 5.pdf
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operations
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Big Data Analytics Part2
Big Data Analytics Part2Big Data Analytics Part2
Big Data Analytics Part2
 
Python Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, ExceptionsPython Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, Exceptions
 
Python Programming by Dr. C. Sreedhar.pdf
Python Programming by Dr. C. Sreedhar.pdfPython Programming by Dr. C. Sreedhar.pdf
Python Programming by Dr. C. Sreedhar.pdf
 
Python Programming Strings
Python Programming StringsPython Programming Strings
Python Programming Strings
 
Python Programming
Python Programming Python Programming
Python Programming
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
C Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementC Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory management
 
C Programming Storage classes, Recursion
C Programming Storage classes, RecursionC Programming Storage classes, Recursion
C Programming Storage classes, Recursion
 
Programming For Problem Solving Lecture Notes
Programming For Problem Solving Lecture NotesProgramming For Problem Solving Lecture Notes
Programming For Problem Solving Lecture Notes
 
Big Data Analytics
Big Data AnalyticsBig Data Analytics
Big Data Analytics
 
Data Structures Notes 2021
Data Structures Notes 2021Data Structures Notes 2021
Data Structures Notes 2021
 

Recently uploaded

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

DBMS Notes: DDL DML DCL

  • 1. B.Tech III Sem ‘A’ DATABASE MANAGEMENT SYSTEMS
  • 2. Topics Covered  Database users  Database Architecture  DDL  DML
  • 3. Student Std_ID Name Addr Sec DoB Std_ID Name Addr Sec DoB 189X1A05XY Sree Sanfransisco A 01/01/1999 189X1A05XZ Sri Germany B+ 01/01/2000 ER Model Relational Model ER Model Vs. Relational Model
  • 4. Naive / Prgmers / Sophisticated / DBA Appl. interface s Appl. programs Query tools Admin tools Query Processor Object code Compiler DML Queries DDL Interpreter Query Evaluation Engine Storage Manager Buffer Manager File Manager Authorization & integrity manager Transaction Manager Data Indice s Data Dictionar y Disk Storage Users
  • 5. DDL Commands DDL: Data Definition Language  CREATE  ALTER  DROP  RENAME DML: Data Manipulation Language  INSERT  UPDATE  DELETE  SELECT DCL: Data Control Language  GRANT  REVOKE  COMMIT (TCL)  ROLLBACK (TCL)
  • 6. DDL: Create CREATE TABLE CUSTOMER1( ID Number(2), NAME NVARCHAR2 (20), AGE INT, ADDRESS NVARCHAR2 (30) , SALARY DECIMAL (10, 2) create table cust_temp as select id, name from customer1; CREATE TABLE STUDENT2 ( ID INT NOT NULL, NAME VARCHAR(20) NOT NULL, AGE INT NOT NULL,
  • 7. DDL: Alter  ALTER TABLE table_name ADD column_name datatype;  ALTER TABLE table_name DROP COLUMN column_name;  ALTER TABLE table_name MODIFY COLUMN column_name datatype;  ALTER TABLE table_name MODIFY column_name datatype NOT NULL;
  • 8. DDL Command: DROP & Rename  Drop table student;  Rename student1 to student2;  TRUNCATE TABLE customer1;
  • 9. DML: Data Manipulation Language  INSERT  UPDATE  DELETE  SELECT
  • 10. DML Example: Insert insert into customer1values(90, 'Codd',60,'San Fransisco', 150000); insert into customer1 values(&id, '&name',&age,'&address',&salary); SELECT * FROM EMPLOYEE UPDATE Customer1 set ID=18, WHERE Name='henry korth';DELETE FROM Customer1 WHERE Name='Henry Korth' AND age=60;
  • 11. Today’s Topics  DCL  Entity Relationship Model  Basic concepts  Cardinality of Relationship  ER Diagram Notations  ER Diagrams: Examples
  • 12. DCL: Data Control Language  GRANT : used to grant or give the privileges.  REVOKE : used to avoid or object the privileges.  COMMIT: used to save the data permanently.  ROLL BACK : Used to revert changes in the transactions since the last commit or rollback command was issued
  • 13. DCL: Commit DELETE FROM CUSTOMERS WHERE AGE = 25; SQL> COMMIT;
  • 14. Rollback  ROLLBACK command is the transactional command used to undo transactions that have not already been saved to the database.  This command can only be used to undo transactions since the last COMMIT or ROLLBACK command was issued.  DELETE FROM CUSTOMERS WHERE AGE = 25;
  • 15. DCL : Grant & Revoke create user korth identified by henry  Connect as system/ora10g GRANT SELECT, INSERT, UPDATE, DELETE ON Emp_Det TO korth; REVOKE DELETE ON Emp_details FROM
  • 16. Entity Relationship Model  The ER data model facilitates database design by allowing specification of an enterprise schema that represents the overall logical structure of a database.  The E-R data model employs three basic concepts: entity sets, relationship sets, and attributes
  • 17. Entity Sets  Entity: Real-world object distinguishable from other objects. An entity is described (in DB) using a set of attributes.  Entity Set: A collection of similar entities. E.g., all employees.  All entities in an entity set have the same set of attributes.  Each entity set has a key.  Each attribute has a domain.
  • 19. Relationship Sets  Relationship: Association among two or more entities.  A relationship set is a mathematical relation among n  2 entities, each taken from entity sets {(e1, e2, … en) | e1  E1, e2  E2, …, en  En} where (e1, e2, …, en) is a relationship
  • 22. Attributes  An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set.Example: customer = (customer_id, customer_name, customer_street, customer_city ) loan = (loan_number, amount )
  • 23. Attribute types  Simple : Attribute is simple, if its value can not be divided into subparts. For example Std_ID, GPA.  Composite : Attribute is composite, if its value can be divided into subparts. Ex: Name: First Name; Middle Name; Last Name Address: H.No; street; city; pincode  Single-valued : Attribute is a single-valued, if it has only one value for a particular entity  Multivalued : Attribute is multivalued, if it has a set of values for a particular entity. Ex: Phone number  Derived: Attribute is a derived, if its value can be derived from the values of other related attributes or entities. Ex: Age, given dateofbirth
  • 24.
  • 25. ER Diagram Notations  Rectangles represent entity sets  Ellipses represent attributes  Diamonds represent relationship sets  Lines link attributes to entity sets and link entity sets to relationships sets
  • 26. Continued…  ER Diagram Notations  ER Diagram Examples