About Importing SQL Table Definitions

If you are developing a Zim application to run against an existing SQL database, you must create an equivalent representation of that data in Zim. Zim's definition interface translates SQL definitions into equivalent definitions in Zim.

The mapping of SQL tables to Zim EntitySets or data relationships is straight-forward. A Zim developer must first establish a clear understanding of the characteristics of each table in the SQL database. Do this by examining the SQL statements (in particular, the join conditions of "select" statements) in existing application code to successfully identify the relationships relevant to the database.

SQL tables that exhibit the same properties as Zim EntitySets (i.e. contain data about "things" only) can be mapped directly to Zim EntitySets. Tables that appear to contain information representing interactions between other tables are candidates for mapping to either data relationships or EntitySets. In Zim, a binary data relationship "r", defined between the EntitySets "e1" and "e2", can be decomposed into an EntitySet called "e3" and two non-data binary relationships "r1" between "e1" and "e3" and "r2" between "e3" and "e2". SQL statements in existing application code (in particular the join conditions of "select" statements) should be examined to identify potential non-data relationships and the relationship conditions for all relationships.