March 2013 Archives

GraphViz2 and the dread MusicBrainz db

Hi All

OK. After a bit of pain I've set up an empty database for the
MusicBrainz database.

In particular, where they say 'sudo cpan Carton' you probably want 'cpanm Carton'.

This exercise was because, astonishingly, one of the users of my module GraphViz2 had doubts about it handling 149 tables spread over 4 schema.

The version of dbi.schema.pl shipped with GraphViz2 V 2.07 needed a patch to handle multiple schema, but after fixing that, you…

Docs for SQLite's foreign_key_list($table)

AFAICT SQLite's foreign_key_list($table_name) pragma returns a list of 8 elements in this order (i.e. with these interpretations):

1: COUNT
2: KEY_SEQ
3: FKTABLE_NAME
4: PKCOLUMN_NAME
5: FKCOLUMN_NAME
6: UPDATE_RULE
7: DELETE_RULE
8: UNKNOWN

If anyone can explain the last item, or offer corrections, please advise.

GraphViz2 V 2.07 and the Chinook test database

Tong Sun, a user of GraphViz2, has drawn my attention to the test database Chinook, downloadable here.

He and I have both had great difficulty getting GraphViz2 to properly display the schema of this database. He's using Strawberry Perl, and I'm using Perl under Debian.

Among the various problems are files marked as ISO-8859-1 but containing UTF8 data, and the Postgres data using the string syntax N'...'. AFAICS my Postgres V 8 (printed) manuals don't us…

About Ron Savage

user-pic I try to write all code in Perl, but find I end up writing in bash, CSS, HTML, JS, and SQL, and doing database design, just to get anything done...