Print Page | Close Window

Swapping out tblAuthor

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20007
Printed Date: 29 March 2026 at 10:53am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Swapping out tblAuthor
Posted By: ryanrdl
Subject: Swapping out tblAuthor
Date Posted: 23 May 2006 at 8:08pm
I have depricated the tblAuthor in favor of my own customer data table.  I created a view named tblAuthor that massaged my data to be consistent with the data that was in tblAuthor and everything works fine except for a few minor changes.
 
I am having trouble displaying forums.  The issue is related to the Last_post_author_ID not equalling the Author ID.  This seems odd to me and I don't want to remove it without understanding why the sql is created this way. 
 
The sql I am looking at is in default.asp around line 138.  Since this part of the SQL is never true, I am not ever displaying any forums:
 
AND tblForum.Last_post_author_ID = tblAuthor_.Author_ID
 
Any help would be appreciated.
 
Ryan



Replies:
Posted By: WebWiz-Bruce
Date Posted: 24 May 2006 at 8:59am
For performance reasons the database has been de-normalised.

This does mean some data is repeated in the database, but because less joins are required when running SQL queries on the database performance is greatly increased across many pages with in the forum.

The tblForum.Last_post_author_ID stores the ID of the last user to post in that forum. This means only the tblForum and tblAuthor table need to be joined when running a number of queries rather that joining the tblForum, tblTopic, tblThread, and tblAuthor tables just to get the details of the last person to post in a forum.

The same thing is done with tblTopic.Start_Thread_ID and tblTopic.Last_Thread_ID


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net