I am designing a inventory web application for data centers. All the metadata that the application persists and displays is always grouped by a data center. For e.g. The list of servers, number of environments (logical grouping of servers), customers etc are always to be displayed for a data center. The application is suppose to track assets across various data centers.
I would like to get suggestions on how should I persist my database model in order to achieve this. A couple of approaches I had in mind
- Add a data_center_id column in all the metadata tables (we use a relational database) included in the application. When displaying the metadata apply a default filter for data_center_id. Drawback - This doesn't seem to be transparent approach and requires every metadata table to store the data center id.
- Have different metadata tables per data center. This might be too much since the amount of data persisted is not huge.
Any other better suggestions/ideas?