11-06-2008 – Object Oriented DBMSDatabase HistoryLimitations of RDBMSAdvantages of ORDBMS,OODBMSOODBMS: DBMS + OOCharacteristics of OODBMSCommon OO ApplicationsNon Conventional DBMSObject RelationalInformix Universal Server-HistoryDatatypes in Informix USPOSTGRES: Open sourceOracleOODBMS references (products)ORDBMS examplesInserting a new LineObject with FunctionsCalling the Function (Method)Nested TablesSquareSlide 21Knowledge Base/Deductive DBExamples of Knowledge Base DBMSGIS Life ExpectancyGIS PopulationEnd of LectureCS 8630 Database Administration, Dr. Guimaraes11-06-2008 – Object Oriented DBMSClassWill Start Momentarily…CS8630 Database AdministrationDr. Mario GuimaraesCS 8630 Database Administration, Dr. GuimaraesDatabase History•1960s Legacy Systems: Hierarchical and Network DBMS•1970s Relational DBMS•1980s Non conventional DBMSCS 8630 Database Administration, Dr. GuimaraesLimitations of RDBMSRelational Database works well to store just text and numbers as long as there are not many multi-valued attributes.CS 8630 Database Administration, Dr. GuimaraesAdvantages of ORDBMS,OODBMS•Multi-valued attributes,•Super/Sub-types: inheritance•Interfaces well with OOPL•Multi-mediaCS 8630 Database Administration, Dr. GuimaraesOODBMS: DBMS + OO•Serve many applications•Integrity constraints•Concurrency•Security•Views•Easy query language•Permanent Objects•Classes and Objects•Properties and Methods•Events and Messages•Inheritance•Encapsulation•Multiple Inheritance and PolymorphismCS 8630 Database Administration, Dr. GuimaraesCharacteristics of OODBMS•Not as standard as Relational DBMS•Object ID (system unique, immutable, not visible by end-user)•Versions•Many different types of records as opposed to Relational DBMS (many instances of few different types of records)•Spatial ComponentCS 8630 Database Administration, Dr. GuimaraesCommon OO Applications•Computer-aided design (CAD) •Computer-aided manufacturing (CAM)•Geographic information systems (GIS) •Office Automation•Computer-aided publishing•Multimedia databasesCS 8630 Database Administration, Dr. GuimaraesNon Conventional DBMS1980s – 3 popular approaches•Object Relational (Extend the Relational Model)•Construct an OODBMS from scratch•Knowledge Base Management Systems (OODBMS).CS 8630 Database Administration, Dr. GuimaraesObject Relational•Examples:POSTGRES (many features, open source)Informix Universal Server (many OO features)Oracle (limited)MS-Access (very limited, picture field)CS 8630 Database Administration, Dr. GuimaraesInformix Universal Server-History•INGRES (Relational DBMS – UC Berkeley)•POSTGRES (OO features added to INGRES at UC Berkeley)•Montage -> Miro -> Ilustra•Ilustra + Informix (relational DBMS that dominated market in 80s with Sybase & Oracle)•IBM bought InformixCS 8630 Database Administration, Dr. GuimaraesDatatypes in Informix US•Two dimensional data type (line circle, polygon, path)•Image data types: supports TIFF, GIF, JPEG, photoCD, GROUP 4 and Fax.•Time series data type•Opaque, Distinct, Row type and Collection TypeCS 8630 Database Administration, Dr. GuimaraesPOSTGRES: Open source•DBMS is free and can modify source code•Take over MySQL as the # 1 open source DBMS ?CS 8630 Database Administration, Dr. GuimaraesOracle•Multivalued attributes using VARRAY•Object type•BLOB (Binary large object), CLOB (Characters), BFILE (Binary File), NCLOG (Intern. Characters)•9i: InheritanceCS 8630 Database Administration, Dr. GuimaraesOODBMS references (products)•O2 http://o2tech.com•Gemstone http://www.gemstone.com•Objectstore http://www.odi.com•ITASCA http://www.iprolink.ch/ibex.comCS 8630 Database Administration, Dr. GuimaraesORDBMS examples•Points, Lines and Circles•CREATE TYPE t AS OBJECT ( list of attributes and methods ); / CREATE TYPE PointType AS OBJECT ( x NUMBER, y NUMBER ); / CREATE TYPE LineType AS OBJECT ( end1 PointType, end2 PointType ); / CREATE TABLE Lines ( lineID INT, line LineType );CS 8630 Database Administration, Dr. GuimaraesInserting a new Line•CREATE TABLE Lines ( lineID INT, line LineType );•INSERT INTO Lines VALUES(27, LineType( PointType(0.0, 0.0), PointType(3.0, 4.0) ) );CS 8630 Database Administration, Dr. GuimaraesObject with Functions•CREATE TYPE LineType AS OBJECT (end1 PointType, end2 PointType, MEMBER FUNCTION length (scale IN NUMBER) RETURN NUMBER, PRAGMA RESTRICT_REFERENCES (length, WNDS) ); / •CREATE TYPE BODY LineType AS MEMBER FUNCTION length(scale NUMBER) RETURN NUMBER IS •BEGIN RETURN scale * SQRT((SELF.end1.x-SELF.end2.x)*(SELF.end1.x-SELF.end2.x) + (SELF.end1.y-SELF.end2.y)*(SELF.end1.y-SELF.end2.y) ); END; END; /CS 8630 Database Administration, Dr. GuimaraesCalling the Function (Method)•Display line id and line length•SELECT lineID, ll.line.length(2.0) FROM Lines ll;CS 8630 Database Administration, Dr. GuimaraesNested TablesCREATE TYPE PolygonType AS TABLE OF PointType; / CREATE TABLE Polygons ( name VARCHAR2(20), points PolygonType) NESTED TABLE points STORE AS PointsTable;CS 8630 Database Administration, Dr. GuimaraesSquare•INSERT INTO Polygons VALUES ( 'square', PolygonType(PointType(0.0, 0.0), PointType(0.0, 1.0), PointType(1.0, 0.0), PointType(1.0, 1.0) ) ); SELECT points FROM Polygons WHERE name = 'square';CS 8630 Database Administration, Dr. Guimaraes•ASU: University DB ExampleCS 8630 Database Administration, Dr. GuimaraesKnowledge Base/Deductive DB•Expert System + Database Technology•Stores rules instead of data•Basically Prototypes available at Universities and Research InstitutionsCS 8630 Database Administration, Dr. GuimaraesExamples of Knowledge Base DBMSDatalog (combines PROLOG + Database technology).http://goanna.cs.rmit.edu.au/~zahirt/Teaching/subj-datalog.htmlXSBhttp://www.cs.sunysb.edu/~kostis/Papers/xsb_ddb.htmlCS 8630 Database Administration, Dr. GuimaraesGIS Life ExpectancyCS 8630 Database Administration, Dr. GuimaraesGIS PopulationCS 8630 Database Administration, Dr. GuimaraesEnd of LectureEnd
View Full Document