Laboratory Activity#4

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

IT69: System Administration and Maintenance

Laboratory Activity #4: Creating and Managing a Database in MySQL


NAME Ryell Gwenn Andrade
Section BSIT4B Date 09/28/2024

Objective:
The objective of this laboratory exercise is to provide students with hands-on experience of the basic
process of creating and managing databases in MYSQL. The students will be able to create database
and tables, insert data, and manage data through MYSQL workbench or the command-line client

Materials:
• Computers with MYSQL Server and Workbench installed
Duration:
This exercise is designed for a single 2 to 2:30 -hour session.

Instructions:
Part 1: Creating a Database and Tables
From the given diagram create database and tables

Part 3: Insert data into the table


1.Makes sure to at least insert 3 data each tables
IT69: System Administration and Maintenance

2. Run Queries and Retrieving Data program table


3. Update and Delete Data form students table

Part 3: Questions and Reflection


1. What is the purpose of creating multiple tables in a database, and how do relationships between tables
improve database organization?
Answer: The main purpose of creating multiple tables is to assign which tables data needs to be put
into. For example, you cannot put the course status in the student’s table, but the course status also needs to
become part of the students table in order to identify if that student still has that course, that will be the
relationship they have but they belong to different tables but they are related to each other. To summarize
this, creating multiple tables is to identify where the data needs to be assigned to.

2. Discuss the role of primary keys in ensuring data integrity within a table.
Answer: Primary keys are the identifier of the table in which they can be borrowed to other tables as
foreign keys.

3. What challenges did you encounter when inserting, updating, or deleting data, and how did you
resolve them?
Answer: Main problems I encountered are ensuring that each row should have their own data types
and whether it should be auto incremented or not. I just stick to what I have learned to which data types rows
should be for example for the ID it should be an INT not a string also updating it should be auto incremented
so that every time the admin will input new data it will generate new ID in order, but not all ID should be auto
incremented, such as course id, they have their own ID which will led to that course and course name.

4. Reflect on how SQL queries can be used to retrieve meaningful data from a database. Provide
examples based on the queries you ran during the exercise.
Answer: If you want to find all students enrolled in a particular program, you can join the students and
programs tables.

This query provides the names of students enrolled in the "Information Technology" program, showing how
SQL joins help connect student records to specific programs. It is really convenient, you can pinpoint where
and what data you want to retrieve from the database.
IT69: System Administration and Maintenance

5. Why is it important to understand how to manage and manipulate data within a database, and how
does this skill apply to real-world applications?

Answer: It is important because one of your responsibilities is to


ensure the Efficient Data Organization and Retrieval and Data
Integrity and Security. Having quick access and structured data is a
must when it comes to managing databases. You cannot just simply
create a database and let it be, you have to think about the client
that will use that database as a storage for their data, most of them
cannot do what you can do, so having it as quick access and
structured is a must. Also securing their data and having consistency
will be the most important of all, especially when working with
healthcare and businesses. This skill is widely applicable across
industries like healthcare, finance, e-commerce, social media, and
many others. The ability to handle data effectively provides a
competitive edge in terms of decision-making, reporting,
automation, and system integration.

You might also like