Hello. Can anyone shed some light on how Perlmonks organizes its database? Specifically I'm wondering how it organizes the users and keeps track of their activities (posts, votes, xp) and organizes them into columns and tables.

I'm aware of a Perlmonks development group, but this information doesn't seem to pose any serious security risk and I think it could prove educational. Thanks in advance :)

Replies are listed 'Best First'.
Re: Perlmonks Database Structure
by PodMaster (Abbot) on Jul 29, 2003 at 02:09 UTC
    PerlMonks runs on Everything, so just go to http://everydevel.com/ and download Everything, and look inside.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Rather inflexible for an engine to dictate such things don't you think? Are you sure that's what decides how the tables are laid out? Thanks :)

        Yes is am sure. Everything doesn't stop you from creating tables any which way you want, but if you want it to be compatible with Everything, you have to create it according to spec (Everything is a node).

        Please just go to everydevel.com and read read read -- If you're curious about Everything, ask on everydevel.com.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Perlmonks Database Structure
by Anonymous Monk on Jul 29, 2003 at 03:02 UTC

    For the interested:

    everything/tables/node.sql:

    CREATE TABLE node ( node_id int(11) NOT NULL auto_increment, type_nodetype int(11) DEFAULT '0' NOT NULL, title char(240) DEFAULT '' NOT NULL, author_user int(11) DEFAULT '0' NOT NULL, createtime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, hits int(11) DEFAULT '0', loc_location int(11) DEFAULT '0', reputation int(11) DEFAULT '0' NOT NULL, lockedby_user int(11) DEFAULT '0' NOT NULL, locktime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, authoraccess char(4) DEFAULT 'iiii' NOT NULL, groupaccess char(5) DEFAULT 'iiiii' NOT NULL, otheraccess char(5) DEFAULT 'iiiii' NOT NULL, guestaccess char(5) DEFAULT 'iiiii' NOT NULL, dynamicauthor_permission int(11) DEFAULT '-1' NOT NULL, dynamicgroup_permission int(11) DEFAULT '-1' NOT NULL, dynamicother_permission int(11) DEFAULT '-1' NOT NULL, dynamicguest_permission int(11) DEFAULT '-1' NOT NULL, group_usergroup int(11) DEFAULT '-1' NOT NULL, PRIMARY KEY (node_id), KEY title (title,type_nodetype), KEY author (author_user), KEY type (type_nodetype) );

    everything/tables/nodetype.sql

    CREATE TABLE nodetype ( nodetype_id int(11) DEFAULT '0' NOT NULL auto_increment, restrict_nodetype int(11) DEFAULT '0', extends_nodetype int(11) DEFAULT '0', restrictdupes int(11) DEFAULT '0', sqltable char(255), grouptable char(40) DEFAULT '', defaultauthoraccess char(4) DEFAULT 'iiii' NOT NULL, defaultgroupaccess char(5) DEFAULT 'iiiii' NOT NULL, defaultotheraccess char(5) DEFAULT 'iiiii' NOT NULL, defaultguestaccess char(5) DEFAULT 'iiiii' NOT NULL, defaultgroup_usergroup int(11) DEFAULT '-1' NOT NULL, defaultauthor_permission int(11) DEFAULT '-1' NOT NULL, defaultgroup_permission int(11) DEFAULT '-1' NOT NULL, defaultother_permission int(11) DEFAULT '-1' NOT NULL, defaultguest_permission int(11) DEFAULT '-1' NOT NULL, maxrevisions int(11) DEFAULT '-1' NOT NULL, canworkspace int(11) DEFAULT '-1' NOT NULL, PRIMARY KEY (nodetype_id) );

    I'm not sure if I should sign up an account, I mean my reputation will get capped before 100 billion anyways ;-)

    Any other files I should be looking at?

      That's the reputation of any single node. You're probably more interested in tables/user.sql in the ecore nodeball. (Of course, it uses the same field type.)