SlideShare a Scribd company logo
1 of 15
DATABASE MANAGEMENT
SYSTEMS (2130703)
AJAY THAKKAR (130110107001)
ANKIT KAPATEL (130110107011)
HEMANT SUTHAR (130110107058)
1
G H PATEL COLLEGE OF ENGG AND TECHNOLOGY
GUJARAT TECHNOLOGICAL UNIVERSITY
DEPARTMENT OF COMPUTER ENGINEERING
PREPARED BY:
FACULTY:
PROF.
CHINTAN
BHAVSAR
NULL VALUES, INSERT, DELETE AND UPDATE IN DATABASE
Definition - What does Null mean?
 Null, in a database context, is the total absence of a value in a certain field and
means that the field value is unknown.
 Null is not the same as a zero value for a numerical field, text field or space value.
 Null implies that a database field value has not been stored.
EXPLAINATION:-
 A null cannot be compared to a value. For example, if a query is directed to a
Customer_Addresses table to retrieve all customers without email addresses,
then the Structured Query Language (SQL) query cannot be written as follows:
SELECT * FROM Customer_ Addresses WHERE Email_Address=null.
Instead, so as not to introduce a comparison with a null, the query must be written
as follows: SELECT * FROM Customer_ Addresses WHERE Email_Address IS
null.
EXPLAINATION:-
 When the values in a column containing nulls are counted, nulls are not included
in the results. For example, there are 200 customers in the Customer_ Addresses
table, and 30 have nulls in the Email_Address column. Doing a count using the
Email_Address column will return a result of 170.
Definition – What does Insert mean?
 Insert is a widely-used command in the Structured Query Language (SQL) data
manipulation language (DML) used by SQL Server and Oracle relational
databases. The insert command is used for inserting one or more rows into a
database table with specified table column values. The first DML command
executed immediately after a table creation is the insert statement.
EXPLAINATION:-
 A normal insert statement may be implemented in two forms:
 INSERT INTO table_name VALUES (val1, val2, val3…). An example is: INSERT
INTO Employee VALUES (1, John, 23);
 INSERT INTO table_name (column1, column2) VALUES (val1, val2, val3…). An
example is: INSERT INTO Employee (Eid, Name, Age) VALUES (1, John, 23);
EXPLAINATION:-
 Column names identify columns that must be populated with specific values
determined by VALUES clause expressions. The number VALUES clause
values and names columns is the same. Table columns without specified
insert statement values are assigned default values.
DELETION:-
 The command DELETE will delete records from a table. It will not delete specific
columns; it will delete an entire row.
 Using the term DELETE FROM and then listing the table name will tell the
database from which table the records should be deleted.
 If you want to delete select rows, you must also use the WHERE condition.
Otherwise, all of the records from the selected database will be deleted.
EXPLAINATION:-
 The basic syntax for deleting records from a particular table using the WHERE
clause looks like this:
 DELETE FROM include_table_name_here WHERE [what rows will be deleted];
 Let’s assume you have a database named Employees. That database includes
their name, position, and salary. The list looks like this:-
EXPLAINATION:-
ID Name Position Salary
1 Hunter Manager 90000.00
2 Smith Assistant Manager 75000.00
3 Williams Sales Clerk 15000.00
 If you want to DELETE all of the records from the database, you do not need to use the WHERE
clause. The following example would delete all of the records from the table named EMPLOYEES.
 DELETE FROM Employees;
EXPLAINATION:-
 Now, if you only wanted to DELETE the employee whose ID was number 2, you would include a
WHERE clause. The following example would delete only record number 2 from the table named
EMPLOYEES.
 DELETE FROM Employees WHERE ID = 2;
UPDATION:-
 UPDATE command used to modify fields of existing tuples.
 WHERE clause is applied first and determines fields to be modified.
 SET clause determines new values.
 If field being modified is also used to determine new value, value on rhs is
old value.
UPDATION:-
 The SQL UPDATE Statement
The UPDATE statement is used to update existing records in a table.
 SQL UPDATE Syntax
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
UPDATION:-
 SQL UPDATE Example
 Assume we wish to update the customer "Alfreds Futterkiste" with a new contact
person and city.
-We use the following SQL statement:
-Example
-UPDATE Customers
SET ContactName='Alfred Schmidt', City='Hamburg'
WHERE CustomerName='Alfreds Futterkiste';
DBMS (Database Management Systems

More Related Content

What's hot (20)

DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
SQL commands
SQL commandsSQL commands
SQL commands
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
Rdbms
RdbmsRdbms
Rdbms
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
 
Ddl & dml commands
Ddl & dml commandsDdl & dml commands
Ddl & dml commands
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Aggregate function
Aggregate functionAggregate function
Aggregate function
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Sql joins
Sql joinsSql joins
Sql joins
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 

Viewers also liked

Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 
Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)Vidyasagar Mundroy
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databasesakanksha007
 
Database Administrator - Job Scope
Database Administrator - Job ScopeDatabase Administrator - Job Scope
Database Administrator - Job ScopeCacheWorks©
 
1 introduction databases and database users
1 introduction databases and database users1 introduction databases and database users
1 introduction databases and database usersKumar
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Userssontumax
 
File system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyFile system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyTemma Tems
 
Urinary system embryology
Urinary system embryologyUrinary system embryology
Urinary system embryologyishtiaqqazi
 
Enterprise geodatabase sql access and administration
Enterprise geodatabase sql access and administrationEnterprise geodatabase sql access and administration
Enterprise geodatabase sql access and administrationbrentpierce
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraintsNikhil Deswal
 

Viewers also liked (20)

Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Ch 9 S Q L
Ch 9  S Q LCh 9  S Q L
Ch 9 S Q L
 
Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
Database Administrator - Job Scope
Database Administrator - Job ScopeDatabase Administrator - Job Scope
Database Administrator - Job Scope
 
Set operators
Set  operatorsSet  operators
Set operators
 
From crash to testcase
From crash to testcaseFrom crash to testcase
From crash to testcase
 
1 introduction databases and database users
1 introduction databases and database users1 introduction databases and database users
1 introduction databases and database users
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
File system-and-database-chapter01-connoly
File system-and-database-chapter01-connolyFile system-and-database-chapter01-connoly
File system-and-database-chapter01-connoly
 
Urinary system embryology
Urinary system embryologyUrinary system embryology
Urinary system embryology
 
SQL Data Manipulation
SQL Data ManipulationSQL Data Manipulation
SQL Data Manipulation
 
Enterprise geodatabase sql access and administration
Enterprise geodatabase sql access and administrationEnterprise geodatabase sql access and administration
Enterprise geodatabase sql access and administration
 
Triggers ppt
Triggers pptTriggers ppt
Triggers ppt
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
TRIGGERS
TRIGGERSTRIGGERS
TRIGGERS
 
Trigger
TriggerTrigger
Trigger
 
Introduction to triggers
Introduction to triggersIntroduction to triggers
Introduction to triggers
 

Similar to DBMS (Database Management Systems

2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL UsedTheVerse1
 
Sql insert statement
Sql insert statementSql insert statement
Sql insert statementVivek Singh
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQueryAbhishek590097
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...SakkaravarthiS1
 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for BeginnersAbdelhay Shafi
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasadpaddu123
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasadpaddu123
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL CommandsShrija Madhu
 

Similar to DBMS (Database Management Systems (20)

2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
 
Sql
SqlSql
Sql
 
Sql insert statement
Sql insert statementSql insert statement
Sql insert statement
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
 
SQL Query
SQL QuerySQL Query
SQL Query
 
Assignment#02
Assignment#02Assignment#02
Assignment#02
 
SQL
SQLSQL
SQL
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for Beginners
 
Sql commands
Sql commandsSql commands
Sql commands
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
SQL
SQLSQL
SQL
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
Sql slid
Sql slidSql slid
Sql slid
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
1 introduction to my sql
1 introduction to my sql1 introduction to my sql
1 introduction to my sql
 
Query
QueryQuery
Query
 
Sql wksht-2
Sql wksht-2Sql wksht-2
Sql wksht-2
 
Oraclesql
OraclesqlOraclesql
Oraclesql
 

More from Hemant Suthar

transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xsltHemant Suthar
 
7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)Hemant Suthar
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGHemant Suthar
 

More from Hemant Suthar (7)

Xsl elements
Xsl elementsXsl elements
Xsl elements
 
transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xslt
 
All process models
All process modelsAll process models
All process models
 
Expression language
Expression languageExpression language
Expression language
 
fourier series
fourier seriesfourier series
fourier series
 
7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTING
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

DBMS (Database Management Systems

  • 1. DATABASE MANAGEMENT SYSTEMS (2130703) AJAY THAKKAR (130110107001) ANKIT KAPATEL (130110107011) HEMANT SUTHAR (130110107058) 1 G H PATEL COLLEGE OF ENGG AND TECHNOLOGY GUJARAT TECHNOLOGICAL UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING PREPARED BY: FACULTY: PROF. CHINTAN BHAVSAR NULL VALUES, INSERT, DELETE AND UPDATE IN DATABASE
  • 2. Definition - What does Null mean?  Null, in a database context, is the total absence of a value in a certain field and means that the field value is unknown.  Null is not the same as a zero value for a numerical field, text field or space value.  Null implies that a database field value has not been stored.
  • 3. EXPLAINATION:-  A null cannot be compared to a value. For example, if a query is directed to a Customer_Addresses table to retrieve all customers without email addresses, then the Structured Query Language (SQL) query cannot be written as follows: SELECT * FROM Customer_ Addresses WHERE Email_Address=null. Instead, so as not to introduce a comparison with a null, the query must be written as follows: SELECT * FROM Customer_ Addresses WHERE Email_Address IS null.
  • 4. EXPLAINATION:-  When the values in a column containing nulls are counted, nulls are not included in the results. For example, there are 200 customers in the Customer_ Addresses table, and 30 have nulls in the Email_Address column. Doing a count using the Email_Address column will return a result of 170.
  • 5. Definition – What does Insert mean?  Insert is a widely-used command in the Structured Query Language (SQL) data manipulation language (DML) used by SQL Server and Oracle relational databases. The insert command is used for inserting one or more rows into a database table with specified table column values. The first DML command executed immediately after a table creation is the insert statement.
  • 6. EXPLAINATION:-  A normal insert statement may be implemented in two forms:  INSERT INTO table_name VALUES (val1, val2, val3…). An example is: INSERT INTO Employee VALUES (1, John, 23);  INSERT INTO table_name (column1, column2) VALUES (val1, val2, val3…). An example is: INSERT INTO Employee (Eid, Name, Age) VALUES (1, John, 23);
  • 7. EXPLAINATION:-  Column names identify columns that must be populated with specific values determined by VALUES clause expressions. The number VALUES clause values and names columns is the same. Table columns without specified insert statement values are assigned default values.
  • 8. DELETION:-  The command DELETE will delete records from a table. It will not delete specific columns; it will delete an entire row.  Using the term DELETE FROM and then listing the table name will tell the database from which table the records should be deleted.  If you want to delete select rows, you must also use the WHERE condition. Otherwise, all of the records from the selected database will be deleted.
  • 9. EXPLAINATION:-  The basic syntax for deleting records from a particular table using the WHERE clause looks like this:  DELETE FROM include_table_name_here WHERE [what rows will be deleted];  Let’s assume you have a database named Employees. That database includes their name, position, and salary. The list looks like this:-
  • 10. EXPLAINATION:- ID Name Position Salary 1 Hunter Manager 90000.00 2 Smith Assistant Manager 75000.00 3 Williams Sales Clerk 15000.00  If you want to DELETE all of the records from the database, you do not need to use the WHERE clause. The following example would delete all of the records from the table named EMPLOYEES.  DELETE FROM Employees;
  • 11. EXPLAINATION:-  Now, if you only wanted to DELETE the employee whose ID was number 2, you would include a WHERE clause. The following example would delete only record number 2 from the table named EMPLOYEES.  DELETE FROM Employees WHERE ID = 2;
  • 12. UPDATION:-  UPDATE command used to modify fields of existing tuples.  WHERE clause is applied first and determines fields to be modified.  SET clause determines new values.  If field being modified is also used to determine new value, value on rhs is old value.
  • 13. UPDATION:-  The SQL UPDATE Statement The UPDATE statement is used to update existing records in a table.  SQL UPDATE Syntax UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value;
  • 14. UPDATION:-  SQL UPDATE Example  Assume we wish to update the customer "Alfreds Futterkiste" with a new contact person and city. -We use the following SQL statement: -Example -UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg' WHERE CustomerName='Alfreds Futterkiste';