Creating Local Relationships

To create a local relationship click on the Add Relationship, displayed when Manage Relationship is selected. The New Local Relationship window displays:

Use this window to define a new One to many or Many to one relationship between two tables. If you select One-to-many, it will create a new relationship where your selected table will become the parent. To create the selected table as a child, select Many to one.

If the parent table does not contain any primary keys, WinSQL Professional will create a primary key locally – meaning your back-end database will not be aware of this change.

If WinSQL Professional does not acknowledge a relationship, the reason could be one of the following:

·The database designer has purposely chosen not to define foreign keys. Since foreign key constraints affect the performance of the database at run time, database designers often choose not to use them

·Either the database or the ODBC driver does not support this functionality. In this case, you can define a local relationship, which is local to WinSQL Professional and does not depend on or affect the database.