Prev | Current Page 139 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"


The table structure you saw in Figure 4-9 shows that department_id in your department
table is an autoincrement column.
?– Note Unlike other database servers, MySQL still allows you to manually specify for an autonumbered
field when adding new rows, if you want.
For more details about the autoincrement columns, see its official documentation at
http://www.mysql.org/doc/refman/5.1/en/example-auto-increment.html.
CHAPTER 4 ?–  CREATING THE PRODUCT CATALOG: PART 1 75
Indexes
Indexes are related to MySQL performance tuning, so we??™ll mention them only briefly here.
Indexes are database objects meant to increase the overall speed of database operations.
Indexes work on the presumption that the vast majority of database operations are read operations.
Indexes increase the speed of search operations but slow down insert, delete, and update
operations. Usually, the gains of using indexes considerably outweigh the drawbacks.
On a table, you can create one or more indexes, with each index working on one column
or on a set of columns. When a table is indexed on a specific column, its rows are either indexed
or physically arranged based on the values of that column and the type of index. This makes
search operations on that column very fast. If, for example, an index exists on department_id
and then you do a search for the department with the ID value 934, the search would be performed
very quickly.


Pages:
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
wyciągarki wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła