Itsys Gab

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Name: Gabriel B.

Bitong Date: April 2, 2024


Year & Section: ACT-1C

ITSYS101 Database
Activity for SQL
1. What is SQL?
SQL (Structured Query Language)
-is a standard programming language used for managing and manipulating relational databases. It is
used for task such as querying data, updating data, inserting data, and deleting data within a
database. SQL is widely used in various industries for handling and organizing data in databases
efficiently and effectively.

2. What is RDBMS
RDBMS (Relational Database Management System)
-It’s a type of database management that organize data into tables with rows and columns, and
establishes relationships between these tables using keys. Example include MySQL, PostgreSQL,
Oracle, and SQL Server.

3. How to create Database. Please create your own database. Write the syntax use in creating a
database
CREATE DATABASE my_database;

4. What are the common syntax use in SQL, give at least 5


 SELECT: Used to retrieve data from a database.
 INSERT INTO: Used to insert new records into a database table
 UPDATE: Used to modify existing records in a database table.
 DELETE: Used to delete records from a database table.
 CREATE TABLE: Used to create a new table in database.

5. Go to https://www.programiz.com/sql/online-compiler/
A. Create Table name CustomerBSIT. And run your program or syntax in SQL. Write down
your syntax and screenshot your output.

B. In CustomerBSIT table, create 5 column such as (CustomerID, CustomerFirstName,


CustomerLastName CustomerAge. CustomerAddress). Write down your syntax and
screenshot your output.

Sample Output:
CustomerBSIT
CustomerID CustomerFirstName CustomerLastName CustomerAge CustomerAddress
C. After creating customer table Insert data or record on the table, your record or data is
depend on your own idea. Insert at least 5 records in customer table, Use the syntax for
INSERT.
Write down your syntax and screenshot your output.
Sample Output:
CustomerBSIT
CustomerID CustomerFirstName CustomerLastName CustomerAge CustomerAddress
00014 Ryan Dela Cruz 18 Baler
00081 Aldrin Pimentel 20 Maria Aurora
00123 Jane Roa 19 San Luis
00124 Krisel Picart 25 Maria Aurora
00125 Austin Enriquez 23 Casiguran
D. Then using the syntax Select, select table CustomerBSIT. Write down your syntax and
screenshot your output.

E. Then select column CustomerID, CustomerLastName, and CustomerAddress. Write


down your syntax and screenshot your output.
Sample Output:
CustomerBSIT
CustomerID CustomerLastName CustomerAddress
00014 Dela Cruz Baler
00081 Pimentel Maria Aurora
00123 Roa San Luis
00124 Picart Maria Aurora
00125 Enriquez Casiguran
F. Create table ProductBSIT with column name (ProductID, ProductName, ProductDescription,
CustomerID). Then insert record in the ProductBSIT. Write your syntax and Screenshot your output.
Sample Output:
ProductBSIT
ProductID ProductName ProductDescription CustomerID

\\G. Using the syntax for Delete, delete the 1st and 2nd record from your table ProductBSIT table and
CustomerBSIT table. Write your syntax and screenshot your output.

For Example, this is your table for CustomerBSIT, using the syntax Delete the record in the 1st and 2nd
column in the table.
CustomerBSIT
CustomerID CustomerFirstName CustomerLastName CustomerAge CustomerAddress
00014 Ryan Dela Cruz 18 Baler
00081 Aldrin Pimentel 20 Maria Aurora
00123 Jane Roa 19 San Luis
00124 Krisel Picart 25 Maria Aurora
00125 Austin Enriquez 23 Casiguran

Sample Output:
CustomerBSIT
CustomerID CustomerFirstName CustomerLastName CustomerAge CustomerAddress
00081 Aldrin Pimentel 20 Maria Aurora
00123 Jane Roa 19 San Luis
00124 Krisel Picart 25 Maria Aurora
00125 Austin Enriquez 23 Casiguran
CustomerBSIT
CustomerID CustomerFirstName CustomerLastName CustomerAge CustomerAddress
00123 Jane Roa 19 San Luis
00124 Krisel Picart 25 Maria Aurora
00125 Austin Enriquez 23 Casiguran

H. Using the syntax for Drop, delete the ProductBSIT table and CustomerBSIT table. Write down
your syntax for it. Explain what happen to ProductBSIT table and CustomerBSIT table after running
your syntax in programiz.

Prepared by: Glenda M. Flores


Instructor

You might also like