Network Topology   «Prev  Next»

Lesson 7 Overview of Oracle's topology - Solution, Part 1
Objective The role of service names in establishing database connectivity

Service Names and Database Connectivity

Role of Service Names in establishing database Connectivity?

What is the role of service names in establishing database connectivity? Oracle Net Services software provides the ability to define all the components of a distributed network, including all
  1. database servers,
  2. clients,
  3. listeners, and
  4. database links.
This global definition is called a topology.
To support the topology, Oracle Net Services enables Oracle databases to connect to each other in a seamless fashion. Connectivity is first established in Oracle by defining service names in a special file. In Oracle Net Services, a service name is a name that is used to uniquely identify each Oracle database. Usually a service name is the same as the database name (ORACLE_SID), but it can be different. The service name is translated by Oracle to obtain all the information it needs to connect to the remote database.

Topology Data Model

The topology data model of Oracle Spatial lets you work with data about nodes, edges, and faces in a topology. For example, United States Census geographic data is provided in terms of nodes, chains, and polygons, and this data can be represented using the Spatial topology data model. You can store information about topological elements and geometry layers in Oracle Spatial tables and metadata views. You can then perform certain Spatial operations referencing the topological elements, for example, finding which chains (such as streets) have any spatial interaction with a specific polygon entity (such as a park).
This module describes the Spatial data structures and data types that support the topology data model, and what you need to do to populate and manipulate the structures. You can use this information to write a program to convert your topological data into formats usable with Spatial.

Topology Data Model Concepts

Topology is a branch of mathematics concerned with objects in space. Topological relationships include such relationships as contains, inside, covers, covered by, touch, and overlap with boundaries intersecting. Topological relationships remain constant when the coordinate space is deformed, such as by twisting or stretching. (Examples of relationships that are not topological include length of, distance between, and area of.) The basic elements in a topology are its nodes, edges, and faces. A node, represented by a point, can be isolated or it can be used to bound edges. Two or more edges meet at every non-isolated node. A node has a coordinate pair associated with it that describes the spatial location for that node. Examples of geographic entities that might be represented as nodes include start and end points of streets, places of historical interest, and airports (if the map scale is sufficiently large).

An edge is bounded by two nodes:
  1. the start (origin) node and
  2. the end (terminal) node.
An edge has an associated geometric object, usually a coordinate string that describes the spatial representation of the edge. An edge may have several vertices making up a line string, circular arc string, or combination. Examples of geographic entities that might be represented as edges include segments of streets and rivers. The order of the coordinates gives a direction to an edge, and direction is important in determining topological relationships. The positive direction agrees with the orientation of the underlying edge, and the negative direction reverses this orientation. Each orientation of an edge is referred to as a directed edge, and each directed edge is the mirror image of its other directed edge. The start node of the positive directed edge is the end node of the negative directed edge. An edge also lies between two faces and has references to both of them. Each directed edge contains a reference to the next edge in the contiguous perimeter of the face on its left side.

A face, represented by a polygon, has a reference to one directed edge of its outer boundary. If any island nodes or island edges are present, it also has a reference to one directed edge on the boundary of each island. Examples of geographic entities that might be represented as faces include parks, lakes, counties, and states.
Figure 3-7 shows a simplified topology containing nodes, edges, and faces. The arrowheads on each edge indicate the positive direction of the edge (or, more precisely, the orientation of the underlying line string or curve geometry for positive direction of the edge).

simplified topology containing nodes, edges, and faces
  1. E elements (E1, E2, and so on) are edges, F elements (F0, F1, and so on) are faces, and N elements (N1, N2, and so on) are nodes.
  2. F0 (face zero) is created for every topology. It is the universal face containing everything else in the topology. There is no geometry associated with the universal face. F0 has the face ID value of -1 (negative 1).
  3. There is a node created for every point geometry and for every start and end node of an edge. For example, face F1 has only one edge (a closed edge), E1. The edge has the same node as the start and end nodes (N1).
  4. An island node is a node that is isolated in a face. For example, node N4 is an island node in face F2.
  5. An island edge is an edge that is isolated in a face. For example, edge E25 is an island edge in face F1.
  6. An edge cannot have an island node on it. The edge can broken up into two edges by adding a node on the edge. For example, if there was originally a single edge between nodes N16 and N18, adding node N17 resulted in two edges: E6 and E7.
  7. Information about the topological relationships is stored in special edge, face, and node information tables. For example, the edge information table contains the following information about edges E9 and E10. (Note the direction of the arrowheads for each edge.) The next and previous edges are based on the left and right faces of the edge.

For edge E9, the start node is N15 and the end node is N14, the next left edge is E19 and the previous left edge is -E21, the next right edge is -E22 and the previous right edge is E20, the left face is F3 and the right face is F6. For edge E10, the start node is N13 and the end node is N14, the next left edge is -E20 and the previous left edge is E18, the next right edge is E17 and the previous right edge is -E19, the left face is F7 and the right face is F4.

Performance Considerations

Connect identifiers are stored in a directory server for all clients to access. Depending on the number of clients, there can be a significant load on a directory server. During a connect identifier lookup, a name is searched under a specific Oracle Context. Users expect relatively quick performance so the database connect time is not affected. Because of the scope of the lookup, users may begin to notice slow connect times if lookups takes more than one second. You can resolve performance problems by changing the network topology or implementing replication. In the next lesson, we will continue our examination of Oracle's topology solution with a look at the role of database links in establishing database connectivity.