1 DEFINE_VIEW Creates a view definition. A view is a relation that is not physically stored. Rather, it is a virtual structure that points to records from other relations. You define a view by specifying: o A record selection expression to name the criteria for selecting the relations and records o A set of fields from those relations Example: DEFINE VIEW EMP_NAME OF E IN EMPLOYEES. E.FIRST_NAME. E.MIDDLE_INITIAL. E.LAST_NAME. END EMP_NAME VIEW. 2 More You need the Oracle Rdb READ and DEFINE privileges to the referenced relations to use the DEFINE VIEW statement. When the DEFINE VIEW statement executes, Oracle Rdb adds the view definition to the physical database. If you have invoked the database with the PATHNAME argument, the definition is also stored in the data dictionary. You must execute this statement in a read/write transaction. If you issue this statement when there is no active transaction, Oracle Rdb starts a read/write transaction implicitly. Other users are allowed to be attached to the database when you issue the DEFINE VIEW statement. 2 Format (B)0DEFINE VIEW qqq> name qqqqqk lqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqk mqq> DESCRIPTION IS /* text */ qqqj x lqqqqqqqqqqqqqqqqqqq OF qqq> rse qqqq> . qqqqqqqk lqqqqqqqqqqqqqqq name-clause qqq> . qwqk x mqq> /* text */ qqqqj x x mqqqqqqqqqqqqqqqqqqqqqqqq END qqqqwqqqqq>qqqqqqwqqq> VIEW qqqq> . mqq> name qqqj 3 name Name of the view definition you want to create. When choosing a name, follow these rules: o Use a name that is unique among all view and relation names in the database. o Use any valid OpenVMS name. However, the name cannot end in a dollar sign ($) or underscore (_). o Do not use any Oracle Rdb reserved words. 3 rse A record selection expression that defines which rows of which relations Oracle Rdb includes in the view. Ask for HELP on RSE for a complete description of record selection expressions. 3 name-clause Specifies a field that you want to include in the view. (B)0name-clause = qqwqqq> context-var . field-name qqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqwqk tqqq> local-field-name qq> FROM qq> context-var . field-name qqu x mqqq> local-field-name qq> COMPUTED BY qqqq> value-expr qqqqqqqj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqq mwq> dtr-clause qqqqwqj mqqqqqqq