Database Schema

What are the best practices for designing database schema for projects?
Should there be one db schema for the entire project to contain alarms, historical, etc… or one schema for each area i.e. schema: alarms, historical, process, schedule. Another question is when setting up a new project it asks for default database, is this for project db functions? (alarms etc)

I will answer you last question first.
Yes, the default database you choose when setting up a new project is the database that is going to be used for alarms, historian etc. However, you can always choose another database than the one you have chosen as the default one, when setting up alarms, historian etc.

About the best practices for designing database schemas for projects, I would say a schema per project. But I guess that depends… :sweat_smile:
The alarm journal and historian will manage the own tables inside the selected database schema anyway.
By selecting one schema per project it is also easier to manage multiple projects since you know exactly what schema belongs to what project.
However, I should note that I am no expert in SQL and databases tho. :slightly_smiling_face:

One schema per project is best. Otherwise you may get conflicts in certain areas (f.e. tags are referenced by ids, when two projects use the same schema, this will collide).

The default database is the DB that will be selected by default for all this. It also matters in the client, where queries will always be fired to the default DB, unless you configure it otherwise.

I generally choose the default DB for everything that should be done by Ignition (alarms, historian, audit, …), and add additional schemas for situations where I manage the design.

Thank you so much for your insight. i currently have a schema for each and it it becoming difficult to remember which is referenced sometimes.