Database Tutorial

Course Tutorial Site

Site Admin

Namespaces

without comments

Namespaces are lists of distinct identifiers. Identifiers are lexical values. All programming languages use lexical values to manage program activity and scope. A lexical in spoken or written language may be as simple as a word or:

  • A multiword expression, like “by the way”.
  • Idioms, like “break a leg”.
  • Text frames, like: “First…; Second…; Third…;”.

Linguistically, they may also be: part of a word, phrasal verbs, collocations, institutionalized utterances, sayings, or sentence frames and heads. Lexical units in the context of programming are most like words or text frames, and are most often divided into the following four groups:

  • Delimiters
  • Identifiers
  • Literals
  • Comments

Delimiters

Delimiters can be curly braces ({}) to identify a block, single quotes ('') to identify a string literal, two dashes (--) to identify a comment following the dashes, or an operator to assign meaning between identifiers and literals. Operators can perform various operations, like addition, subtraction, or concatenation (gluing strings together); or they can assign the contents of a literal or identifier to another identifier.

Identifiers

Identifiers are keywords used by programming languages or variable names used by developers. They follow a prescribed pattern of construction.

Literals

A literal value is like a string or a date, and they are typically enclosed by a set of single or double quotes.

Comments

A comment value is a string that provides information about a program to the developer and support staff personnel.

A namespace is a hierarchy of unique identifiers, where the identifiers are typically strings representing variable names. In the scope of a program, variables are unique in the global scope; and then in the scope of a named program units or nested unnamed program units.

A namespace in a database management system works similarly. The first level of a database namespace is the database name. The second level is the object name, which may be a table, sequence, constraint, or link. The third level are column names within tables.

Oracle implements database triggers in their own namespace, which means a trigger name can be the same as an object name in any database. Databases are also called schema.

Written by michaelmclaughlin

January 13th, 2019 at 8:21 pm

Posted in