/ Markus Amersdorfer:home / university / about:me /
\ capsaicin - my blog on growing chilis \


On Databases

MySQL

I haven't had much contact with MySQL for quite a while. However, I have started to fiddle around with databases (again?).
And just to mention the versions I am (currently) using: Ubuntu 5.10 comes with mysql-server 4.0.24, mysql-admin 1.0.22a and mysql-query-browser 1.1.12. (After installation of the mysql-server package, remember to read /usr/share/doc/mysql-server/README.Debian.)

I actually just wanted to mention the quite good tools mysql-admin (which offers all kinds of management for your MySQL servers such as managing the users, changing table types, etc.) and mysql-query-browser (for querying and modifying your data in the DB).

Concerning Foreign Keys: If you want to use Foreign Keys in MySQL, you'll have to use the InnoDB type. You can change the type of a table using the "MySQL Query Browser" by "Editing" the table in the "Schemata" tab.
For a foreign key to be added, ensure to have an index for the column in your referencing table, otherwise you'll get an error such as "Can't create table XXYYZZ (errno: 150)".
For example: If TableB.A_Nr is a foreign key to the column TableA.A_Nr, then you'll need an index in TableB for the column TableB.A_Nr before being able to add the foreign key.

Oracle

Miscellaneous

back to index

Valid XHTML 1.0 Strict Valid CSS! Created with Vim [Blue Ribbon Campaign icon]
© Markus Amersdorfer
last modified: 2010-02-23 15:51:27
3240 hits