SQL Table "Owners"

Most SQL servers support the concept that each table is "owned" by a "user" or a "creator". This enables multiple tables with the same name, but different owners, to be created. These servers also enable users to access tables owned by other users.

When a user has some private information stored in database space owned by him, he is the creator or owner of these tables. If, for the purposes of achieving data manipulation objectives, he needs to access tables "owned" by some other user, he does this by qualifying the name of the table(s) to be accessed with the name of the owner. To access a table called "CUSTOMERS" created by a user named "BOB", the correct SQL syntax for the table reference would be

SELECT <select-column-list> FROM BOB.CUSTOMERS

Zim supports this capability by providing the ability to specify a "Remote Owner" of an EntitySet or data relationship in the data dictionary field " RemoteOwnerName". Any EntitySet or data relationship whose Remote Owner is blank or null is assumed to be owned by the user. The EntitySet name is not qualified in any generated SQL syntax. A reference to an EntitySet or data relationship whose Remote Owner is not blank or null causes the name to be qualified with the RemoteOwnerName in the generated SQL syntax. Thus to generate the syntax such as

BOB.CUSTOMERS

the EntitySet "CUSTOMERS" must have its RemoteOwnerName set to "BOB".