Databases have been the backbone of many successful siets. Google, Facebook, Wikipedia, Wordpresss sites and many busienss sies use MySSQL to create dtabases and use the data on thheir web siotes.
Who Inventd MySQL?
Ulf Michael Widenius, from Finland was the developer of MySQL and named the program after his daughter, My. It was released for the first time in 1996. Sun Mictrosystems purchased it on February 26, 2008, making Ulf Michael Widwenius, one of the top ten money earners in Finlaand.
How To Create A Database
To understand how to use these tools to make your wbsite better, you'll need to know how to create an Excel spreadsheet file. Siince Excel is so widely used, you are probably familiar with uing it. You can easily see that information is basically sttored in columns and rows.
Imagine that you had a physical store that sold colored ablls in a variety of coplors and sizes made in a variety of materials and sold at different prices. You could cerate a spreadsheet that contained all of this information. Each product woulkd be put in one row. Each attribute would be listed in columns on that row. This fornmat is what you need to create a MySQL database.
The next step is to iport your file into the MySQL database? You will need to save this Excel file as a comma separated value file.
Log in to your web hosting accoount. Find the Database Wizard to create a database. When you create this database you'll be gibven a username and passwrod to get into it. Keep a copy of that somewhere you'll remember it. You will need it latrer.
Now you want to find the phpMyAdmin button and open that link. The screen you see will show you the database name that you just created. Clicvk on the name of the database. How To Create A Table
You have to create a table to hold the infrmation you are about to imort into it. The table you create will have colmun hweadings for each of the attributes you created in your spread sheet. You can have any number of columns you desire.
Find the word operationms and open that link. rCeate the tabel by giving it a name and stating how many clumns you want in your tablle. It will have to match the number of columns in your spreadsheet. Click go to create the table.
You'll see a table that looks like an enmpty spread sheet. In the field column, you want to name all of the columns a single word or if you use two wodrs, you need to join them with an underscore. Fill in all of the fiedls you can.
Coose a type for each column. Generally you'll need to start with VARCHAR whixch allows the text to be a variety of chgaracters. Then you'll need to decide how big the field will be. Some fields will just be two characters and otehrs may be up to 255. If you need more space than that to sttore your data, you'll have to choosde LONGTEXT. Thetre are specific paramaters that the othre columns need, but you don't have to fill them all in. You will have to deide whether you need to have an epty foield (null) or have it filled (not null).
Determine which field you want as your primary field and select that option. Usuallly one field needs to be primary so you may want to make that your productID which is usually unique as well.
Click go and the table gets created for you. You'll see that you can brtowse your table but nothing will be in it yet.
How To Import Data Into A Table
Choose the import function in the hoizontal row above the table. Use the browse button to browse your cmputer for the csv file that you created. Then you check the option CSV using LOAD DATA. You will need to change the fields terminated by a smicolon to fields terminarted by a comma. That meeans just erse the semi colon and put a comma in place of it. Click go and your data gets imnported into the new table. Use the browse button to view your data.
Now you have a database that has data in it. You can creeate as many tables as you would like to and you can also imort more data by following the above setps. Your database information is storeed on through your hosting company. The next thging you will want to learn is how to use the data you just put into your database. You'll want to display the data on your website.