in reply to Object-Orienting A Procedural Script

Break it up into pieces.

Doing the database as a module allows you to easily substitute another implementation that saves to text files, a different database, db files, or whatever.

Doing the quotes as an object allows you to write a command line utility that accesses the quotes.