Discuss how OIDs differ from C++ pointers.
What will be an ideal response?
To C++, an object identifier is an address in process memory space. This space is too small for
most database purposes. To an object DBMS, an object identifier cannot be just a memory
address. Scalability requires that object identifiers be valid across storage volumes. Distributed
object databases require that object identifiers be valid across machine boundaries. From the
database management perspective, an object identifier must be a unique identifier that persists
with an object for its entire lifetime, regardless of where it may be stored or moved or how it is
being used. The object DBMS can then use object identifiers as the basis of references used to
implement relationships.
However, from the programming language perspective, there should be no need to introduce
reference syntax to supplement pointers. Pointers should be used instead of object identifiers or
object identifiers should simply behave like pointers, even if the object DBMS eventually
converts the addresses to the equivalent of object identifiers with a larger scope.
Traversal paths are not the same as C++ pointers. First, an object DBMS creates and deletes
traversal paths in pairs. In contrast, just because one C++ object points to another does not
mean there is a reverse pointer. Second, it is the responsibility of an object DBMS to maintain
the referential integrity of relationships. If an object that participates in a relationship is
deleted, a subsequent attempt to traverse the relationship (in either direction) should raise an
exception rather than referencing invalid space. C++ associates no semantics with following a
pointer. An application is allowed to dereference any of its pointers, regardless of whether
they point to meaningful space.
An object DBMS cannot even use pointers directly to represent relationships, because by
definition pointers are not locationindependent. Because relationships are logical, they must
remain valid even when the associated objects move. When an object is moved in memory, its
address changes. A pointer to that object now points to something else. However, when an
object is moved in memory, all of its relationships must retain their validity. This must be
true, even if the object is moved from main memory to disk, or to a different disk volume, or
to a different site on the network. Object identifiers, which are locationindependent can also
use object identifiers to implement relationships.
You might also like to view...
A packet monkey is an unskilled programmer who spreads viruses and other malicious scripts to exploit computer weaknesses.
Answer the following statement true (T) or false (F)
The condition expression1 || expression2 evaluates to false when .
a) expression1 is true and expression2 is false b) expression1 is false and expression2 is true c) both expression1 and expression2 are true d) both expression1 and expression2 are false
Choose the correct verb to agree in number with the subject of the following sentence.? Ski packages at the lodge __________available until March 15.
A. ?is B. ?are
If you type the last 2 digits of a year as 13, such as 1/1/17, Access assumes that they signify:
A. 1817 B. 1917 C. 2017 D. You must type 4 digits for year data.