How do you specify database type when creating a database? MyISAM, Temporary, InnoDB, etc.
Specify databse type
It depends upon your requirement... Each of the table types have their own advantages and disadvantages.. The most commonly used is the InnoDB engine and MyISAM.
Most people use MyISAM if they need speed and InnoDB for data integrity. You can use more than one or any combination of these table types in your database. Even though MyISAM is faster than InnoDB in the MySQL world, InnoDB is fast compared to any database engine. With InnoDB you get transactions, speed and integrity three features not usually used in the same sentence.
You can get more details about table types upon googling or check here
Most people use MyISAM if they need speed and InnoDB for data integrity. You can use more than one or any combination of these table types in your database. Even though MyISAM is faster than InnoDB in the MySQL world, InnoDB is fast compared to any database engine. With InnoDB you get transactions, speed and integrity three features not usually used in the same sentence.
You can get more details about table types upon googling or check here
| horseatingweeds wrote: |
| How do you specify database type when creating a database? MyISAM, Temporary, InnoDB, etc. |
To specify the database engine to be used for the particular DB object, just add the engine type identifier to the end of your statement.
eg., To make a table use MyISAM, just add
TYPE=MyISAM at the end of the create/alter statement. (ENGINE=MyISAM should also work just the same)
The default, MyISAM, should be fine for most people.
I'm not sure if the engine can be specified at the database level.
specify "ENGINE = MYISAM ;" at the end of your sql query
eg.
Please ask MySQL related doubts in MySQL section.
eg.
| Code: |
| CREATE TABLE `users` (
`id` TINYINT( 3 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `username` VARCHAR( 25 ) NOT NULL , `password` VARCHAR( 25 ) NOT NULL , ) ENGINE = MYISAM ; |
Please ask MySQL related doubts in MySQL section.
| mOrpheuS wrote: |
| I'm not sure if the engine can be specified at the database level. |
I think using MySQL GUI Tools, we can specify a default type using the MySQL Administrator tool... Not sure though.
Related topics
