Category Archives: Archives

Blog posts from db4free.blogspot.com

Book by Karl Fogel – Producing Open Source Software

Giuseppe Maxia recently told me about a book that he could recommend – it’s called “Producing Open Source Software – How to run a successful free software project” by Karl Fogel (ISBN 0-596-00759-0). I ordered it at Amazon.de (and was … Continue reading

Posted in Archives | Leave a comment

How to deal with repeating date intervals?

I found an interesting post on a newsgroup which made me think about a nice solution for this problem: You have a date/interval pair stored in a table, let’s say, the 29th January and an interval of 14 days and … Continue reading

Posted in Archives | Leave a comment

Emulating check constraints with views?

After trying to emulate check constraints with a trigger yesterday, I have now tried out if it works to enforce data integrity with views, as Arjen Lentz described it in this article: http://arjen-lentz.livejournal.com/49881.html. I created a little table and a … Continue reading

Posted in Archives | 2 Comments

Emulating check constraints

Check constraints are one of the features that MySQL’s still missing (unfortunately), so I tried if there’s a workaround using triggers. My idea was quite simple. I created one AFTER INSERT trigger and one AFTER UPDATE trigger. They should verify, … Continue reading

Posted in Archives | 3 Comments

Creating log tables with triggers

Frank Mash did some testing with triggers and inspired me to try to create a log table based on triggers. This also answers his question “After playing earlier with triggers, I wanted to see whether one can update another table … Continue reading

Posted in Archives | Leave a comment

mysqldump’s tz-utc trap

I used to make backup dumps from my webhosting MySQL databases (I’ve got remote access) via the mysqldump command. All commands that I need (including mysqlcheck to optimize and analyze all tables) are grouped together in batch files, so it … Continue reading

Posted in Archives | 1 Comment

Index information from information_schema

The information_schema tables offer all kinds of useful metadata. Also all information about indexes are included in them, although they are split up among several tables. I’ve built up a query that shows all the information about indexes, here it … Continue reading

Posted in Archives | Leave a comment

Hail to GROUP_CONCAT!

MySQL’s GROUP_CONCAT command is a phantastic thing, it can simplify big efforts to a small piece of work that would not even be worth mentioning – if the way that the problem is being solved wouldn’t be so nice ;). … Continue reading

Posted in Archives | 2 Comments

MySQL – PostgreSQL reactions

There have been some reactions about my MySQL – PostgreSQL article that I wrote recently. I received a kind email from Magnus Hagandar, who is one of PostgreSQL’s developers (the PostgreSQL website states: “Has done major work on the Win32 … Continue reading

Posted in Archives | Leave a comment

Breaking referential integrity

Is it possible to break the referential integrity when a foreign key constraint is set on an InnoDB table? The answer is an (unfortunate?) yes. A little example demonstrates this: mysql> CREATE TABLE t1 ( -> id INT NOT NULL … Continue reading

Posted in Archives | Leave a comment