Oriented Towards Objects

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

The object-oriented approach to software development is advantageous because it can reduce the effort necessary to build applications. An object is a reusable application component that developers simply need to know how to use, not how it works.

Oracle8 and Object-Oriented Databases

To support object-oriented database application development, Oracle8 lets you create and use object types in your database designs. For example, you might find something similar to the following object type in a typical order-entry database :

Object-Oriented Database Terms and Concepts

Object Types, Classes, and Objects
In simple terms, an object is a collection of related data. For example, an object in an Oracle database typically represents a real-world thing such as a person, place, or thing. More specifically, an object is a simpler term for a specific instance of a class or object type. Instances of the PART-TYPE object type would be parts in a typical order-entry application.

Attributes and Methods

An object type's attributes describe the data elements in corresponding objects. For example, every part has an ID a description, a current inventory quantity (parts on hand), and a reordering threshold. (In relational terms, you might think of object type attributes as column definitions in a table.)

An object type's methods (or predefined behaviours) encapsulate or describe the interface that applications use to work with objects of the type. As a result, application developers do not need to know the details about objects to manipulate them; they simply code applications to access object data using the methods that are available for the type. For example, an application that works with parts can order a quantity of a part and automatically decrease its level in inventory return a quantity of a pan back into inventory, and so on, all by using the methods associated with the PART-TYPE object type. (In relational terms, you might think of an object type's methods as the package of procedures and functions that provide an interface to work with a table's data.)

Subclasses, Inheritance, and Polymorphism

A subclass is a specialized class of an object type. In traditional object-oriented systems, a subclass inherits the attributes and methods of its parent class, and can have additional attributes and methods that are specific to the subclass. However, Should be future releases of Oracle8 support the inheritance of methods, the concept of polymorphism would also be important. When a subclass inherits the methods of its parent class, inherited methods can behave exactly as they do in the parent class, or they can behave differently (they can be polymorphic). Polymorphism happens when a method behaves differently and has varying effects for classes in an object hierarchy. For example, if you define a class named PERSON-TYPE and then a subclass named CUSTOMER-TYPE, the CUSTOMER-TYPE's methods might behave differently than those in the parent class to account for different attributes and other variances. How Will You Use Objects?

Now that you have a basic understanding of objects and object types, how will you decide to use them, if at all? In general, there are three ways to use object types in Oracle database designs :

To implement user-defined dataty es that enhance the creation of relational database models

To created nested tables inside relational database tables

To create object tables that implement an object-oriented database design rather than a relational database design.

Working With Object Types

Now you are ready to learn the basics of creating and using objects in an Oracle database. The following section explain how to create object types in a database, how to build methods for object types, and how to use object types to build tables and other structures in a database,

Before you start creating object types in a database, it's a good idea to understand what you want to achieve by using them. In general, you will create an object type to build a complex, user-defined datatype that more closely matches a real-world thing. Then you and other developers can use this object type to I declare and work with tables and other database objects more easily.

A more advanced use of an object type is to create a nested table type that you can use to embed the data of what would otherwise be a child table into its parent table. For example, rather than create distinct ORDERS and ITEMS tables, you can create an ITEM-TYPE that you then nest in the ORDERS table, Using this design, each ORDER record can have a nested table of associated ITEMS, Rather than performing a join to retrieve an order and its line items, a simple query gets all of the nested table's information at once. Nested tables hide the relationship of two tables (in other words, the data model) from applications and put it with the data itself and can reduce the complexity of subsequent application development.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.