Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map

Getting started

Cold Fusion allows a lot of flexibility in modifying your applications once they have been published. However it can be tricky modifying the structure of the database itself. For this reason we will create all the tables in the database now.

This application used an Access 97 database. However, I cannot imagine any problems with using any ODBC-compliant database.

Regarding layout of files, my personal preference is to hold standard HTML files in one directory and image and Cold Fusion files in separate sub-directories below it.

The database

You will need to create 4 tables in your database:

irt.org logo

My First Forum - a bulletin board application

You are here: irt.org | Articles | Database | My First Forum - a bulletin board application

Published on: Thursday 8th April 1999 By: Andrew Shatwell

tblArticles
Field Name Type Size
GroupID Number (integer)-
ThreadID Number (long)-
ThreadName Text 30
Link Text 255
Posted Date/Time -
UserName Text 25
UserEmail Text 50
Message Memo -
ArticleID AutoNumber (aka counter) - no duplicate values -

tblGroups
Field Name Type Size
GroupID Number (integer)-
GroupName Text 50
ReadAccess Text 50
WriteAccess Text 50
Description Text 255

tblThreads
Field Name Type Size
GroupID Number (integer)-
ThreadID Number (long)-
ThreadName Text 30
UserName Text 25
Distribution Text 255

Users
Field Name Type Size
UserName Text 10
FirstName Text 20
Surname Text 20
Email Text 50
Access Text 255
Lastlogin Date/Time -

Creating a forum

To add forums, it is simply a case of entering a record in the tblGroups table. For this example create one record in the tblGroups table as follows:

GroupID: 1
GroupName: My First Forum
ReadAccess: public
WriteAccess: public
Description: This is the first forum in the bulletin board.

It is up to you whether you allow the general public to become registered users of the system. The final document provides a web frontend for an administrator to register users. This could easily be adapted so that users can register themselves.

In the mean time we will create a record in the User table so that you can test some of the functions of the application. Enter the following in the Users table:

Username: [think of a user name for yourself]
FirstName: [your first name]
Surname: [your surname]
Email: [your email]
Access: public
Lastlogin: 1/1/74

Publishing the database

In order for Cold Fusion to be able to access your database you need to publish it on the server. This task is normally done by the server administrator. For this application, it does not matter what name you publish the database under as long as you record this name in the application.cfm file.

Back to the Introduction, or forward to Displaying the forums

Feedback on 'My First Forum - a bulletin board application'

View the author profiles.

What's New

How to do the impossible with Google Gears

Out and About


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.