Since you probably are looking for a purism kind of answer, and aren't just about what would work, then the Guestbook shouldn't even depend on a database.
You have a Guestbook, you have a Database and you have a GuestbookGateway.