Forum Progress Part II

Random Stuff »  Forum Progress Part II
Forum Project »  Forum Progress Part II

Posted By Chris Smith Posted on 17 Apr 2006, 09:27 AM
The forum is very slowly getting put together. The basic admin areas are done:

- forums have group access
- groups can have users

Since most of the work is done on the frontend, I have been putting the design together and working out how to keep things in check.

Since postgresql has advanced features, I've decided to use some of those.

Instead of having to do a query to get thread counts and post counts per forum, I'll use a trigger to keep this info up to date when a thread or post is added to a particular forum.

I also use a plpgsql trigger to keep the 'last post time', 'last post author' and 'last post id' (which makes navigating a particular forum a little easier).

Lastly, if a forum, group, or user gets deleted, then it will clean up after itself by using referential integrity checks and 'on delete cascade' triggers. This will cause postgresql to delete anything that refers to a particular item.

Much easier than having to replicate that functionality in code and missing something!

Want to post a comment? Fill in the details below.

Your Name  : 
Your Email  : 
Your Website  : 
Spam Check! Please answer this question  : 7 + 5 =