79493

79493



the table has no holes in the middle and the inserts can be performed concurrently wlth retrievals. See Section 8.10.3, “Concurrent Inserts”.)

If you choose not to take advantage of referential integrity checks, keep

the following considerations in

mind:

•    In the absence of server-side foreign key relationship checking, the application itself must handle

relationship issues. For example, it must take care to insert rows into tables in the proper order, and

to avoid creating orphaned child records. It must also be able to recover

from errors that occur in the

middle of multiple-record insert operations.

•    If on DELETE is the only referential integrity capability an application needs, you can achieve a

similar effect as of MySQL Server 4.0 by using multiple-table DELETE statements to delete rows from

many tables with a single statement. See Section 13.2.2, “delete Syntax”.

•    A workaround for the lack of on delete is to add the appropriate DELETE statements to your

application when you delete records from a table that has a foreign key.

In practice, this is often as

quick as using foreign keys and is morę portable.

Be aware that the use of foreign keys can sometimes lead to problems:

•    Foreign key support addresses many referential integrity issues, but it is still necessary to design key

relationships carefully to avoid circular rules or incorrect combinations of cascading deletes.

•    It is not uncommon for a DBA to create a topology of relationships that makes it difficult to restore

individual tables from a backup. (MySQL alleviates this difficulty by enabling you to temporarily

disable foreign key checks when reloading a table that depends on other tables. See Section 5.4.5,

“innoDB and foreign key Constraints”. As of MySQL 4.1.1, mysąldump generates dump files

that take advantage of this capability automatically when they are reloaded.)

Foreign keys in SQL are used to check and enforce referential integrity, not to join tables. If you want

to get results from multiple tables from a select statement, you do this by performing a join between



Wyszukiwarka

Podobne podstrony:
image020 Fighting-front orbit. Arrow, secutre in orbit, fircs one shot at the Flying Wedgc. The torp
IB6 Punched Kicked Thrown16 Drawing a portion of the knocked-out-character s body in the foreground
what hard to get on with by my rejoinder to the above can be no morę enthusiastic than “Yes, but . .
Fig. 3 - Panoramie view of the Southern side of Orvieto Hill. The following can be noted in the
Stahl67 bmp THE ROLE OF MODELS IN THEORETICAL BIOLOGY 171 that performance measurements on the mod
2 (899) Toxic Chemicals in the home can be eliminated simply by making thoughtful choices in the sup
10 BARBARA BONIECKA According to experts on the subject delineated, the vocabulary can be placed in
82553 str (136)
4798 5 CASIOOperation Guide 4798 Timekeeping •    The year can be set in the rangę ot
STAND-ALONE OPERATION The AD670 can be used in a “stand-alone” modę, which is use-ful in systems wit
ape 029 29 WOMEN. We include under the term “Exercise" proper diet and hygiene. There can be no
comment vPh4IQXGYc4g8h7Ecn9im3TFb50bocMP The RPG-7 can be employed in all types of constructed forti
Follow instructions in this wizard carefully. Each detail can be very important. If you need any adv
image063 (2) *i The correction factor at RPM 50 »s not > 0, so the corrected Yiscosities and shea
210 rectly resulting from some sociological theories. The same can be said cf the press research kno

więcej podobnych podstron