Learning purpose: learn to build a database
In ASP, if you are an Access database, you can open Access to edit the MDB file. If you are SQL Server, you can open the Enterprise Manager to edit the SQL Server database, but in PHP, MY SQL command line editing may make beginners I feel very troublesome, don't tighten, you download a phpmyadmin installation, and you can establish an editing database to rely on it.
Let's talk about it.
After entering phpMyAdmin, we first need to create a database, and Language (*) Select Chinese Simplified, then create a new database on the left here to fill in the database name here, click Create.
Then select the database already created in the drop-down menu on the left drop. Below
Create a new table in the database SHOP:
first name :
Number of fields:
Fill in the name of the table and the number you think of the field (not enough or more, you can add or default again later), press execution.
Then you can start building a table.
The first column is the name of the field; the second column selection field type:
What we are often used is the following:
1) VARCHAR, text type
2) INT, integer type
3) Float, floating point type type
4) Date, date type
5) Everyone may ask, where is the ID added? This can be selected as long as the int type is selected, and you can select Auto_InCrement in the later addition.
After establishing a table, you can see the table you build on the left. After clicking, you can:
1) Press the structure on the right: View the modified table structure
2) Press the browsing on the right: View the data in the table
3) Press SQL: Run SQL statement
4) Press the insert on the right: insert a line of records
5) Press the empty empty: Remove all records in the table
6) Press the deletion of the right: Delete the table
There is also a very important feature to import and export. When we do the program and database, we need to have a local image on the server. If it is an ASP Access simple, you can upload the MDB file directly, if SQL Server can also connect to the remote server for import. So in My SQL you can export all SQL statements, to the phpMyAdmin of the remote server, then press SQL after creating the database, split all the SQL statements generated by the resulting level you just copied.
Today, I said that the database operation will continue tomorrow.