Interview Question in SQL Server Indexing
Interview Question :: Draw an ER diagram to depict your design about the entities and their relations in the database catalog.
In a (simplified) database catalog, the DBMS needs to store the following information:
• Record all the tables of the database, which all have unique names and owners (assume owner is the user who creates the table). Tables can be base relations or views.
• The users are identified by a unique user-name and each of them has a password.
• A view is defined as the result of an SQL query, whose columns can be addressed by a name or column number.
• A base relation has:
o One or more named attributes, each of which has a data type and the NOT NULL constraint.
o One or more named indices, each of which consists of one or more attribute of the base relation. There is a specification of order direction, which must either be ASC (ascending) or DESC (descending).
o A primary key, which consists of one or more attributes of the base relation.
o One or more foreign keys, which consists of one or more attributes of the base relation, referring to attributes of (other) tables.
• Keep the access rights of users to a table: select, update, or delete.
a) Draw an ER diagram to depict your design about the entities and their relations in the database catalog. You have to show the cardinality. State any further assumptions that you have made in your design. Remember to show the primary key and foreign keys.

Loading ...