This is a Rails question! Put it in the Rails Zone!
Use this function: periodically_call_remote
http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M001629So, you'd have your div, either populated with the first thing or whatever.
The page will include the periodically_call_remote function.
Point that function to a new method in your controller to do the database lookup.
Use the database information in an RJS template that does the page updates and sliding effects you want.
Make sense? If you need more detail, tell me where you're stuck and I'll fill in some more info.