Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Data Base. Traditional Data Models : Hierarchical, Network (since mid- 60’s), Relational (since 1970 and commercially since 1982) Object.

Similar presentations


Presentation on theme: "Object Oriented Data Base. Traditional Data Models : Hierarchical, Network (since mid- 60’s), Relational (since 1970 and commercially since 1982) Object."— Presentation transcript:

1 Object Oriented Data Base

2 Traditional Data Models : Hierarchical, Network (since mid- 60’s), Relational (since 1970 and commercially since 1982) Object Oriented (OO) Data Models since mid-90’s Reasons for creation of Object Oriented Databases Need for more complex applications Need for additional data modeling features Increased use of object-oriented programming languages Commercial OO Database products – several in the 1990’s, but did not make much impact on mainstream data management MAIN CLAIM: OO databases try to maintain a direct correspondence between real-world and database objects so that objects do not lose their integrity and identity and can easily be identified and operated upon Object: Two components: state (value) and behavior (operations).Introduction

3 3 OODBMS Vendors GemStone Systems, Inc. Hewlett-Packard, Inc. (OpenODB) IBEX Corporation, SA. Illustra (Informix, Inc.) Matisse Software, Inc. O2 Technology, Inc. Objectivity, Inc. Object Design, Inc. ONTOS, Inc. POET Software Corporation UniSQL Unisys Corporation (OSMOS) Versant Object Technology

4 ODMG (Object Data Management Group) Provides a standard model for object databases (Object Model)(Object Model) Supports object definition via ODLODL Supports object querying via OQLOQL Supports a binding with OOL (Three langusges : C++, Java, SMALTALK).a binding with OOL

5 The Object Model of ODMG Interface and Class Definition ODMG supports two concepts for specifying object types Interface & Class Both have behaviors (operations) and state (attributes and relationships) Interface An interface is a specification of the abstract behavior of an object type State properties of an interface (i.e., its attributes and relationships) cannot be inherited from Objects cannot be instantiated from an interface Class A class is a specification of abstract behavior and state of an object type A class is Instantiable Supports “extends” inheritance to allow both state and behavior inheritance among classes Multiple inheritance via “extends” is not allowed

6 Object Definition Language (ODL) ODL supports semantics constructs of ODMG ODL is independent of any programming language ODL is used to create object specification (classes and interfaces) ODL is not used for database manipulation

7 A Very Simple Class ODL Examples A very simple, straightforward class definition class Degree { attribute string college; attribute string degree; attribute string year; };

8 Inheritance via “:” – An Example interface Shape { attribute struct point {…} reference_point; float perimeter (); … }; class Triangle: Shape (extent triangles) { attribute short side_1; attribute short side_2; … };

9 Object Query Language (OQL) OQL is DMG’s query language OQL works closely with programming languages such as C++ Embedded OQL statements return objects that are compatible with the type system of the host language OQL’s syntax is similar to SQL with additional features for objects

10 Simple OQL Queries Basic syntax: select…from…where… SELECT d.name FROM d in departments WHERE d.college = ‘Engineering’; An entry point to the database is needed for each query An extent name (e.g., departments in the above example) may serve as an entry point

11 An Example of OQL View A view to include students in a department who have a minor: define has_minor(dept_name) as select s from s in students where s.minor_in.dname=dept_name has_minor can now be used in queries

12 An Example of an OQL Aggregate Operator To compute the average GPA of all seniors majoring in Business: avg (select s.gpa from s in students where s.class = ‘senior’ and s.majors_in.dname =‘Business’);

13 Binding with OOL Example : C++ Language Binding C++ language binding specifies how ODL constructs are mapped to C++ statements and include: – a C++ class library – a Data Manipulation Language (ODL/OML) – a set of constructs called physical pragmas (to allow programmers some control over the physical storage concerns)

14 Class Library The class library added to C++ for the ODMG standards uses the prefix d_ for class declarations d_Ref is defined for each database class T To utilize ODMG’s collection types, various templates are defined, e.g., d_Object specifies the operations to be inherited by all objects

15 Template Classes A template class is provided for each type of ODMG collections: – d_Set – d_List – d_Bag – d_Varray – d_Dictionary Thus a programmer can declare: d_Set >

16 Data Types of Attributes The data types of ODMG database attributes are also available to the C++ programmers via the d _ prefix, e.g., d_Short, d_Long, d_Float Certain structured literals are also available, e.g., d_Date, d_Time, d_Intreval

17 Object Database Design For several years, entity-relationship diagrams were the predominant model­ing technique for database design. OOD Design used Unified Modeling Language (UML) method, instead of traditional entity-relationship (ER) The basic similarities between ER and class diagrams are – entities (classes) are drawn as boxes – binary relationships (associations) are drawn as connecting lines – n-ary associations (relationships) are drawn as diamonds. The main dif­ferences between UML and ER diagrams occur in the details. In UML the multiplicity of an association is shown as simple numerical notation instead of as a cryptic icon

18 18 Object Definition--encapsulation. – Object Name – Properties – Methods Customer CustomerID Address Phone AddCustomer DropCustomer Class name Properties Methods Commercial Contact VolumeDiscount ComputeDiscount Government Contact BalanceDue BillLateFees AddCustomer Inheritance Polymorphism Entity:Something in the real world that we wish to describe or track. Class: Description of an entity, that includes its attributes (properties) and behavior (methods). Object:One instance of a class with specific data. Property:A characteristic or descriptor of a class or entity. Method:A function that is performed by the class. Association:A relationship between two or more classes.

19 Data Mining: Introduction

20 What is Data Mining? Too much data and not enough information — this is a problem facing many businesses and industries Many Definitions – Non-trivial extraction of implicit, previously unknown and potentially useful information from data – Exploration & analysis, by automatic or semi-automatic means, of large quantities of data in order to discover meaningful patterns – Data mining, data dredging, fishing Expeditions – Knowledge Discovery in Databases (KDD )

21 Why Mine Data? Scientific Viewpoint Data collected and stored at enormous speeds (GB/hour) – remote sensors on a satellite – telescopes scanning the skies – microarrays generating gene expression data – scientific simulations generating terabytes of data Traditional techniques infeasible for raw data Data mining may help scientists – in classifying and segmenting data – in Hypothesis Formation

22 What is (not) Data Mining? l What is Data Mining? – Certain names are more prevalent in certain US locations (O’Brien, O’Rurke, O’Reilly… in Boston area) – Group together similar documents returned by search engine according to their context (e.g. Amazon rainforest, Amazon.com,) l What is not Data Mining? – Look up phone number in phone directory – Query a Web search engine for information about “Amazon”

23 Data Mining Tasks Description Methods Find human-interpretable patterns that describe the data. l Prediction Methods Use some variables to predict unknown or future values of other variables. l Clustering l Association Rule Discovery l Sequential Pattern Discovery l Classification l Regression l Deviation Detection

24


Download ppt "Object Oriented Data Base. Traditional Data Models : Hierarchical, Network (since mid- 60’s), Relational (since 1970 and commercially since 1982) Object."

Similar presentations


Ads by Google