Object Relational Concepts and Systems

Size: px
Start display at page:

Download "Object Relational Concepts and Systems"

Transcription

1 and Systems Principles Constructed Types and non first normal form relations User Defined Types Motivation Objects and Relations Object Relational Systems Principles: Keep the goodies of RDB Enhance relational systems by constructed types, inheritance, methods Supported by SQL-99 standard Issues Technologically outdated solutions stabilized e.g. type system, baroque constructs of SQL Add-on usually worse than completely new approach Important aspect: Save investment into your software by upward compatibility of.... DBS, application software ORDBS: Postgres, Oracle, Informix, DB2 hs / FUB dbsii-03-4ordbs-2

2 Object types SQL-99: Additional Types Literal types Collections: Array, List, Set and table type Lobs ("large objects"): Binary (Blob), Character (CLOB) image blob movie(2gb) Object types A row may be an object which has attributes and can be referenced CREATE TYPE AdressType AS OBJECT ( city VARCHAR(30), zipcode VARCHAR(15), street VARCHAR (30), number VARCHAR(5), country VARCHAR(15) ); / hs / FUB dbsii-03-4ordbs-3 Object Types, Object Tables Object types CREATE TYPE MovieType AS OBJECT ( mid Int, title VARCHAR(30), director VARCHAR(25), year date ); / Object table SQL> CREATE TABLE MovieObjects OF MovieType; Objects may only live in a table hs / FUB dbsii-03-4ordbs-4

3 References REFerences CREATE TABLE MovieTape ( Id Int, movie REF MovieType, since date, back date ); Table with object reference ud: 007 movie: since: back: REF types have values, can be seen by user as opposed to OO languages hs / FUB dbsii-03-4ordbs-5 References References in Oracle System generated OIDs, system wide unique values, even in a distributed environment or OIDs derived from a primary key Relationship between system generated and primary keys have to be established by application program Structure of OIDs implementation defined, don't use them explicitly hs / FUB dbsii-03-4ordbs-6

4 Object types and Tables with structured attribute types (Non First Normal Form) 1 Create TABLE TapeStruct ( 2 id INT, 3 format CHAR(5), 4 movie MovieType, 5 since date, 6* back date) 7 ; Object as Structured attribute No difference between structured types and object types SQL> CREATE OR REPLACE TYPE Foo (bar Int); 2 / Warnung: Typ wurde mit Kompilierungsfehlern erstellt. hs / FUB dbsii-03-4ordbs-7 Using Object types Type constructors Each type defined by AS OBJECT has a type constructor <objectname> Constructor wraps the fields e.g. MovieType(65, 'To be or not to be','anti-war',0.5, 'Lubitsch', todate('1942', 'YYYY')) Used in insert statement: SQL> Insert INTO MovieObjects VALUES ( MovieType(65, 'To be or not to be', 'Lubitsch', to_date('1942', 'YYYY'))) And more hs / FUB dbsii-03-4ordbs-8

5 Using Object types Inserting into tables with structured and unstructured attributes (fields) SQL> INSERT INTO TapeStruct VALUES(10,'DVD',MOVIETYPE(65, 'To be or not to be', 'Lubitsch', ' '),NULL,NULL); Doesn't work with REF attributes: object different from ref 1 INSERT INTO MovieTape VALUES(10, 2* MOVIETYPE(65, 'To be or not to be', 'Lubitsch', ' '),NULL,NULL) 3 ; MOVIETYPE(65, 'To be or not to be', 'Lubitsch', ' '),NULL,NULL) * FEHLER in Zeile 2: ORA-00932: nicht übereinstimmende Datentypen hs / FUB dbsii-03-4ordbs-9 Using Object types Inserting REFerences in two steps INSERT INTO MovieTape VALUES(10,NULL,NULL,NULL) 1 UPDATE MovieTape SET movie = 2 (SELECT ref(p) FROM MovieObjects p 3 WHERE p.mid = 65) 4* WHERE id=10 5 ; How to access fields of referenced objects? Dereferencing: SQL-99 with explicite dereferencing: MovieTape.movie->title Oracle implicitly (like Java) <MovieTape-alias>.movie.title hs / FUB dbsii-03-4ordbs-10

6 Selection of REFerenced objects SQL> SELECT m.movie.title FROM MovieTape m; MOVIE.TITLE To be or not to be References and Select Alias essential REF(x): Selecting References (!) SQL> SELECT movie FROM MovieTape; -- movie is a REF type MOVIE F5CD054159CB4F D7841FAF DEF1481E BA83DA5399F84E12 hs / FUB dbsii-03-4ordbs-11 References and Select Accessing referenced objects: DEREF operator SQL> Select DEREF(p.movie) from MovieTape p; DEREF(P.MOVIE)(MID, TITLE, DIRECTOR, YEAR) MOVIETYPE(65, 'To be or not to be', 'Lubitsch ') Accessing values of objects: VALUE operator SQL> select value(p) from movieobjects p; VALUE(P)(MID, TITLE, DIRECTOR, YEAR) MOVIETYPE(65, 'To be or not to be','lubitsch', ' ') MOVIETYPE(67, 'Jurassic Parc', 'Spielberg', ' ') hs / FUB dbsii-03-4ordbs-12

7 Select Emulation of table select select * from MovieObjects; MID TITLE DIRECTOR YEAR To be or not to be Lubitsch Jurassic Parc Spielberg Means: object tables may be queried like ordinary tables But relational tables are different from object tables even if no oo features are used hs / FUB dbsii-03-4ordbs-13 Methods An example using methods Points, lines and line length SQL> create TYPE Point_T AS OBJECT ( 2 x NUMBER, 3 y NUMBER 4 ); 5 / SQL> CREATE TYPE Line_T AS OBJECT ( 2 end1 Point_T, 3 end2 Point_T 4 (; 5 / SQL> CREATE TABLE Lines ( 2 lineid INT, 3 line Line_T); -- value, no REF hs / FUB dbsii-03-4ordbs-14

8 Methods Insertion of lines SQL> INSERT INTO Lines 2 VALUES (10, Line_T ( 3 Point_T(0.0,0.0), 4 Point_T(1.0, 2.0) 5 ) 6 ); Abstract Data Types User defined type specifies fields and the signature of methods ("Member functions") Implementation of body separately hs / FUB dbsii-03-4ordbs-15 Methods Adding of a method linelength to Type Line SQL> ALTER TYPE Line_T REPLACE AS OBJECT( 2 end1 Point_T, 3 end2 Point_T, 4 MEMBER FUNCTION linelength (scale IN NUMBER) RETURN NUMBER, 5 PRAGMA RESTRICT_REFERENCES (linelength, WNDS) 6 ); IN, OUT and INOUT parameter in signature Pragma "Write No Database State" (WNDS) needed if function is to be used in SELECTs hs / FUB dbsii-03-4ordbs-16

9 Methods Implementing a method CREATE TYPE BODY Line_T AS MEMBER FUNCTION linelength (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; / No parameter mode in method implementation hs / FUB dbsii-03-4ordbs-17 Methods Selection with user-defined methods SELECT lineid, l.line.linelength(1.0) FROM Lines l; LINEID L.LINE.LINELENGTH(1.0) , , SELECT l.line.end1, l.line.end2 FROM Lines l WHERE l.line.linelength(1) > 1.5; LINE.END1(X, Y) LINE.END2(X, Y) POINT_T(0, 0) POINT_T(1, 2) hs / FUB dbsii-03-4ordbs-18

10 Collection types Collection Types SET, Multiset, List constructors for primitive and constructed types e.g. Phones SET (VARCHAR(20)) Polygon LIST (Point_T) Value of constructed coolection type may be regarded as a table Name Phones. Abel (432,8764). id polygon. 11 [(432,874) (101,200) (111,343)] 13 Non First Normal Form Relations hs / FUB dbsii-03-4ordbs-19 Collection Types in Oracle 9 Varrays variable number of values of some type CREATE TYPE ExtentT as VARRAY(4) OF Int; CREATE OR REPLACE TYPE Address_T AS OBJECT ( zipcode CHAR(6), ciy VARCHAR(20), street VARCHAR(25), no CHAR(5)); CREATE TABLE PhoneBook ( name VARCHAR(30), firstname VARCHAR(20), addr Address_T, phones ExtentT); hs / FUB dbsii-03-4ordbs-20

11 Using VARRAY INSERT INTO PhoneBook VALUES( 'Abel', 'Hendrik', ADDRESS_T('12347', 'Berlin', 'Takustr.','9'), ExtentT(2347, 1139)); SELECT b.name, b.addr.street, b.phones FROM PhoneBook b WHERE 2347 IN (SELECT * FROM TABLE(b.phones)); NAME ADDR.STREET PHONES Abel Takustr. EXTENSION_T(2347, 1139) No way to address by position e.g. phones[2] Cast of a varray to a table hs / FUB dbsii-03-4ordbs-21 Nested tables Nested table Table (type) used as column type CREATE TYPE Polygon_T AS TABLE OF Point_T; CREATE TABLE Polygons ( pid CHAR(5), points Polygon_T) NESTED TABLE points STORE AS PointsTab; Stored outside table Polygons, Has to be made explicit Restriction: only one level of nesting (Oracle 9i: no restriction) hs / FUB dbsii-03-4ordbs-22

12 Nested tables: another example Rel a1: NUMBER, a2: SetB CREATE TYPE SetNum_AS TABLE OF Number; CREATE TYPE B AS OBJECT (b1: INTEGER, b2 SetNum); CREATE TYPE SetB AS TABLE OF B; CREATE TABLE Rel (a1 NUMBER, a2 SetB) NESTED TABLE a2 STORE AS TabSetB (Nested Table COLUMN_VALUE STORE AS TabSetNum); hs / FUB dbsii-03-4ordbs-23 Nested Tables: insertion INSERT INTO Polygons VALUES( 'squ01', Polygon_T(Point_T(0.0, 0.0), Point_T(0.0, 1.0), Point_T(1.0, 0.0), Point_T(1.0, 1.0) ) ); Insert values of 'inner table' as a list of constructed values (here of type Point_T ) hs / FUB dbsii-03-4ordbs-24

13 Querying nested tables SELECT points FROM Polygons WHERE pid LIKE 'squ%'; -- finds all squares Querying the inner table SELECT ss.x FROM THE(SELECT points -- keyword THE FROM Polygons WHERE pid ='squ01' ) ss -- Alias for inner WHERE ss.x = ss.y; -- table -- qualification Must identify exactly one row hs / FUB dbsii-03-4ordbs-25 Querying nested tables using inner tables SELECT t.pid FROM Polygons t WHERE EXISTS (SELECT ss.x FROM TABLE(SELECT points FROM Polygons t2 WHERE t2.pid =t.pid ) ss WHERE ss.x = ss.y) AND pid <> 'squ01'; Select one row in polygons and select a table value (points) Additional outer qualification predicate Inner qualification on table value hs / FUB dbsii-03-4ordbs-26

14 insert From relations to object-relations Suppose there is a flat table CREATE TABLE LinesFlat( id INT, x1 NUMBER,y1 NUMBER,x2 NUMBER,y2 NUMBER ); INSERT INTO Lines SELECT id, Line_T(Point_T(x1,y1), Point_T(x2,y2)) FROM LinesFlat; Insertion, values supplied by SELECT, constructed by appropriate type hs / FUB dbsii-03-4ordbs-27 Collection types: insert Insertion into complex structured table Suppose, there is a flat Polygon table CREATE TABLE PolyFlat ( name VARCHAR2(20), x NUMBER, y NUMBER ); Steps to insert all the points with name 'triangle' into the Polygon Table with nested table attribute points Query PolyFlat to get all points belonging to triangle Turn the collection of answers into relation using keyword MULTISET Turn relation into a Polygon_T value by CAST AS Polygon_T hs / FUB dbsii-03-4ordbs-28

15 Inserting from a flat into a nested table INSERT INTO Polygons VALUES('square', CAST( MULTISET(SELECT x, y FROM PolyFlat WHERE name = 'square' ) AS Polygon_T ) ); hs / FUB dbsii-03-4ordbs-29 Final remarks No inheritance in Oracle 8i, but SQL-99.. and Oracle >= 9 Object-relational technology is mature Lack of standards prevents heavy usage despite SQL-99 Might improve the 'impedance mismatch' between programming languages and relational database while keeping the advantages of tabular data Use of ORDB in O/R mapping?? The more concepts the more implementations the more solutions the more bugs? Does the base Principle of RDM still hold: Keep it simple, stupid! hs / FUB dbsii-03-4ordbs-30

SQL:1999 additional features. Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999

SQL:1999 additional features. Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999 SQL:1999 additional features Object-oriented concepts Object relational concepts in SQL:1999 Active database concepts Active concepts in SQL:1999 Additional features : Motivation Not in relational model:

More information

Chapter 1 : Overview

Chapter 1 : Overview Chapter 1 : Overview Overview of SQL3 Object Features * User defined data tyes * Oracle8/SQL Methods, Abstract Data Types * References, Collections, Large Object 2 Course Material Course Notes Butterfly

More information

AN ADVANCED COURSE IN DATABASE SYSTEMS: BEYOND RELATIONAL DATABASES

AN ADVANCED COURSE IN DATABASE SYSTEMS: BEYOND RELATIONAL DATABASES AN ADVANCED COURSE IN DATABASE SYSTEMS: BEYOND RELATIONAL DATABASES Chapter 9 Case Studies: Relational, Object-Relational, and Object-Oriented Database Implementations Suzanne W. Dietrich and Susan D.

More information

1 ODBMS vs RDBMS 1. 3 Resources 16

1 ODBMS vs RDBMS 1. 3 Resources 16 Table of Contents Spis treści 1 ODBMS vs RDBMS 1 2 Object-Relational Model 3 2.1 Object Types.................................. 4 2.2 Using Objects.................................. 9 2.3 Inheritance...................................

More information

Topic 3 Object Relational Database

Topic 3 Object Relational Database Topic 3 Object Relational Database Limitation of Relational Data Model Uniformity Large number of similarly structure data Record orientation Basic data consists of fixed length records Small data items

More information

3. Object-Oriented Databases

3. Object-Oriented Databases 3. Object-Oriented Databases Weaknesses of Relational DBMSs Poor representation of 'real world' entities Poor support for integrity and business rules Homogenous data structure Limited operations Difficulty

More information

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210 SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 2-3 Objectives This lesson covers the following objectives: Define data type and explain why it is needed List and describe categories of data types Give examples of scalar

More information

Chapter 12 Object and Object Relational Databases

Chapter 12 Object and Object Relational Databases Chapter 12 Object and Object Relational Databases - Relational Data Model - Object data model (OODBs) - Object-relational data models Traditional data models -network - hierarchical - relational They lack

More information

SQL:1999 and Recent Developments in SQL Standardisation

SQL:1999 and Recent Developments in SQL Standardisation SQL:1999 and Recent Developments in SQL Standardisation by Hugh Darwen IBM United Kingdom Limited Hugh_Darwen@uk.ibm.com 22 May, 2001 (Cambridge University) (c) Hugh Darwen 2001 1 The Parts of SQL Part

More information

Keep relation as the fundamental. Compare with ëobject-oriented DBMS," which. and tacks on relations as one of many types.

Keep relation as the fundamental. Compare with ëobject-oriented DBMS, which. and tacks on relations as one of many types. Object-Relational Systems Object-oriented ideas enter the relational world. Keep relation as the fundamental abstraction. Compare with ëobject-oriented DBMS," which uses the class as the fundamental abstraction

More information

Introduction to Oracle Objects

Introduction to Oracle Objects This lab describes the advantages and key features of the Oracle object-relational model. The lab contains these topics: About Oracle Objects Advantages of Objects About Oracle Objects Oracle object types

More information

Keep relation as the fundamental. Compare with ëobject-oriented DBMS," which. and tacks on relations as one of many types.

Keep relation as the fundamental. Compare with ëobject-oriented DBMS, which. and tacks on relations as one of many types. Object-Relational Systems Object-oriented ideas enter the relational world. Keep relation as the fundamental abstraction. Compare with ëobject-oriented DBMS," which uses the class as the fundamental abstraction

More information

Constructs in Oracle

Constructs in Oracle 11. Object-Relational Constructs in Oracle 11-1 Part 11: Object-Relational References: Constructs in Oracle Jeffrey D. Ullman: Object-Relational Features of Oracle [http://infolab.stanford.edu/ ullman/fcdb/oracle/or-objects.html]

More information

4 Schema Definition with SQL / DDL (II)

4 Schema Definition with SQL / DDL (II) 4 Schema Definition with SQL / DDL (II) 4.3 SQL/DDL Constraints 4.3.1 Attribute and simple table constraints 4.3.2 Enforcing cardinality constraints and foreign keys 4.3.3 Deferred constraints 4.3.4 Assertions

More information

Object-Relational Database Systems (ORDBS) Contains slides made by Naci Akkøk, Pål Halvorsen, Arthur M. Keller and Vera Goebel.

Object-Relational Database Systems (ORDBS) Contains slides made by Naci Akkøk, Pål Halvorsen, Arthur M. Keller and Vera Goebel. Object-Relational Database Systems (ORDBS) Contains slides made by Naci Akkøk, Pål Halvorsen, Arthur M. Keller and Vera Goebel. Data Models & Database System Architectures - Chronological Overview - Network

More information

Chapter 9: Object-Based Databases

Chapter 9: Object-Based Databases Chapter 9: Object-Based Databases Chapter 9: Object-Based Databases Complex Data Types and Object Orientation Structured Data Types and Inheritance in SQL Table Inheritance Array and Multiset Types in

More information

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1 COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database Extensions to SQL ODMG Object Model and the Object Definition Language ODL Object Database Conceptual

More information

Full file at

Full file at ch2 True/False Indicate whether the statement is true or false. 1. The SQL command to create a database table is an example of DML. 2. A user schema contains all database objects created by a user. 3.

More information

Chapter 9: Object-Relational Databases

Chapter 9: Object-Relational Databases Chapter 9: Object-Relational Databases! Nested Relations! Complex Types and Object Orientation! Querying with Complex Types! Creation of Complex Values and Objects! Comparison of Object-Oriented and Object-Relational

More information

Object-Relational Data Models. Chapter 9: Object-Relational Databases. Example of a Nested Relation. Nested Relations

Object-Relational Data Models. Chapter 9: Object-Relational Databases. Example of a Nested Relation. Nested Relations Chapter 9: Object-Relational Databases Object-Relational Data Models! Nested Relations! Complex Types and Object Orientation! Querying with Complex Types! Creation of Complex Values and Objects! Comparison

More information

IBM DB2 UDB V7.1 Family Fundamentals.

IBM DB2 UDB V7.1 Family Fundamentals. IBM 000-512 DB2 UDB V7.1 Family Fundamentals http://killexams.com/exam-detail/000-512 Answer: E QUESTION: 98 Given the following: A table containing a list of all seats on an airplane. A seat consists

More information

Chapter 11 Object and Object- Relational Databases

Chapter 11 Object and Object- Relational Databases Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational

More information

9 Working with the Java Class Library

9 Working with the Java Class Library 9 Working with the Java Class Library 1 Objectives At the end of the lesson, the student should be able to: Explain object-oriented programming and some of its concepts Differentiate between classes and

More information

PL / SQL Basics. Chapter 3

PL / SQL Basics. Chapter 3 PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd.

Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd. Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB Marc Stampfli Oracle Software (Switzerland) Ltd. Underestimation According to customers about 20-50% percent

More information

Ch. 21: Object Oriented Databases

Ch. 21: Object Oriented Databases Ch. 21: Object Oriented Databases Learning Goals: * Learn about object data model * Learn about o.o. query languages, transactions Topics: * 21.1 * 21.2 * 21.3 * 21.4 * 21.5 Source: Ch#21, Bertino93, Kim

More information

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E)

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E) 1 BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E) 2 LECTURE OUTLINE SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries in SQL Set Operations in SQL 3 BASIC SQL Structured

More information

3.2.4 Enforcing constraints

3.2.4 Enforcing constraints 3.2.4 Enforcing constraints Constraints SQL definition of the schema Up to now: primary Key, foreign key, NOT NULL Different kinds of integrity constraints value constraints on attributes cardinalities

More information

Oracle Database Object-Relational Developer's Guide. 19c

Oracle Database Object-Relational Developer's Guide. 19c Oracle Database Object-Relational Developer's Guide 19c E96436-01 January 2019 Oracle Database Object-Relational Developer's Guide, 19c E96436-01 Copyright 1996, 2019, Oracle andor its affiliates. All

More information

GridDB Advanced Edition SQL reference

GridDB Advanced Edition SQL reference GMA022C1 GridDB Advanced Edition SQL reference Toshiba Solutions Corporation 2016 All Rights Reserved. Introduction This manual describes how to write a SQL command in the GridDB Advanced Edition. Please

More information

Lecture 4. Lecture 4: The E/R Model

Lecture 4. Lecture 4: The E/R Model Lecture 4 Lecture 4: The E/R Model Lecture 4 Today s Lecture 1. E/R Basics: Entities & Relations ACTIVITY: Crayon time! 2. E/R Design considerations ACTIVITY: Crayon time pt. II 3. Advanced E/R Concepts

More information

Programming and Database Fundamentals for Data Scientists

Programming and Database Fundamentals for Data Scientists Programming and Database Fundamentals for Data Scientists Database Fundamentals Varun Chandola School of Engineering and Applied Sciences State University of New York at Buffalo Buffalo, NY, USA chandola@buffalo.edu

More information

Handy Annotations within Oracle 10g

Handy Annotations within Oracle 10g International Journal of Scientific & Engineering Research Volume 4, Issue 1, January-2013 1 Handy Annotations within Oracle 10g Mrs.Dhanamma Jagli, Ms.Priyanka Gaikwad, Ms.Shubhangi Gunjal, Mr.Chaitanya

More information

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs Object Oriented Database Chapter 13 1 Object DBMSs Underlying concepts: Freely sharing data across processing routines creates unacceptable data dependencies All software should be constructed out of standard,

More information

Data models. Topics. Application model & persistent model. Persistent database layer. Mapping objects to database. (c) Addison Wesley Chapter 8

Data models. Topics. Application model & persistent model. Persistent database layer. Mapping objects to database. (c) Addison Wesley Chapter 8 MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 8 Database Design Copyright 2000 by Addison Wesley Version 1.0 Data models!

More information

Topics. Persistent database layer. (c) Addison Wesley Chapter 8 3. Chapter 8 Database Design. MACIASZEK (2001): Req Analysis & Syst Design 1

Topics. Persistent database layer. (c) Addison Wesley Chapter 8 3. Chapter 8 Database Design. MACIASZEK (2001): Req Analysis & Syst Design 1 MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 8 Database Design Copyright 2000 by Addison Wesley Version 1.0 Topics Database

More information

CS 250 SQL and SQLite. Benjamin Dicken

CS 250 SQL and SQLite. Benjamin Dicken CS 250 SQL and SQLite Benjamin Dicken SQL SQL (Structured Query Language) is a programming language designed for managing schema and data held in a relational database management system (RDBMS) SQLite

More information

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 1 st, 2016

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 1 st, 2016 Applied Databases Lecture 7 Simple SQL Queries Sebastian Maneth University of Edinburgh - February 1 st, 2016 Outline 2 1. Structured Querying Language (SQL) 2. Creating Tables 3. Simple SQL queries SQL

More information

(a) Assume that in a certain country, tax is payable at the following rates:

(a) Assume that in a certain country, tax is payable at the following rates: 3 1. (Total = 12 marks) (a) Assume that in a certain country, tax is payable at the following rates: 15% on your first $50000 income 25% on any amount over $50000 Write a method that takes in an annual

More information

Oracle 1z z0-146 Oracle Database 11g: Advanced PL/SQL. Practice Test. Version QQ:

Oracle 1z z0-146 Oracle Database 11g: Advanced PL/SQL. Practice Test. Version QQ: Oracle 1z0-146 1z0-146 Oracle Database 11g: Advanced PL/SQL Practice Test Version 1.1 QUESTION NO: 1 Which two types of metadata can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL

More information

Jean-Marc Krikorian Strategic Alliance Director

Jean-Marc Krikorian Strategic Alliance Director Jean-Marc Krikorian Strategic Alliance Director JeanMarc.Krikorian@EnterpriseDB.com +1 773-383-6517 Introduction to EnterpriseDB 2 Founded in 2004 Mission: Enable the adoption of high quality Postgres

More information

Structured Query Language (SQL): A Primer on Data Definition Language (DDL)

Structured Query Language (SQL): A Primer on Data Definition Language (DDL) (SQL): A Primer on Data Definition Language (DDL) Konana, 2000 Prabhudev Konana, Ph.D. Assistant Professor The Graduate School of Business The University of Texas at Austin Austin, TX 78712 Introduction

More information

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 6 st, 2017

Applied Databases. Sebastian Maneth. Lecture 7 Simple SQL Queries. University of Edinburgh - February 6 st, 2017 Applied Databases Lecture 7 Simple SQL Queries Sebastian Maneth University of Edinburgh - February 6 st, 2017 Outline 2 1. Structured Querying Language (SQL) 2. Creating Tables 3. Simple SQL queries SQL

More information

Object-relational Databases. Extend relational databases with OO features

Object-relational Databases. Extend relational databases with OO features Object-relational Databases Extend relational databases with OO features 1 Recently seen (Meijer, Bierman: CACM 4/11) SQL Children point to parents Closed world Entities have identity (extensional) Necessarily

More information

Data Base Lab. The Microsoft SQL Server Management Studio Part-3- By :Eng.Alaa I.Haniy.

Data Base Lab. The Microsoft SQL Server Management Studio Part-3- By :Eng.Alaa I.Haniy. Data Base Lab Islamic University Gaza Engineering Faculty Computer Department Lab -5- The Microsoft SQL Server Management Studio Part-3- By :Eng.Alaa I.Haniy. SQL Constraints Constraints are used to limit

More information

Relational terminology. Databases - Sets & Relations. Sets. Membership

Relational terminology. Databases - Sets & Relations. Sets. Membership Relational terminology Databases - & Much of the power of relational databases comes from the fact that they can be described analysed mathematically. In particular, queries can be expressed with absolute

More information

Lecture 5. Lecture 5: The E/R Model

Lecture 5. Lecture 5: The E/R Model Lecture 5 Lecture 5: The E/R Model Lecture 2 Announcements! 1. PS1 due at midnight! Please go over Piazza for hints. We will post solutions tomorrow. Grades coming soon! 2. Project part 1 out today! 3.

More information

Object Oriented Database

Object Oriented Database Object Oriented Database Group 4 Mathieu Metz Palani Kumaresan Napa Gavinlertvatana Kristine Pei Keow Lee Prabhu Ramachandran Outline Object definitions Object Structures Object-oriented concepts OODBS

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle database 11g:advanced pl/sql. Version: Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle database 11g:advanced pl/sql. Version: Demo Vendor: Oracle Exam Code: 1Z0-146 Exam Name: Oracle database 11g:advanced pl/sql Version: Demo QUESTION 1 Which two types of metadata can be retrieved by using the various procedures in the DBMS_METADATA

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E)

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E) 1 BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E) 2 CHAPTER 4 OUTLINE SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries in SQL Set Operations in SQL 3 BASIC SQL Structured

More information

Tables From Existing Tables

Tables From Existing Tables Creating Tables From Existing Tables After completing this module, you will be able to: Create a clone of an existing table. Create a new table from many tables using a SQL SELECT. Define your own table

More information

DB2 MOCK TEST DB2 MOCK TEST I

DB2 MOCK TEST DB2 MOCK TEST I http://www.tutorialspoint.com DB2 MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to DB2. You can download these sample mock tests at your local machine

More information

HW1 is due tonight HW2 groups are assigned. Outline today: - nested queries and witnesses - We start with a detailed example! - outer joins, nulls?

HW1 is due tonight HW2 groups are assigned. Outline today: - nested queries and witnesses - We start with a detailed example! - outer joins, nulls? L05: SQL 183 Announcements! HW1 is due tonight HW2 groups are assigned Outline today: - nested queries and witnesses - We start with a detailed example! - outer joins, nulls? 184 Small IMDB schema (SQLite)

More information

CSC 453 Database Technologies. Tanu Malik DePaul University

CSC 453 Database Technologies. Tanu Malik DePaul University CSC 453 Database Technologies Tanu Malik DePaul University A Data Model A notation for describing data or information. Consists of mostly 3 parts: Structure of the data Data structures and relationships

More information

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps:// IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://www.certqueen.com Exam : 1Z0-146 Title : Oracle database 11g:advanced pl/sql Version : Demo 1 / 9 1.The database instance was

More information

C++11 and Compiler Update

C++11 and Compiler Update C++11 and Compiler Update John JT Thomas Sr. Director Application Developer Products About this Session A Brief History Features of C++11 you should be using now Questions 2 Bjarne Stroustrup C with Objects

More information

SQL OVERVIEW. CS121: Relational Databases Fall 2017 Lecture 4

SQL OVERVIEW. CS121: Relational Databases Fall 2017 Lecture 4 SQL OVERVIEW CS121: Relational Databases Fall 2017 Lecture 4 SQL 2 SQL = Structured Query Language Original language was SEQUEL IBM s System R project (early 1970 s) Structured English Query Language Caught

More information

Credit where Credit is Due. Last Lecture. Goals for this Lecture

Credit where Credit is Due. Last Lecture. Goals for this Lecture Credit where Credit is Due Lecture 22: Database Design Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2002 Some material presented in this lecture is taken from section

More information

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance Contents Topic 04 - Inheritance I. Classes, Superclasses, and Subclasses - Inheritance Hierarchies Controlling Access to Members (public, no modifier, private, protected) Calling constructors of superclass

More information

Question: Which statement would you use to invoke a stored procedure in isql*plus?

Question: Which statement would you use to invoke a stored procedure in isql*plus? What are the two types of subprograms? procedure and function Which statement would you use to invoke a stored procedure in isql*plus? EXECUTE Which SQL statement allows a privileged user to assign privileges

More information

DBTools.h++ 3.x to SourcePro DB Migration Guide

DBTools.h++ 3.x to SourcePro DB Migration Guide DBTools.h++ 3.x to SourcePro DB Migration Guide DBTools.h++ 3.x -> SourcePro DB The goal of this section is to help Rogue Wave customers migrate projects from DBTools 3.x to SourcePro DB. SourcePro DB

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7 Table of Contents Spis treści 1 Introduction 1 2 PLSQL - fundamentals 1 2.1 Variables and Constants............................ 2 2.2 Operators.................................... 5 2.3 SQL in PLSQL.................................

More information

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases Systems Analysis and Design in a Changing World, Fourth Edition Chapter : Designing Databases Learning Objectives Describe the differences and similarities between relational and object-oriented database

More information

What is Inheritance?

What is Inheritance? Inheritance 1 Agenda What is and Why Inheritance? How to derive a sub-class? Object class Constructor calling chain super keyword Overriding methods (most important) Hiding methods Hiding fields Type casting

More information

Integrity constraints, relationships. CS634 Lecture 2

Integrity constraints, relationships. CS634 Lecture 2 Integrity constraints, relationships CS634 Lecture 2 Foreign Keys Defined in Sec. 3.2.2 without mentioning nulls. Nulls covered in Sec. 5.6 First example: nice not-null foreign key column: create table

More information

CS-202 Introduction to Object Oriented Programming

CS-202 Introduction to Object Oriented Programming CS-202 Introduction to Object Oriented Programming California State University, Los Angeles Computer Science Department Lecture III Inheritance and Polymorphism Introduction to Inheritance Introduction

More information

Practical 8. SHANKER SINH VAGHELA BAPU INSTITUTE OF TECHNOLGY Subject: - DBMS Branch: - IT/CE Semester: - 3rd. 1. What does SQL stand for?

Practical 8. SHANKER SINH VAGHELA BAPU INSTITUTE OF TECHNOLGY Subject: - DBMS Branch: - IT/CE Semester: - 3rd. 1. What does SQL stand for? Practical 8 1. What does SQL stand for? Structured Query Language Strong Question Language Structured Question Language 2. Which SQL statement is used to extract data from a database? OPEN SELECT GET EXTRACT

More information

The Entity-Relationship Model (ER Model) - Part 2

The Entity-Relationship Model (ER Model) - Part 2 Lecture 4 The Entity-Relationship Model (ER Model) - Part 2 By Michael Hahsler Based on slides for CS145 Introduction to Databases (Stanford) Lecture 4 > Section 2 What you will learn about in this section

More information

SQL*Loader Concepts. SQL*Loader Features

SQL*Loader Concepts. SQL*Loader Features 6 SQL*Loader Concepts This chapter explains the basic concepts of loading data into an Oracle database with SQL*Loader. This chapter covers the following topics: SQL*Loader Features SQL*Loader Parameters

More information

Synchronization SPL/2010 SPL/20 1

Synchronization SPL/2010 SPL/20 1 Synchronization 1 Overview synchronization mechanisms in modern RTEs concurrency issues places where synchronization is needed structural ways (design patterns) for exclusive access 2 Overview synchronization

More information

C# and Java. C# and Java are both modern object-oriented languages

C# and Java. C# and Java are both modern object-oriented languages C# and Java C# and Java are both modern object-oriented languages C# came after Java and so it is more advanced in some ways C# has more functional characteristics (e.g., anonymous functions, closure,

More information

SQL. Structured Query Language

SQL. Structured Query Language SQL Structured Query Language 1 Başar Öztayşi 2017 SQL SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems. SQL works with

More information

Optional SQL Feature Summary

Optional SQL Feature Summary Optional SQL Feature Summary The following table lists all optional features included in the SQL standard, from SQL- 2003 to SQL-2016. It also indicates which features that are currently supported by Mimer

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009

sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009 sqoop Automatic database import Aaron Kimball Cloudera Inc. June 18, 2009 The problem Structured data already captured in databases should be used with unstructured data in Hadoop Tedious glue code necessary

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Today's Party. Example Database. Faloutsos/Pavlo CMU /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Today's Party. Example Database. Faloutsos/Pavlo CMU /615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications C. Faloutsos A. Pavlo Lecture#6: Fun with SQL (part2) Today's Party DDLs Complex Joins Views Nested Subqueries Triggers Database

More information

Relational databases and SQL

Relational databases and SQL Relational databases and SQL Relational Database Management Systems Most serious data storage is in RDBMS Oracle, MySQL, SQL Server, PostgreSQL Why so popular? Based on strong theory, well-understood performance

More information

Graphical Joins in More Detail

Graphical Joins in More Detail Graphical Joins in More Detail Using the Connector, data is made available through the addition of containers and relevant expressions. The source of the underlying data can be a Table, a View, a Stored

More information

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c) SQL language Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c) 2011-2016 SQL - Structured Query Language SQL is a computer language for communicating with DBSM Nonprocedural (declarative) language What

More information

SQL (and MySQL) Useful things I have learnt, borrowed and stolen

SQL (and MySQL) Useful things I have learnt, borrowed and stolen SQL (and MySQL) Useful things I have learnt, borrowed and stolen MySQL truncates data MySQL truncates data CREATE TABLE pets ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, type CHAR(3) NOT NULL, PRIMARY KEY

More information

ODL Design to Relational Designs Object-Relational Database Systems (ORDBS) Extensible Markup Language (XML)

ODL Design to Relational Designs Object-Relational Database Systems (ORDBS) Extensible Markup Language (XML) ODL Design to Relational Designs Object-Relational Database Systems (ORDBS) Extensible Markup Language (XML) INF3100, V 2004, U9F1 Chapter 4, Sections 1-5 and 7 Edited By M. Naci Akkøk 25/2-2003, 20/2-2004.

More information

Oracle 1Z MySQL 5.6 Developer.

Oracle 1Z MySQL 5.6 Developer. Oracle 1Z0-882 MySQL 5.6 Developer http://killexams.com/exam-detail/1z0-882 SELECT... WHERE DATEDIFF (dateline, 2013-01-01 ) = 0 C. Use numeric equivalents for comparing the two dates: SELECT...WHERE MOD(UNIX_TIMESTAMP

More information

R/3 System Object-Oriented Concepts of ABAP

R/3 System Object-Oriented Concepts of ABAP R/3 System Object-Oriented Concepts of ABAP Copyright 1997 SAP AG. All rights reserved. No part of this brochure may be reproduced or transmitted in any form or for any purpose without the express permission

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS

1 INTRODUCTION TO EASIK 2 TABLE OF CONTENTS 1 INTRODUCTION TO EASIK EASIK is a Java based development tool for database schemas based on EA sketches. EASIK allows graphical modeling of EA sketches and views. Sketches and their views can be converted

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

GITA 338: Spatial Information Processing Systems

GITA 338: Spatial Information Processing Systems GITA 338: Spatial Information Processing Systems Sungwon Jung Dept. of Computer Science and Engineering Sogang University Seoul, Korea Tel: +82-2-705-8930 Email : jungsung@sogang.ac.kr Spatial Query Languages

More information

2. E/R Design Considerations

2. E/R Design Considerations 2. E/R Design Considerations 32 What you will learn in this section Relationships cont d: multiplicity, multi-way Design considerations Conversion to SQL 33 Multiplicity of E/R Relationships Multiplicity

More information

Symbol Tables Symbol Table: In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is

More information

8 A Sample Application using Object-Relational Features

8 A Sample Application using Object-Relational Features Oracle8i Application Developer's Guide - Object-Relational Features Release 2 (8.1.6) Part Number A76976-01 Página 1 de 34 Library Product Contents Index 8 A Sample Application using Object-Relational

More information

Using the Set Operators. Copyright 2006, Oracle. All rights reserved.

Using the Set Operators. Copyright 2006, Oracle. All rights reserved. Using the Set Operators Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine multiple queries into a single query Control

More information

SQL DATA DEFINITION LANGUAGE

SQL DATA DEFINITION LANGUAGE SQL DATA DEFINITION LANGUAGE DATABASE SCHEMAS IN SQL SQL is primarily a query language, for getting information from a database. DML: Data Manipulation Language SFWR ENG 3DB3 FALL 2016 MICHAEL LIUT (LIUTM@MCMASTER.CA)

More information

A practical introduction to database design

A practical introduction to database design A practical introduction to database design Dr. Chris Tomlinson Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building chris.tomlinson@imperial.ac.uk Computer Skills Classes 17/01/19

More information

Basant Group of Institution

Basant Group of Institution Basant Group of Institution Visual Basic 6.0 Objective Question Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of

More information