added polymorphic database support in preperation for filesystem database