I'd like to blog my understanding of PHP based on my 10+ years experience in developing scalable web based applications. There will be 14 sections in total, including: database, functions, strings, security, design pattern, javascript and more... :-) Here is the first section --- DATABASE
- Database cannot be tested by using specific code.
- While PHP is loosely types, databases are not. Therefore, detailed Information about the data being stored is required for efficient storage and retrieval, common data-types include: int(signed integer number, 32bits), char(fixed length character string), varchar(variable length character string), float(signed floating point number, 64bits)
- Most modern database systems fall into the relational category, the basis of which is the relationship between various tables
- Relationships link records based on some common data, relationships can be one to one, one to many, many to many
- DB systems can be configured to enforce those relationships to maintain referential integrity
- DB are smart and fast, but the DB designer has foreknowledge of how the DB will be used
- With this knowledge the designer can create an index on appropriate columns
- This index instructs the DBMS to store additional information about the data in that column, to make locating data within it as fast as possible
- Transactions allow you to merge multiple queries into one atomic operation, either they ALL execute successfully, or none do. (BEGIN TRANSACTION #name; ...queries here, COMMIT;) - Transactions are only available on InnoDB. :-)
No comments:
Post a Comment