Can I store content in a relational database?
Can I store content in a relational database?
Yes, in several different ways, depending on your needs.
1) If you have lots and lots of data, especially in legacy formats, you can use ZSQLMethods, a way to have Zope call SQL statements and you can then script the results. The data in the relational DB isn't really "content"; it can't undergo workflow or such, but for many cases, this is fine or even preferable.
2) You can use Archetypes with SQLStorage. This lets you work with normal Plone content, and choose which attributes you want to keep in the relational database. It's easy to use, but requires that you create custom content types--you can't use the normal Plone News Item, for example, and keep the data in the relational database. There's a long HOWTO on this here: http://plone.org/documentation/manual/archetypes-developer-manual.
3) You can use RelStorage, an add-on product for Zope that stores Plone data in a relational database. RelStorage is extremely performant and very scalable, but it doesn't store its data in a format that is readable by other non-Plone applications.
4) ContentMirror also offers an approach to serializing Plone content in a relational database.
