SQL Views

EntitySets and data relationships in Zim can also be defined to map to SQL "views". Again, the Zim field list need not include all columns of the view, nor need the field sequence correspond to that of the columns of the view. However, if the corresponding EntitySet or data relationship must be updated, then the SQL view must be classified as being able to be updated according to the rules of the SQL server being used. This means that the definition of the view must not include the DISTINCT operator or the ORDER BY or GROUP BY clauses, that the view is defined over a single table only (no multi-table joins), and that columns of the base table which are not in the view must permit NULL values. These are typical limitations of SQL database servers. These restrictions on views are such that it is more practical to use base tables rather than views.