For Module 9, I learned how to create and manage my first MySQL database using InfinityFree and phpMyAdmin. This assignment introduced me to the basics of database management, including creating a database, designing a table, and inserting information into it. Although I have worked with HTML, CSS, JavaScript, and PHP in previous modules, working with MySQL was a new experience that helped me understand how websites can store and organize information.
Step 1: Creating the MySQL Database
The first step was logging into my InfinityFree account and accessing the control panel. From there, I navigated to the MySQL Databases section and created a new database named module9. Once the database was created, I opened phpMyAdmin to begin working with it.
This was probably the easiest part of the assignment because I was already familiar with navigating InfinityFree from previous modules. The process was straightforward, and I did not experience any major issues creating the database. However, I initially needed to understand the difference between creating a database and creating a table within that database.
Step 2: Creating and Configuring the Table
After opening phpMyAdmin, I created a table named students with three columns: FirstName, LastName, and Age. I assigned VARCHAR(50) to the first and last name columns and INT(11) to the age column.
One of the more challenging parts of this step was understanding the different data types and how they should be assigned. I learned that VARCHAR stands for variable-length character and is used for storing text, while INT stands for integer and is used for storing whole numbers.
Another part that was initially unclear was the NULL checkbox. I was unsure whether the boxes needed to be checked or left unchecked. After looking into it, I learned that leaving NULL unchecked means that a value is required for that column. Since I wanted each record to contain a first name, last name, and age, I left all three unchecked.
Once I finished configuring the columns, I saved the table and confirmed that phpMyAdmin displayed the correct structure. This step helped me better understand how important it is to organize information properly before adding data.
Step 3: Inserting Data into the Table
The final step involved inserting information into the table I had created. I selected the Insert tab in phpMyAdmin, which displayed fields corresponding to the three columns.
I entered Alex for FirstName, Johnson for LastName, and 22 for Age. Initially, I was confused because phpMyAdmin displayed two separate sections for entering information. I was not sure whether both sections needed to be completed or if I only needed to enter information into one. I learned that each section represented a separate record, so I only needed to complete the first section.
After entering the information, I clicked Go, and phpMyAdmin displayed a confirmation message stating that one row had been inserted successfully. It also generated an SQL INSERT INTO statement showing how the information was added to the table.
Seeing the SQL statement was interesting because it demonstrated how phpMyAdmin performs database operations behind the scenes. Although I entered the information through a graphical interface, the system still used SQL commands to store the data.
Overall Reflection
Overall, this assignment was a useful introduction to MySQL and database management. Creating the database was relatively easy, while configuring the table and understanding the different data types required more attention. The most confusing parts were determining how the NULL checkbox worked and understanding why the Insert page displayed multiple sections.
By completing this assignment, I gained a better understanding of how databases, tables, columns, and records work together. I also learned how phpMyAdmin simplifies database management by allowing users
Leave a Reply