O'Reilly logo

Catalyst 5.8 by Antano Solar John

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the database

First, we'll create the application so that we have some place to put our database file. We won't be doing much with Catalyst to start, but we'll need the project eventually:

$ catalyst.pl ChatStat
$ cd ChatStat

Let's get started by creating the tables in SQLite as follows:

$ sqlite3 root/database CREATE TABLE channels ( cid INTEGER PRIMARY KEY NOT NULL, channel TEXT NOT NULL ); CREATE TABLE nicknames ( nid INTEGER PRIMARY KEY NOT NULL, pid INTEGER NOT NULL, nick TEXT NOT NULL, username TEXT NOT NULL, host TEXT NOT NULL ); CREATE TABLE opinions ( oid INTEGER PRIMARY KEY NOT NULL, nid INTEGER NOT NULL, cid INTEGER NOT NULL, tid INTEGER NOT NULL, message TEXT NOT NULL, reason TEXT NOT NULL, points INTEGER NOT NULL ); CREATE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required