PHP learning is still going on, but in some large PHP exchange forums met some friends of the most basic concept of the database is not clear, then create the idea of writing this article!
(i) Conceptual
A database is a collection of information, each containing one or more forms of uniform records, which are made up of fields. Typically, a collection is called a table and records are called rows in a table.
Database is generally divided into: Flat file Database (TEXT), hierarchical database, network database, relational database (MySQL), object and Object-relational database!
(b) Relational database is the liberation of programmer software Development
Because of the flat file database, you must contact the operating system directly, and when the application needs to edit this information, you must ensure that the fields are in the correct form. This form of interface is expensive because she needs a 3rd generation language (3GL) and requires a high level of skills to develop for a long time! For example, programmers must consider logical and physical representations of data, such as reading an integer from a file, and the programmer needs to know whether it is written in textual form or binary form. When data flows between files and applications, certain conventions must be followed. So the efficiency of the flat file database program depends on the programmer's hard work and level! Relative to MySQL, because of the independence of the data, but also to achieve the independence of the structure! So programmers don't have to bear the burden of data management! Throw away a lot of the internal details of database processing! That's the most important reason for an RDBMS. ! is also a reason for her popularity!
(iii) Excellent procedure--Object relational Database model
Database model, MySQL is a relational database, but the relational model is not a MySQL patent, database theory innovation is continuing, advanced technology, some basic principles can also be used in relational models, if you are proficient in 3GL programmer, use of flat file database can not only develop excellent program! And in the grassroots data processing, programming control, resource utilization, have a great advantage! If you need a lot of data to read and write frequently!, you can use the positioning pointer to read the specified data, fixed-length index, so-called load problems, solve, control is also very flexible, convenient, security issues, hierarchical and network model of the concurrency model can be used! Of course, the most important thing is the sensitivity of programmers, The design of the perfect index table, is the key to the lock!
The main advantage of MySQL is his physical storage: the Mylsam table supports 3 kinds of lines and fixed long lines of thinking on the data processing flexibility, and use of file descriptors read and write tables, system memory buffers and caching, etc. are the MySQL fast data processing power reasons! At the same time you can use physical storage to bring convenience to the data repair, defragmentation and so on!
Believe that as long as you have a good database model, no matter what type of database you use, you will develop a good program!