Hi all,
For example, in 3NF design, with table Queue, Customer, Person as follow:
CREATE TABLE queue (
queue_date DATE NOT NULL,
queue_no TINYINT AUTO_INCREMENT NOT NULL,
customer_id INT(10) NOT NULL,
PRIMARY KEY (queue_date, queue_no)
) ENGINE=MyISAM;
CREATE TABLE customer (
customer_id INT(10) AUTO_INCREMENT NOT NULL,
person_id INT(10) NOT NULL,
credit_term TINYINT(2) NOT NULL DEFAULT '0',
PRIMARY KEY (customer_id)
) ENGINE=InnoDB;
CREATE TABLE person (
person_id INT(10) AUTO_INCREMENT NOT NULL,
...
PRIMARY KEY (person_id)
) ENGINE=InnoDB;
The problem is obvious that table queue must be MyISAM table because of primary key queue_date and queue_no.
Is it a good practice to design a database with mixture of tables of InnoDB and MyISAM?
Will this design suffer from any data integrity and/or performance issues?
Thanks for taking your time.
--
Adrian Hoe
http://adrianhoe.com/adrianhoe
For example, in 3NF design, with table Queue, Customer, Person as follow:
CREATE TABLE queue (
queue_date DATE NOT NULL,
queue_no TINYINT AUTO_INCREMENT NOT NULL,
customer_id INT(10) NOT NULL,
PRIMARY KEY (queue_date, queue_no)
) ENGINE=MyISAM;
CREATE TABLE customer (
customer_id INT(10) AUTO_INCREMENT NOT NULL,
person_id INT(10) NOT NULL,
credit_term TINYINT(2) NOT NULL DEFAULT '0',
PRIMARY KEY (customer_id)
) ENGINE=InnoDB;
CREATE TABLE person (
person_id INT(10) AUTO_INCREMENT NOT NULL,
...
PRIMARY KEY (person_id)
) ENGINE=InnoDB;
The problem is obvious that table queue must be MyISAM table because of primary key queue_date and queue_no.
Is it a good practice to design a database with mixture of tables of InnoDB and MyISAM?
Will this design suffer from any data integrity and/or performance issues?
Thanks for taking your time.
--
Adrian Hoe
http://adrianhoe.com/adrianhoe