Object-Oriented Database Development

Only available on StudyMode
  • Download(s) : 620
  • Published : September 28, 2011
Open Document
Text Preview
C h a p t e r

15

Object-Oriented Database Development
L E A R N I N G O B J E C T I V E S

After studying this chapter, you should be able to: ● Concisely define each of the following key terms: atomic literal, collection literal, set, bag, list, array, dictionary, structured literal, and extent. ● Create logical object-oriented database schemas using the object definition language (ODL). ● Transform conceptual UML class diagrams to logical ODL schemas by mapping classes (abstract and concrete), attributes, operations (abstract and concrete), association relationships (one-to-one, one-tomany, and many-to-many), and generalization relationships. ● Identify the type specifications for attributes, operation arguments, and operation returns. ● Create objects and specify attribute values for those objects. ● Understand the steps involved in implementing object-oriented databases. ● Understand the syntax and semantics of the object query language (OQL). ● Use OQL commands to formulate various types of queries. ● Gain an understanding of the types of applications to which object-oriented databases have been applied.

I N T R O D U C T I O N

I

n Chapter 14, we introduced you to object-oriented data modeling. You learned how to conceptually model a database using UML class diagrams. In this chapter, we will describe how such conceptual objectoriented models can be transformed into logical schemas that can be directly implemented using an object database management system (ODBMS). As you will learn later, although relational databases are effective for traditional business applications,

they have severe limitations (in the amount of programming required and DBMS performance) when it comes to storing and manipulating complex data and relationships. In this chapter, we will show how to implement applications within an object-oriented database environment. In Appendix D, you will learn about object-relational databases, which are the most popular way object-oriented principles are implemented in DBMSs.

15-1

15-2

C H A P T E R 15 O B J E C T- O R I E N T E D D A T A B A S E D E V E L O P M E N T

In this chapter, we will adopt the Object Model proposed by the Object Database Management Group (ODMG) (see www.odmg.org) for defining and querying an object-oriented database (OODB). For developing logical schemas, we will specifically use the object definition language (ODL), a data definition language for OODBs specified in the ODMG 3.0 standard (Cattell et al., 2000). The ODMG was formed in 1991 by OODB vendors to create standards, and hence make OODBs more viable. Just as an SQL data definition language (DDL) schema can be implemented in a SQL-compliant relational DBMS (see Chapters 7 and 8), a logical schema created using ODL can be implemented in an ODMG-compliant ODBMS. We will use examples similar to the ones you saw earlier in Chapter 14 to show how to map conceptual UML class diagrams into logical ODL schemas. You will learn how to map classes (abstract and concrete), attributes, operations (abstract and concrete), association relationships (unary and binary), and generalization relationships from a UML class diagram into corresponding ODL constructs. Recall from Chapter 7 that, in addition to the DDL component, SQL has a data manipulation language (DML) component that allows users to quer y or manipulate the data inside a relational database. A similar language, called object query language (OQL), has been specified in the ODMG 3.0 standard to query object databases (Cattell et al., 2000). We will describe how various types of queries can be formulated using OQL. The ODMG has prescribed versions of ODL and OQL for C++, Smalltalk, and Java. We use a generic version in our examples. In Chapter 14, we showed a conceptual object-oriented model for the Pine Valley Furniture Company. In this chapter, we will transform this conceptual model into a logical ODL schema. Finally, we will discuss the types of...
tracking img