vendredi 1 décembre 2017

Managing DB schema is a modular application

I'm building a Node.js + PostgreSQL application based on plugin system where each component is a separate npm package. The behaviour of the app can be customised by adding and removing components. Each component may need to define its own data types (i.e. DB tables) or potentially extend the core types.

Are there design a patterns for doing this kind of thing?

For example is it reasonable to let plugins run any kind of DB manipulation (like WordPress does)? Could some of PostgreSQL's more advanced features help avoid this, e.g. table inheritance? Or maybe use a separate schema for each plugin – any tips for making that work?

Aucun commentaire:

Enregistrer un commentaire