Issue
Creating and Understanding the ION_Data Database Diagram
Product
Power Monitoring Expert (PME) 8.x
Environment
SQL Server Management Studio
Resolution
The database diagram is a very handy tool to have when creating SQL queries for obtaining data from a database. It is also very helpful to understand the Primary Key – Foreign Key relationship between the tables.
Refer to the article linked below which describes the steps to create a Database Diagram for a SQL database.
Creating a New Database Diagram: https://msdn.microsoft.com/en-us/library/ms189078.aspx
Primary & Foreign Keys
It is important to understand the Primary Key Foreign Key relationship between the tables.
The primary key consists of one or more columns whose data contained within is used to uniquely identify each row in the table.
A foreign key is a set of one or more columns in a table that refers to the primary key in another table. There isn’t any special code, configurations, or table definitions you need to place to officially “designate” a foreign key.
For further information, refer to the link below:
Primary and Foreign Key Constraints: https://msdn.microsoft.com/en-us/library/ms179610.aspx
The ION_Data database diagram for Power Monitoring Expert 8.1 is attached.