Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Swapping out tblAuthor
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Swapping out tblAuthor

 Post Reply Post Reply
Author
ryanrdl View Drop Down
Newbie
Newbie


Joined: 23 May 2006
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote ryanrdl Quote  Post ReplyReply Direct Link To This Post Topic: Swapping out tblAuthor
    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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.