![]() |
Oriented Towards Objects![]() ![]() ![]() ![]() ![]()
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
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 NamesSQL Database Management Systems Relational Database Management System Properties of RDBMS Client Server Computing Oracle Relational Database Database Structure and Space Management SQL Data Types How to Use Data Types? What is Operators and Conditions Character OperatorsOperator Precedence Data Retrieval Using SQL Plus SQL Data Definitions Data Retrieval Using Select SQL Operator Precedence Selecting Rows and Columns The Group by Clause
Having Clause Union, Union all, Intersact and Minus Commands Playing with Numbers Date Functions Example of Date Arithmetic Working with Null Values
Joining Tables and Subqueries Views Synonyms Indexes Clusters Sequences Formatting Query Results with SQL Plus Data Integrity The Optimizer How Oracle Optimizes SQL Statements Evaluating Expression and ConditionsOptimization Hints PL-SQL PL-SQL Architecture Error Reporting Functions Character Functions Composite Data Types PL-SQL Structures How to use PL-SQL Structures Normalization Operator Precedence Cursor Error Handling Database Triggers Types of Triggers Locking Sub Programs Packages New and Improved Data Types Improved Select Statement Advanced Quering Improved Scalability Improved Performance Via Partitioning Object Relational Features Heterogeneous Data Access Improved Security Administration New Data Types Improved Select Statement Changes to the Select Statement Improved Scalability Data Partitioning Oriented Toward Objects Character Functions Creating Object Types Created Nested Tables Oracle8 and Distributed Database Oracle8 Database Management and Security Distributed Database Invoking Export Invoking ImportWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |