Jump to content

innoDB, is it required?


jimfog

Recommended Posts

Suppose we have 2 tables. The one is customers and the other the appointments the customers book. In the second table I want(as you guess) the appointments the customers will book. Question: Since the 2 tables will share a username column, do you think it is better if I inno DB tables instead of MyISAM. Can I do my job with MyISAM?

Link to comment
Share on other sites

you can do that with myisam. but myisam has no foreign key facility. foreign key helps to keep integrated the data between tables. means if parent table data got delete it will automatically handle the data in child table. also myisam used table level locking when it writes where as innodb uses row level locking. table level locking means it locks the whole table (innodb locks only the row) when it writes to database. though it happens on fraction of seconds but i high traffic site it can be be slower for concurrent request. as each request have to wait untill previous one finish his job. if your data is read heavy myisam will be fast. innodb is slower than myisam but as it is uses row level locking it is effective on write heavy tables. another important distinction is myisam can use full text indexing where innodb cant. in case you have to use full text indexing myisam is only choice. most of the case you will use innodb. use mysql where you have the strong reason to do so.

Edited by birbal
Link to comment
Share on other sites

you can do that with myisam. but myisam has no foreign key facility. foreign key helps to keep integrated the data between tables. means if parent table data got delete it will automatically handle the data in child table.
So for example, if a customer is deleted from the corresponding table, then his appointment will be auto deleted from the appointments table.Am I saying it correctly?
also myisam used table level locking when it writes where as innodb uses row level locking. table level locking means it locks the whole table (innodb locks only the row) when it writes to database. though it happens on fraction of seconds but i high traffic site it can be be slower for concurrent request. as each request have to wait untill previous one finish his job. if your data is read heavy myisam will be fast. innodb is slower than myisam but as it is uses row level locking it is effective on write heavy tables. another important distinction is myisam can use full text indexing where innodb cant. in case you have to use full text indexing myisam is only choice. most of the case you will use innodb. use mysql where you have the strong reason to do so.
Ok, so you are saying that depending the nature of the application-innoDB or MyISAM is better. So, for a booking.scheduling application what type of dB would you propose?
Link to comment
Share on other sites

yes you can set it to delete the appointments. http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCAQFjAA&url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Fen%2Finnodb-foreign-key-constraints.html&ei=juF2UKvxNoPQmAXR2oCwBw&usg=AFQjCNG4O8dG_QAVXOCoav89FVXsx1d48Q here is link about it.

for a booking.scheduling application what type of dB would you propose?
InnoDB will be appropiate.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...