What are the differences and similarities between objects and literals in the ODMG object model?

The differences and similarities between objects and literals in the ODMG object model are:-

 Objects and literals are the basic building blocks of the object model. The main difference between the two is that an object has both an object identifier and a state (or current value), whereas a literal has a value (state) but no object identifier. In either case, the value can have a complex structure. The object state can change over time by modifying the object value. A literal is basically a constant value, possibly having a complex structure, but it does not change.

An object has five aspects:

  • identifier,
  • name,
  • lifetime,
  • structure,
  • creation. 

There are three types of literal:
atomic, structured, and collection


The differences and similarities between objects and literals in the ODMG object model are:-

Objects and literals are the basic blocks of an object model.

a) Object has both object identifier and state, literal has no object identifier.
b) Object states can change over time by modifying object values; literal is basically a constant value that does not change.
c) Objects are identified by their OID whereas literals are identified by their value.
d) Object will have a lifetime it depends on whether the persistent object or transient object lifetime is not applicable to literal.
e) Copy of object results in shallow copy whereas literal result in logical copy objects and literal can be atomic or structured.

Comments

Popular posts from this blog

Discuss classification or taxonomy of virtualization at different levels.

What is RMI? Discuss stub and skeleton. Explain its role in creating distributed applications.

Suppose that a data warehouse consists of the three dimensions time, doctor, and patient, and the two measures count and charge, where a charge is the fee that a doctor charges a patient for a visit. a) Draw a schema diagram for the above data warehouse using one of the schemas. [star, snowflake, fact constellation] b) Starting with the base cuboid [day, doctor, patient], what specific OLAP operations should be performed in order to list the total fee collected by each doctor in 2004? c) To obtain the same list, write an SQL query assuming the data are stored in a relational database with the schema fee (day, month, year, doctor, hospital, patient, count, charge)