Correctly understand the difference between object database and relational database

Source: Internet
Author: User
Tags data structures object model

Object-oriented database system

Object oriented data base system, referred to as Oodbs, is a product of the combination of database technology and object-oriented programming method.

The research of OO data model and object-oriented database system is mainly embodied in: research on extended relation model based on relational database and SQL, research on persistent programming language based on object-oriented programming language, Support OO model, build new object-oriented database system, support OO data model.

Object-Oriented programming method is a practical and feasible programming method to support modular design and software reuse. It focuses the main activities of programming on establishing the connection (or communication) between objects and objects, thus completing the required calculations. An object-oriented program is a collection of objects that are interconnected (or communicated). The basic idea of object-oriented programming is encapsulation and scalability.

Object-oriented database systems support object-oriented data models (hereinafter referred to as OO models). Object-oriented database system is a persistent, shareable object library storage and management; An object library is a collection of objects defined by an OO model.

An OO model is a model that describes the logical organization of real-world entities (objects), the constraints between objects, and so on, in object-oriented perspective. A series of object-oriented core concepts form the basis of OO model. To sum up, the core concepts of the OO model are as follows:

(1) object and Object ID OID (objects IDentifier)

Any entity in the real world is uniformly modeled as an object, each with a unique identity called the object Identifier (OID).

(2) Encapsulation (encapsulation)

Each object is an encapsulation of its state and behavior, where the state is a collection of a set of attribute values for that object, and the behavior is a collection of operations on the state of the object, also known as method.

(3) Class (C1ass)

All objects that share the same attributes and set of methods form an object class (abbreviated Class), and an object is an instance of a class (instance).

(4) class hierarchy (structure)

In an object-oriented database schema, you can define subclasses (such as C2) of a class (such as C1), and the class CL is called a superclass (or parent class) of class C2. Subclasses, such as C2, can also redefine subclasses such as C3. Thus, a set of classes of object-oriented database schemas form a finite hierarchy, called class level.

(5) messages (message)

Because objects are encapsulated, objects and external communications generally can only be passed through explicit messaging, that is, messages are passed externally to objects, properties and methods in the object are accessed and invoked, the required operations are executed internally, and the result of the operation is returned as a message.

The Oodb language is used to describe object-oriented database schemas, and to illustrate and manipulate class definitions and object instances. The Oodb language mainly includes object definition language (ODL) and Object Manipulation Language (OML), and an important subset of object manipulation language is Object Query Language (OQL). Oodb languages generally should have the following functions:

(1) Definition and manipulation of class

Object-oriented database languages can manipulate classes, including defining, generating, accessing, modifying, and revoking classes. The definition of a class includes defining the properties, operating characteristics, inheritance, and constraints of the class.

(2) Definition of operation/method

Object-oriented database language can be used for the definition and implementation of object operations/methods. In operational implementations, language commands can be used to manipulate local data structures of objects. Encapsulation in the object model allows the operation/method to be implemented by different programming languages and hides the fact that different programming languages are implemented.

(3) Manipulation of objects

Object-oriented database language can be used to manipulate (i.e. build, access. Modify and delete) instance object.

At present, there is no standard for object-oriented database language like SQL, so different OODBMS their specific database language.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.