0% found this document useful (0 votes)
6 views2 pages

SQL Fundamentals Activity Guide

The document outlines an SQL activity for students, guiding them to learn SQL through W3Schools and Programiz. It includes tasks such as creating a database, tables, inserting records, and using various SQL commands. Students are required to document their syntax and outputs for each task, culminating in a report on their findings.

Uploaded by

jonathanroxas330
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

SQL Fundamentals Activity Guide

The document outlines an SQL activity for students, guiding them to learn SQL through W3Schools and Programiz. It includes tasks such as creating a database, tables, inserting records, and using various SQL commands. Students are required to document their syntax and outputs for each task, culminating in a report on their findings.

Uploaded by

jonathanroxas330
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name: _______________________ Date: ______________

Year & Section: ________________

Fundamentals of Database Systems


Activity for SQL
1. Go to [Link]
2. Browse the w3shool and study the SQL. Follow the tutorial in w3school. Try to
explore how to create database, create table, insert record or data in SQL, delete
and select schemas in SQL.
3. After browsing and studying SQL in w3school, answer the following question and
do the given activity.
a. What is SQL?
b. What is RDBMS
c. Give at least 5 example of Syntax use in SQL.
d. Give the syntax how to create Database.
4. Go to [Link]
5. Create Table name CustomerBSIT. And run your program or syntax in SQL.
Write down your syntax and screenshot your output.
6. 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
7. After creating CustomerBSIT table Insert data or record on the table, your record
or data is depend on your own idea (Provide your own data). Insert at least 3
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

8. Using the syntax Select, select table CustomerBSIT. Write down your syntax and
screenshot your output.
9. Using the syntax Select, select the column for 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

10. Create table ProductBSIT with 3 columns named (ProductID, ProductName,


ProductDescription). Write your syntax and Screenshot your output.
Sample Output:
ProductBSIT
ProductID ProductName ProductDescription

11. Using the syntax for Delete, delete the ProductBSIT table and Customer table.
Write down your syntax for it. Explain what happen to ProductBSIT table and
CustomerBSIT1B table after running your syntax in programiz.
12. Write your answer and your output in A4 size.

Common questions

Powered by AI

To create a database using SQL, the syntax is: CREATE DATABASE database_name;. This command initializes a new database in the database management system, enabling the user to then define tables and other database entities within it .

To delete tables in SQL, the DROP TABLE command is used: DROP TABLE table_name;. This operation completely removes a table and all its data from the database, thus irreversible without a prior backup. It requires caution as it disrupts any dependencies such as foreign keys and relationships dependent on the table .

SQL, or Structured Query Language, is a standard programming language specifically designed for managing and manipulating relational databases. It functions by allowing users to create, update, delete, and retrieve data stored in database tables. In relation to a database management system, SQL acts as the intermediary language that facilitates communication between applications and the database to execute queries and operations seamlessly .

The SELECT statement in SQL fetches data from a database and is central to data querying and analysis. It allows users to specify particular columns, filter results through WHERE clauses, and conduct operations like sorting and aggregation, thus enabling comprehensive data analysis tailored to users' needs .

To create a table with multiple columns in SQL, the syntax is: CREATE TABLE table_name (column1 datatype, column2 datatype, column3 datatype, etc.);. Each column is defined by a name and a specific datatype. For example, creating a CustomerBSIT table might involve specifying columns like CustomerID, CustomerFirstName, CustomerLastName, CustomerAge, and CustomerAddress, with appropriate datatypes for each .

An online SQL compiler provides a web-based platform to write, execute, and test SQL queries without the need for installing database software locally. It aids in learning SQL by offering immediate feedback and allowing users to experiment with queries in a controlled environment, enhancing understanding and proficiency through practice .

Creating structured tables influences database performance by organizing data efficiently, leading to faster query execution and ease of maintenance. Properly indexed columns, normalized data structures, and carefully planned schemas minimize data redundancy and ensure data integrity, thereby optimizing both performance and management in relational database systems .

Data can be inserted into a table in SQL using the INSERT INTO statement. The basic syntax is: INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);. This command populates specified columns of the table with corresponding values, allowing multiple entries to be added at once .

Some primary SQL syntax examples include: 1) CREATE: Used to create a new database or table, 2) INSERT: Adds new data into a table, 3) SELECT: Extracts data from one or more tables, 4) UPDATE: Modifies existing data in a table, and 5) DELETE: Removes data from a table. Each serves specific data definition and manipulation functions within a database .

RDBMS, or Relational Database Management System, is a type of DBMS that stores data in tables related by common fields, allowing for complex queries and data analysis. Unlike non-relational databases which store data in key-value pairs, documents, or wide-column stores, RDBMSs use structured schemas and allow for ACID (Atomicity, Consistency, Isolation, Durability) transactions providing reliable, consistent access to data across multiple users .

You might also like