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