English 中文(简体)
很多到很多时候,亚洲开发银行的发动机在MYsql使用?
原标题:many to many which DB engine to use in MYsql?
  • 时间:2011-11-11 10:08:28
  •  标签:
  • mysql

我有一个客户、中间项目类型数据库。

Customers can buy many items and this is stored in the "middle" table, with just the two columns with customerid and itemid.

我目前正在使用我的仪表进行所有表格。

Is it recommended to use Innodb for the middle table in this structure?

最佳回答

我倾向于InnoDB,因为:

InnoDB should be used where data integrity comes a priority because it inherently takes care of them by the help of relationship constraints and transactions. Faster in write-intensive (inserts, updates) tables because it utilizes row-level locking and only hold up changes to the same row that’s being inserted or updated.

MyISAM is simpler to design and create, thus better for beginners. No worries about the foreign relationships between tables. Faster than InnoDB on the whole as a result of the simpler structure thus much less costs of server resources. Full-text indexing. Especially good for read-intensive (select) tables.

比较非常简单。 非行更适合需要经常插入和更新的数据危急情况。 而另一方面,我的国际宇宙航行科学院的运行情况较好,其应用并不完全取决于数据的完整性,而且大多只是选择和显示数据。

希望这一帮助。

问题回答

INNODB Support foreign key restrictions 包括可在禁止令表上删除的单体字。

排放物删除(仅限量)使 your子能够自行清理。

If your junction table employs foreign key constraints with cascading deletes and you remove either a customer or item record, the matching middle record will be removed so it does not become orphaned.

页: 1

因诺德允许你确定冷却 for子。

你们的伤口具有一些特点:

  • foregin-keys can delete / update depending datas too.
  • foregin-keys can reject deletings/updates if dependings exists.

通常情况下,使用原基钥匙的提早决定:那些原基钥匙需要额外的编码限制,即你可能无法在没有客户或物品的情况下插入中间物。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签