Module #9 Assignment

 

Creating My First MySQL Table

For this assignment, I created my first MySQL table using InfinityFree and phpMyAdmin. The process had three main steps: creating the database, designing the table, and inserting data.

Step 1: Create a New Database
I started by logging into InfinityFree and opening cPanel. I clicked “Create New MySQL Database”, gave it a name, and saved it. This step was pretty easy since the interface guided me through it. The only slightly confusing part was understanding that the database is just a container for the tables I’ll create.

Step 2: Design the Table
Next, I opened phpMyAdmin and selected my database. I created a new table called MyFirstTable with three columns: FirstName, LastName, and Age. I chose VARCHAR for the name columns and INT for age. This step was a bit tricky because I had to decide which data type to use for each column, but once I understood INT vs VARCHAR, it made sense.

Step 3: Insert Data
Finally, I clicked the Insert tab in phpMyAdmin and added a row of data: FirstName = Alicia, LastName = Johnson, Age = 21. After clicking Go, phpMyAdmin generated the SQL command:

INSERT INTO `MyFirstTable` (`FirstName`, `LastName`, `Age`)
VALUES ('Alicia', 'Johnson', 21);

I saw the confirmation “1 row inserted” and checked the Browse tab to make sure my data was stored correctly. This step was easy and helped me understand how SQL works behind the scenes.

Conclusion
Overall, creating my first MySQL table was a great learning experience. The easiest part was inserting data, the hardest part was picking the right data types, and concepts like Null and Function weren’t totally clear at first but are easier to understand now.

 

Comments

Popular posts from this blog

My Website Wireframe & Design Process

Module 4 Assignment