What can I use MySQL for? [closed]
I know how to store data in MySQL. Shortly, I know the basics: design, storing strings, integers, date. Is there something else that could be done/achieve with MySQL? Like some kind of functions, temprory bla blas? I don't know. (I know PHP)
If you want to get to be more of a "whiz" at using MySQL, look into the subject of indexing. Indexes are schema objects you can add to your tables to make querying them faster - basically, a subset of the columns are kept in memory for searching through. Having an index, though, means that updating a table will be slightly slower, as the index must be updated too. Identifying what indexes would be useful is an important part of table design.
Learn to optimize queries using EXPLAIN.
Learn about stored procedures and user-defined functions. These are sometimes referred to together as "routines". A function can be used in a query, like the built-in functions; a procedure may be used to carry out a sequence of tasks with a single instruction (CALL ProcedureName()
), so that you don't need to have SQL duplicated in several of your PHP scripts.
Check out the online documentation:
http://dev.mysql.com/doc/refman/5.4/en/index.html
It gives a decent survey of the core features.
精彩评论