11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.it-ebooks.infoC H A P T E R 28• • •<strong>MySQL</strong> Storage Enginesand Data TypesTaking time to properly design your project’s table structures is key to its success. Neglecting to do socan have dire consequences not only on storage requirements, but also on application performance,maintainability, and data integrity. In this chapter, you’ll become better acquainted with the manyfacets of <strong>MySQL</strong> table design. By its conclusion, you will be familiar with the following topics:• The purpose, advantages, disadvantages, and relevant configuration parametersof <strong>MySQL</strong>’s key storage engines, namely ARCHIVE, BLACKHOLE, CSV, EXAMPLE,FEDERATED, InnoDB, MEMORY (formerly HEAP), MERGE, and MyISAM.• The purpose and range of <strong>MySQL</strong>’s supported data types. To facilitate laterreference, these data types are broken into three categories: date and time,numeric, and textual.• <strong>MySQL</strong>’s table attributes, which serve to further modify the behavior of a datacolumn.• The <strong>MySQL</strong> commands used to create, modify, navigate, review, and alter bothdatabases and tables.Storage EnginesA relational database table is a data structure used to store and organize information. You can picture atable as a grid consisting of both rows and columns, much like a spreadsheet. For example, you mightdesign a table intended to store employee contact information, and that table might consist of fivecolumns: employee ID, first name, last name, e-mail address, and phone number. For an organizationthat consists of four employees, this table would consist of four rows, or records. Although this exampleis simplistic, it clearly depicts the purpose of a table: to serve as an easily accessible vehicle for generaldata storage.However, database tables are also used in a number of other ways, some of which are rathercomplex. For example, databases are also commonly used to store transactional information. Atransaction is a group of tasks that is collectively considered to be a single unit of work. If all the unittasks succeed, then the table changes will be executed, or committed. If any task fails, then all the resultsof the preceding and proceeding tasks must be annulled, or rolled back. You might use transactions forprocedures such as user registration, banking operations, or e-commerce, in which all steps must be527

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!