View Single Post
  #3 (permalink)  
Old 02-15-09, 07:37
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
Quote:
Originally Posted by nineinchnailgun
Any feedback would be greatly appreciated.
A few points:
  • You're missing a user_id to show who the rating belongs to.
  • Navigating the childIds would be a pain. Imagine writing some code to extract all the rating history for a product by a user using this childId field. I personally wouldn't use linked lists at all. Instead ...
  • You are also missing a time field so at the moment you can't tell when user changed rating. You could then use the latest date to find the current record and the order of all the records before it.
  • Using null to mark the latest field works in some databases and not in others ie the optimiser might look at your query and say that, seeing as you don't know the value for the field, then there's no point using an index based on that field. If this is the case with your RDBMS then just use a set value ie "1st jan 3000".
Mike
Reply With Quote