Back to Faq Project

Faq Database Structure

The FaqMan database information is kept inside a PostgreSQL version 7.3.2 install. There are five tables:

"consultants" Table

This table is stored in the "cs_general" database used by Router's Ref.

"relation" Table

This table will contain the information about which users can create, modify, or delete which faqs.

This table was designed with multiple Faq owners in mind, but is currently being used in a one-owner-only fashion, pending the creation of a central tool for representing group ownership.

The table will contain two columns, one which contains the user's unique id, and one which contains either a faq's unique id or a "create" flag. The faq id will allow changes to the corresponding faq, a create flag will allow the user to create new faqs.
uid(int) fid(int)
1 create(0)
1 34
1 72
2 13

"faqs" Table

The Faq Table will hold information about the faqs themselves.

Each faq will be given a unique id number, the fid.

The state of the faq will be stored as a number. If a faq is current, it will be searchable and updated into the router accounts and onto the web. New faqs will have to be approved by the administrator to become current. If it is pending, there will be a "New Proposed Version" which will have to be approved before it becomes current. In the meantime, the old version of the pending faq will be available. Boneyarded faqs will not be available or circulated.

As users view new and pending faqs, they will be able to suggest changes. The suggested changes will be stored.
Contents Name in Database Example Value
Faq Id Number (int) fid 34
Filename (varchar(40)) filename email.junk
Last Modified (date) last_mod 11/02
Faq State (int) state 0=current, 1=new, 2=pending, 3=boneyard
Current Suggestions (text) comments 1. Update with reassurance about coming spam filter
2. Don't send help@cac spam!
Name of Faq(text) title What can be done about the junk email I'm getting?
Question (text) question I keep getting messages that are commercial advertisements or simply information I don't want. Are there ways to prevent this or stop
Answer (text) answer Unwanted email can come from many sources: commercial solicitors, someone promoting a "worthwhile cause" that you don't care to hear
New Name of Faq(text) new_title What can be done about the spam I'm getting?
New Question (text) new_question Can i use anything the UW provides to help with spam?
New Answer (text) new_answer Sure! Unwanted email can come from many sources: commercial solicitors, someone promoting a "worthwhile cause" that you don't care to hear
New Filename varchar(40) new_filename email.spam

"comment" Table

Holds the information about comments made on Faqs in the review period.
Contents Name in Database Example
Faq ID (int) fid 23
Date (timestamp)date 8-12-2003 15:12:23
Comment (text) content Needs work around line 20

"log" Table

Contains the administrative log for use in helping FaqMan administrators in knowing what actions have been taken recently.
Contents Name in Database Example
Date (timestamp) date 8-12-2003 15:12:23
Username (varchar 8) username mcrawfor
Action Taken (text) action Approved "email.junk"

"fid_counter" Sequence

This is a PostgreSQL concept used for creating numbering schemes. It generates a unique, incrementing Faq ID for new Faqs