Torna indietro   Hardware Upgrade Forum > Software > Programmazione

DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
Analizziamo nel dettaglio DJI RS 5, l'ultimo arrivato della famiglia Ronin progettato per videomaker solisti e piccoli studi. Tra tracciamento intelligente migliorato e ricarica ultra rapida, scopriamo come questo gimbal eleva la qualità delle produzioni.
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D è la nuova CPU gaming di riferimento grazie alla 3D V-Cache di seconda generazione e frequenze fino a 5,6 GHz. Nei test offre prestazioni superiori a 9800X3D e 7800X3D, confermando la leadership AMD nel gaming su PC.
Le soluzioni FSP per il 2026: potenza e IA al centro
Le soluzioni FSP per il 2026: potenza e IA al centro
In occasione del Tech Tour 2025 della European Hardware Association abbiamo incontrato a Taiwan FSP, azienda impegnata nella produzione di alimentatori, chassis e soluzioni di raffreddamento tanto per clienti OEM come a proprio marchio. Potenze sempre più elevate negli alimentatori per far fronte alle necessità delle elaborazioni di intelligenza artificiale.
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 02-02-2003, 21:32   #1
dona
Member
 
L'Avatar di dona
 
Iscritto dal: Oct 2000
Messaggi: 198
foreign key su mysql

ciao , dovrei lavorare sul sorgente di mysql per provare a creare il supporto dei vincoli foreign key, per una futura tesi.

qualcuno sa darmi qualche dritta?
qualcuno sa dove posso reperire guide o chissa che sui sorgenti di mysql?

commenti o consigli sono di aiuto
dona è offline   Rispondi citando il messaggio o parte di esso
Old 03-02-2003, 10:43   #2
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
Dal manuale di MySQL :

1.4.4.5 Foreign Keys

Note that foreign keys in SQL are not used to join tables, but are used mostly for checking referential integrity (foreign key constraints). If you want to get results from multiple tables from a SELECT statement, you do this by joining tables:

SELECT * from table1,table2 where table1.id = table2.id;

See section 6.4.1.1 JOIN Syntax. See section 3.5.6 Using Foreign Keys.

The FOREIGN KEY syntax in MySQL exists only for compatibility with other SQL vendors' CREATE TABLE commands; it doesn't do anything. The FOREIGN KEY syntax without ON DELETE ... is mostly used for documentation purposes. Some ODBC applications may use this to produce automatic WHERE clauses, but this is usually easy to override. FOREIGN KEY is sometimes used as a constraint check, but this check is unnecessary in practice if rows are inserted into the tables in the right order. MySQL only supports these clauses because some applications require them to exist (regardless of whether or not they work).

In MySQL, you can work around the problem of ON DELETE ... not being implemented by adding the appropriate DELETE statement to an application when you delete records from a table that has a foreign key. In practice this is as quick (in some cases quicker) and much more portable than using foreign keys.

In the near future we will extend the FOREIGN KEY implementation so that at least the information will be saved in the table specification file and may be retrieved by mysqldump and ODBC. At a later stage we will implement the foreign key constraints for application that can't easily be coded to avoid them.

1.4.4.6 Why We Did Not Implement Foreign Keys

Many database scholars and programmers feel very strongly that referential integrity should be enforced inside the database server. Indeed, in many cases, this approach is very helpful. However, in talking with many database users we have observed that foreign keys are often misused, which can cause severe problems. Even when used properly, it is not a magic solution for the referential integrity problem, although it does make things easier in some cases.

Because of the above observations, we did not assign implementing foreign keys a high priority. Our user base consisted of mostly of developers who did not mind enforcing referential integerity inside the application code, and in fact, preferred to do it that way because it gave them more control.

However, in the last couple of years, our user base has expanded a great deal and we now have many users who would like to have the enforced referential integrity support inside MySQL. So we will implement the foreign keys in the near future, although at this point we cannot provide a definite delivery date.

Some advantages of foreign key enforcement:

Assuming proper design of the relations, foreign key constraints will make it more difficult for a programmer to introduce an inconsistency into the database
Using cascading updates and deletes can simplify the client code
Properly designed foreign key rules aid in documenting relations between tables
Disadvantages:

MySQL does not yet support enforced referential integrity, so if your application depends on it, you will not be able to use it with MySQL until we implement this feature.
Mistakes, that are easy to make in designing key relations, can cause severe problems, for example, circular rules, or the wrong combination of cascading deletes.
A properly written application will make sure internally that it is not violating referential integrity constraints before proceding with a query. Thus, additionaly checks on the database level will only slow down performance for such application.
It is not uncommon for a DBA to make such a complex topology of relations that it becomes very difficult, and in some cases impossible to backup or restore individual tables.

Questa è la roadmap di MySQL...sembra che il supporto alle foreign keys sia già in fase di sviluppo...visto che siamo già alla versione alpha della 4.1...

Note that because we know the MySQL road map, we have included in the following table the version when MySQL should support this feature. Unfortunately we couldn't do this for previous comparison, because we don't know the PostgreSQL roadmap.

Feature MySQL version
Subselects 4.1
Foreign keys 4.0 and 4.1
Views 4.2
Stored procedures 4.1
Extensible type system Not planned
Unions 4.0
Full join 4.0 or 4.1
Triggers 4.1
Constrainst 4.1
Cursors 4.1 or 4.2
Extensible index types like R-trees R-trees are planned for 4.2
Inherited tables Not planned
cionci è offline   Rispondi citando il messaggio o parte di esso
Old 03-02-2003, 10:50   #3
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
Non vorrei darti una brutta notizia, ma MySQL supporta le Foreign Keys su database di tipo InnoDB...
Le tabelle InnoDB sono diverse da quelle di default (MyISAM)...ed usano le transazioni per mantenere le proprietà ACID...

http://www.mysql.com/doc/en/SEC450.html
cionci è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker DJI RS 5: stabilizzazione e tracking intelligent...
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequen...
Le soluzioni FSP per il 2026: potenza e IA al centro Le soluzioni FSP per il 2026: potenza e IA al ce...
AWS annuncia European Sovereign Cloud, il cloud sovrano per convincere l'Europa AWS annuncia European Sovereign Cloud, il cloud ...
Redmi Note 15 Pro+ 5G: autonomia monstre e display luminoso, ma il prezzo è alto Redmi Note 15 Pro+ 5G: autonomia monstre e displ...
SpaceX vuole portare nello Spazio 1 mili...
Realme 16: il nuovo mid-range che si isp...
DAZN lancia il piano Full Mobile a 19,99...
Samsung Galaxy S26, ormai è tutto...
Smartphone sempre più cari: super...
L'ultima puntata di Falsissimo rimossa d...
NASA Perseverance ha utilizzato percorsi...
Blue Origin sospende per almeno due anni...
Stampanti, Los Angeles verso il divieto ...
Roscosmos Amur: il razzo spaziale riutil...
Robot aspirapolvere per tutte le tasche:...
Accedere alle mail di un lavoratore lice...
Amazon Haul scatenato: migliaia di prodo...
Amazon Seconda Mano rilancia: sconto ext...
Super prezzo Amazon per ECOVACS DEEBOT T...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 05:00.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v