InnoDB is a very popular and powerful database engine for MySQL that, among other
features, supports transactions, has great capability to handle many simultaneous update
operations, and can enforce FOREIGN KEY constraints. The engine is developed independently
of MySQL, and its home page is http://www.innodb.com.
HEAP is a special kind of table type in that it is constructed in system memory. It cannot
be used to reliably store data (in case of a system failure, all data is lost and cannot be
recovered), but it can be a good choice when working with tables that need to be very fast
with data that can be easily reconstructed if accidentally lost.
To learn more about these storage engines, and about the other storage engines
supported by MySQL, see the manual page at http://dev.mysql.com/doc/refman/5.0/en/
storage-engines.html.
?– Note For the TShirtShop product catalog, you??™ll be using MyISAM tables mainly because you need their
full-text search feature. If you change your mind about the type of a table, you can easily change it with the
ALTER TABLE command. The following line of code would make the department table an InnoDB table:
ALTER TABLE department ENGINE=InnoDB;
CHAPTER 5 ?– CREATING THE PRODUCT CATALOG: PART 2 119
Creating and Populating the New Data Tables
Now, it??™s time to create the three new tables to complete our product catalog:
??? category
??? product
??? product_category
Adding Categories
The process of creating the category table is pretty much the same as for the department table
you created in Chapter 3.
Pages:
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209