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 use this. Perhaps the original Chinook data was prepared by someone using Postgres V 9.

So, I've created Postgres and SQLite files to simplify installation of the Chinook data.

Download the Postgres data from here, and the SQLite data from here.

See create.pg.sh and create.sqlite.sh for the installation steps.

Note also that Postgres' psql and SQLite's sqlite3 both fail to handle UTF8 files starting with a BOM, so I've rigged the code in both cases to generate a deliberate syntax error when the reader attaches the BOM to the first non-comment token.

Recall also this quotation "Both Oracle and SQLite.org ship a program called sqlite3. They are not compatible. Which one are you using? I use the one from the SQLite.org." from the docs for my module WWW::Scraper::Wikipedia::ISO3166.

Lastly, my test files assume you're using GraphViz2 V 2.07.

Leave a comment

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...