In this series you'll learn the foundations of managing data with SQL within the MySQL database. SQL and database skills are in-demand and used across industries as broad as software development, finance, and scientific data analysis. This program is a first step and will empower you to learn more about SQL and databases.
Before we dive into the world of databases, let's set up your personal SQL environment. It’s like equipping your digital kitchen with the best tools before you start cooking up data queries!
Understanding Your Tools: Apache, PHP, and MySQL
- Apache: This is your web server software. It's like a waiter who takes requests from your browser and delivers web pages in response.
- MySQL: Here's the star of our show - the database management system where all your data is stored, organized, and retrieved.
- PHP: This scripting language is like a chef who prepares your data. It communicates between your web page and the database.
Step 1: Install MAMP/WAMP
- Download MAMP here. Note that MAMP is free and MAMP pro is paid software. While the installer will install both editions, for the work in this course only the free edition of MAMP is required.
MAMP bundles together Apache, MySQL, and PHP - your complete toolkit for managing databases.
Step 2: Accessing phpMyAdmin Once installed, open MAMP/WAMP and start the servers. Starting the servers using MAMP. Notice the icon on the upper right of the MAMP interface.
Then, head over to phpMyAdmin, your web-based control panel for managing MySQL databases. You'll find it at http://localhost:8888/phpMyAdmin5/ (Mac) and http://localhost/phpMyAdmin (Windows).
If these links are not successful, with MAMP running enter http://localhost in your browser and the pages should display a link to phpMyAdmin.
Note that there are often variations on install and environments and you may need to toy with this a bit. By the way, you could also manage your databases on the command line, but that is significantly more complex.
Step 3: Importing Your Starter Database Exciting times ahead!
Download the file starter_database.sql. This is your starter database, ready for some SQL action.
- Click on the 'Import' tab.
- Choose the downloaded .sql file and click 'Go'.
Congratulations! You’ve just set up and populated your first database!
Step 4: View the Database in PHPMyAdmin On the left side of the interface you'll see the name of the database sql_sprint and inside it you'll see the employees table. (You may need to click the + sign next to the database name to see the table.).
Click the employees table to open it. With the employees table open, you can see the database.
Encountered a Hitch? If you’re facing any issues, don't fret! Join us on Slack to discuss and troubleshoot. You can join our the SkillSprints Slack at https://join.slack.com/t/skillsprints/shared_invite/zt-29dar49gg-equQ1ZiSrOPUDp2iK0Oq3w. It's free!
Your Mission: Make sure your database is all set for tomorrow's adventure. If you see tables with data in your sql_sprint database, you're on the right track!
Final Thought: Today’s setup is a foundational step. Like learning to tie your shoelaces, once you’ve got it, you’re equipped for the journey ahead!
Read part II...