Académique Documents
Professionnel Documents
Culture Documents
Materials:
1. PC or Laptop
2. WAMP/XAMPP Installer
3. Web Browser or CLI
Background
DDL includes commands such as CREATE, ALTER and DROP statements is used to CREATE, ALTER OR DROP
the database objects (Table, Views, Users).
Data Manipulation Language (DML) statements are used for managing data within schema objects DML
deals with data manipulation, and therefore includes most common SQL statements such SELECT, INSERT,
etc. DML allows to add / modify / delete data itself.
DML is used to manipulate with the existing data in the database objects (insert, select, update, delete).
DML Commands:
1. INSERT
2. SELECT
3. UPDATE
4. DELETE
*INSERT:
Syntax: INSERT INTO Table name values();
*SELECT:
Syntax: Select*from <table name>
*UPDATE:
Syntax: Update<table name> set to(calculation);
*DELETE:
Syntax: Delete form<table name>
Instructions:
Using your previous activity having tbl_pet and tbl_owner tables, do the following instruction and provide a
screenshot (or paste in a notepad) for each action you performed. Kindly follow naming conventions for
your activity.
-------------------------------------------------Objective 1-------------------------------------------------
1. Show your database tables.
SQL /OUTPUT
2. Add new table using existing table. This can be used to backup or duplicate a table to your database.
Do this,
NOTE: This will copy the data and the structure, but not the indexes.
6. Remove the tbl_pet_backup_drop from your database using DROP. Here’s how you do it.
SQL /OUTPUT
SQL /OUTPUT
8. Show tables of your database. Write your observations in the box provided.
9. Show records of your tbl_backup_truncate. Write your observations in the box provided.
SQL /OUTPUT
---------------------------------------------Objective 2---------------------------------------------
11. Store additional 5 records to your tbl_pet.
SQL /OUTPUT
SQL /OUTPUT
Observations:
SQL /OUTPUT
Observations: