Table Of Contents
MWFM NMOS Database Schemata
Introduction to database schemata
MWFM NMOS database schema
MWFM NMOS schema: Points to Note
MWFM NMOS databases: Capitalization convention
MWFM NMOS databases: other symbols
Conclusion
MWFM NMOS Database Schemata
This section introduces database schemata and elaborates on the schemata and conventions used in naming the databases of MWFM NMOS.
Introduction to database schemata
A database is a collection of related data that serves as a data source for a variety of applications and processes. The relational database model portrays data as being stored in tables. Tables can be further broken down into smaller, more manageable items called columns.
A schema is a description of the entire database structure that is used by the database software to maintain the database. In relation to MWFM NMOS and implementing SQL-93 terms, a schema is a collection of database objects associated with a particular database owner (in this case, the owners would be individual processes, e.g., Agent X, scratch topology, etc.). The advantage of having a schema is that it allows tables to have identical names if they belong to different schemata. For example, ipRoute.entityByName and allSwitch.entityByName are both schemata that declare two tables with the same name, entityByName but belong to the ipRoute Agent and allSwitch Agent, respectively.
MWFM NMOS database schema
The database naming convention adopted by MWFM NMOS is of a hierarchical nature and is described below:
<Schema owner>.<Database object>.<Database object>
•
The different parts of the schema are separated by a dot (.) but the last member is not terminated by a dot.
•
The first part of the full schema refers to the owner of the database.
•
The next part of the schema refers to the specific database object contained within the schema.
•
Subsequent parts of the schema refer to database objects nested within each other until the smallest element is reached.
For example, allSwitch.entityByName refers to the entityByName table owned by the allSwitch Agent; similarly, allswitch.entityByName.entityName refers to the entityName column of the entityByName table owned by the allSwitch Agent.
Figure 2-1 Naming schema used by MWFM NMOS for database objects
MWFM NMOS schema: Points to Note
It is a good practice (but not necessary) to declare the full schema of a database object. If the owner name or any other part was left out, it is assumed that the object that is referred to belongs to the present schema or object as shown by the examples given below.
The SELECT statement in the following example looks within the current schema for the objectClass column found of the entityByName table.
SELECT FROM entityByName.objectClass
|
The SELECT statement in the next example looks within the current table of the current schema to select the specific `entityName' columns that satisfy the selection criterion.
SELECT WHERE entityName = "switch"
|
The advantage of declaring the full schema of any database object is that it leaves no room for confusion when working with database tables with similar names but belonging to different owners.
MWFM NMOS databases: Capitalization convention
The capitalization convention used in naming the MWFM NMOS databases is described below with examples that put it into context.
Capitalization convention
All database names or database objects are written in lower case letters, even after full stops, except when made of more than one word joined together, in which instance the first letter of each subsequent word must be capitalized:
•
allSwitch refers to the name of the allSwitch Agent database.
•
allSwitch.entityByName.entityName column
•
entityByName.entityName table
•
entityByName table
•
allSwitch.entityByNeighbor table
MWFM NMOS databases: other symbols
Alphanumeric characters are the only symbols allowed in the database naming convention, with the exception of the underscore character (_). Some examples of the use of the underscore character are shown below.
•
allSwitch.entityByName.m_Name
•
allSwitch.entityByName.m_IpAddress
•
entityByName.entityName.m_Interfaces
Conclusion
This chapter introduced the schema, the relational database structure that is used to store information used by MWFM NMOS components. The schemata allow for the quick establishment of the object hierarchy and prevent confusion over object ownership.
The next chapter introduces the Active Object Classes and serves as a prelude to describing the MWFM NMOS Active Object Class loader and manager, CLASS.