1 / 9

Understand Data Manipulation Language (DML)

Understand Data Manipulation Language (DML). LESSON 1.3. 98-364 Database Administration Fundamentals. Lesson Overview 1.3 Understand data manipulation language (DML) In this lesson, you will review: SQL DML—DDL relationship DML SELECT INSERT UPDATE DELETE. SQL—DML—DDL relationship

nerita
Download Presentation

Understand Data Manipulation Language (DML)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understand Data Manipulation Language (DML) LESSON 1.3 98-364 Database Administration Fundamentals

  2. Lesson Overview • 1.3 Understand data manipulation language (DML) • In this lesson, you will review: • SQL DML—DDL relationship • DML • SELECT • INSERT • UPDATE • DELETE

  3. SQL—DML—DDL relationship • SQL is a language designed to be used only with databases. • structured query language (SQL)A database sublanguage used in querying, updating, and managing relational databases—the de facto standard for database products. Acronym: SQL. • DML—DDL are the two main language features of SQL. • data manipulation language (DML) In a database management system (DBMS), a language that is used to insert data in, update, and query a database. DMLs are often capable of performing mathematical and statistical calculations that facilitate generating reports. Acronym: DML. • DML is used to manipulate the data of a database.

  4. DML—DDL (continued) • data definition language (DDL) A language that defines all attributes and properties of a database, especially record layouts, field definitions, key fields, file locations, and storage strategy. Acronym: DDL. • DDL is used to create the framework for the database, the schema of the database, or both. This will be covered more in DDL review lesson 1.4.

  5. DML DML is used to retrieve and modify database information. These commands will be used by all database users during a routine workday. Following is a basic review of some of the most common DML commands

  6. SELECT The SELECT command is the most commonly used in DML. It allows users to retrieve specific information from the database. SELECT *FROM Grant_info WHERE aid_awarded > 36000  With this code, we have selected all students who have been awarded more than $36,000 from the Grant_info table.

  7. INSERT The INSERT command is used to add records to an existing table. INSERT INTO Grant_infoVALUES (‘John’, ‘Doe’,12345,2200) In this code, we have created John Doe, given him a student ID, and set his grant value to $2200. There are four data values specified for the record. These correspond to the table attributes/fields in the order they were defined: first_name, last_name, student_id, and credit. 

  8. UPDATE  The UPDATE command can be used to modify information contained within a table, either individual data or groups of data. UPDATE Grant_infoSET aid_awarded = aid_awarded + 4000WHERE student_id = 12345  This UPDATE command calls the Grant_info table and adds $4,000 to the value of the aid award for student 12345.

  9. DELETE The DELETE command is used to remove records from an existing table. DELETE FROM Grant_info WHERE student_id = 12345  Since we are deleting all the fields of this particular record from the table, we do not have to specify the field names, as we did when we inserted the record. This removes only the record with student_id = 12345.

More Related