Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.
-
Upload
terrell-gerry -
Category
Documents
-
view
219 -
download
1
Transcript of Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.
![Page 1: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/1.jpg)
Objects & Databases
Trends over the last 25 years
by Dolan Antenucci and Poorva Potdar
![Page 2: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/2.jpg)
Overview
1.Objects and Databases in 19862.Trends with Objects and Databases3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 3: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/3.jpg)
• Connection between objects and databases was new and getting explored.
Back in 1986….
New Era of Objects
Extended Relational
Database Systems
Persistent Programming
Languages
Database system toolkits.
Object Oriented Database Systems.
![Page 4: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/4.jpg)
• Motivation: Storage and Querying of complex Data-types • Example: Probabilistic Databases
Location of ACL Conference in 2012 is either Europe or USA, each with probability 0.5.
Representation? {USA/0.5,Europe/0.5} ({Paris,Vienna}/0.5 , {Michigan, California}/0.5)
• Solution: Abstract Data-types.
Why Extended Relational Databases?
![Page 5: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/5.jpg)
• User defined Abstract Data-types,o Register with Database - System aware of its size and functions.o Benefits -
Encapsulation of data and methods of an object Re usability Flexibility.
What are ADT's?
![Page 6: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/6.jpg)
Impedance Mismatch still persists....• Arises at the boundary when Programming Language meets the
Relational Database. • Eg: Data Model for Departmental statistics.
![Page 7: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/7.jpg)
Persistent Programming Languages• Motivation: Reduce the impedance mismatch
• How? - Allow objects to be created and stored in
a database, and used directly from a programming language
o No need of SQL to query data.o No Need of explicit format type changes. o Allow objects to be manipulated in-memory.
• Drawbacks?-
o Easy to make programming errorso Complexity of languages make Optimization difficult.
![Page 8: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/8.jpg)
Object Oriented Database Systems • Motivation: Reduce impedance mismatch, support for querying and
indexing and addressing version management. .
![Page 9: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/9.jpg)
Object Oriented Database Systems
• Drawbacks-o No uniform agreement on the any OODB paradigm.
o Differences in several OODB products as no standard. [Only O2
supports all standards of OQL]
o Behind with respect to Relational DB -> View facility not provided, Schema Evolution is a pain.
o Robustness, scalability and Fault-tolerance not as good as
Relational DB.
![Page 10: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/10.jpg)
Database System Toolkits/Components
• Motivation: To build a Domain-Specialized Database system. • Difference in Query Languages, access methods, storage
organizations and transaction mechanisms. • Eg: Geographic Information Systems manages the Geographic Data.
![Page 11: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/11.jpg)
Overview
1.Objects and Databases in 19862.Trends with Objects and Databases3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 12: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/12.jpg)
What was the conclusion?• Four Database Systems since 1986. Outcome?
o Losers
Database System Tool-kits
Persistent Programming languages
o Survivors
Object Oriented Databases.
Extended Relations Databases
![Page 13: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/13.jpg)
Casualty 1 - Database System Tool-kits.
o Too much Expertise required
o Inflexible and incomplete in terms of database design.
o Query Optimizer was general but inefficient to use, left details of Logical Query rewrites and predicates to the implementer.
o Very less control over buffering, concurrency and recovery.
![Page 14: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/14.jpg)
Casualty 2 - Persistent Programming Languages
• No commercial implementation of a pure persistent programming language.
• Why not a complete disaster?
o Impact on the research of many of OODB's products.
o Persistence Models, Pointer Swizzling Mechanisms[?] and
garbage collection schemes relate to OODB concepts.
![Page 15: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/15.jpg)
Extended Relational Databases.
• In parallel with OODB, extended relational DB also matured. [CA-Ingres, IBM, Illustra]
![Page 16: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/16.jpg)
Object Relational Databases.
• ORDB have relational model and a Query language built from there.
• Support ADT's and Row types.
• Set Types
• Shortcomings- No agreement on ORDB paradigms.
![Page 17: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/17.jpg)
Overview
1.Objects and Databases in 1986 2.Trends with Objects and Databases 3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 18: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/18.jpg)
Postgres Motivation
Factors Motivating towards Postgres
ADT’s to support Bitmaps, Videos,
text etc
Support for Data, object and Knowledge
Management
Object and Rule management
Supports No-overwrite Storage
manager and Time Travel
![Page 19: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/19.jpg)
Postgres Data Model & Query Language
• Design Criteria • Postgres Data Model
• Postgres Functions
• Postgres Query Language
• Fast Path
![Page 20: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/20.jpg)
Design Criteria
Three Design Criteria
Orientation towards Database access from Query Language.
Orientation towards Multilingual access
[ Neutral and can tightly couple with any Language]
Smaller Number of Concepts
[Constructs like classes, Inheritance, types and functions.]
![Page 21: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/21.jpg)
Postgres Data Model• Classes - Collection of instances of objects. Eg: Create EMP (name= C12, salary = float, age = int)
• Inheritance Eg:Create salesman (quota=float ) inherits EMP.
• Types of Classes- Real Classes, Derived Classes, Versioned classes
EMPName=C12
Salary=FloatAge=int
SalesmanQuota = float
![Page 22: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/22.jpg)
Postgres Data-Model
Postgres Data-types
Base Types – ADT
Eg: Create DEPT (dname= c10, manager=c12, floorspace= polygon, mailstop= point)
Replace DEPT(mailstop="(10,10)", where DEPT.name="shoe")
Arrays of Base Types
Create EMP(name=c12, salary=float[12], age=int)
Composite Datatypes.
Two Types: Nested Definition, Set Definition
create EMP( name=c12, salary=float, age=int, manager=EMP, corworkers=EMP)
add to EMP (hobbies=set)
![Page 23: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/23.jpg)
Postgres Functions
Postgres Functions
Operatorso Operators are functions with one or more
operandsEg: retrieve(DEPT.dname) where DEPT.floorspace AGT "(0,0),(1,1),(2,2)“
o Flexibility to write new operator- Creator can define how B+-tree can be created.
o Postgres requires the user to write 13 C functions which perform the record level operations.
o Liberty of optimization by writing multidimensional access methods.
C – Functions
Eg: retrieve (EMP.name) where overpaid(EMP)
o Overpaid returns a boolean. o Flexibility of invoking like an attribute.
Eg: retrieve (EMP.name) where EMP.overpaido Drawbacks-Optimization is left to the
User.
PostQuel Functions
o Set of commands in a Postgres query can be packaged together to define a Postquel function.
Eg: define function high-pay returns EMP as retrieve (EMP.all) where EMP.sal>50000
o Postquel functions can have parameters accessed by the $ sign.
Eg: define function high-pay(C12) returns EMP as retrieve (EMP.name) where EMP.sal>50000 and EMP.name=$1
![Page 24: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/24.jpg)
Postgres Query Language
Postgres Query Language
Transitive Closure Eg: To find all ancestors of Joe parent (older,younger)
retrieve * into ans (parent.older) from a into ans where parent.younger='Joe' or parent.younger=a.older.
Nested Queries
To find dept that occupies the entire floor. Eg: retrieve (DEPT.dname ) where
DEPT.floor not in {D.floor from D in DEPT where D.dname!=
DEPT.dname}
Inheritanceretrieve (E.name )from E in EMP* where E.age>40.The * indicates that query should be run over all derived classes of EMP.
Time Travel
Stores archives and historical data.Eg: retrieve (*) from EMP(T)
![Page 25: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/25.jpg)
Fast Path• Motivation : To provide direct access to low level functions without
checking for validation.
o Construction of a parse tree for a Specialized Query. • Require User to access any Postgres function and directly call the
parser, optimizer, executor or any access methods. • Eg: Sensor Database
![Page 26: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/26.jpg)
Fast Path • Temp. Sensor Database
• •
• Query to retrieve the average temperature of all cities in a particular state.• User can access the Query optimizer to add the function as- Avg (T1,T2,T3,…)= (T1+T2+T3+… )/ N • Now the Query to retrieve avg temp is -> Retrieve Temp into T from TS where Temp=Avg(TS1,TS2,TS3,
….)
MI
Ohio
Ann Arbor
Detroit
Ada
Block1
Block2
Block1
Block2
Block1
T1
T2
T3
T4
T5
Region
![Page 27: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/27.jpg)
Overview
1.Objects and Databases in 1986 2.Trends with Objects and Databases 3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 28: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/28.jpg)
POSTGRES Rules SystemMotivation:• One System to RULE them all!
![Page 29: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/29.jpg)
POSTGRES Rules SystemImplementation of rules
![Page 30: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/30.jpg)
POSTGRES Rules System
Inner-workings:
• Rules defined in POSTQUEL• Rule Chaining
o Since rules can trigger other rules, or can involve derived forms, chaining is required.
• Semantics of ruleso Immediate vs. deferralo Same vs. separate transaction
![Page 31: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/31.jpg)
POSTGRES Rules System
Example of use: Triggers• Enforcing employees have same salary
![Page 32: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/32.jpg)
POSTGRES Rules System
Application example: Views
• User-level syntax is compiled into one or more rules
• POSTGRES takes more general approach to updates than traditional RDBMS's
![Page 33: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/33.jpg)
POSTGRES Rules System
Application example: Versions• Similar to branching in Source Control
![Page 34: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/34.jpg)
POSTGRES Storage System
Motivation:
• Be different!
![Page 35: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/35.jpg)
POSTGRES Storage System
The old storage manager: "write-ahead logging"• Used to ensure atomicity and durability• Before changes are applied, they are written to a log
![Page 36: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/36.jpg)
POSTGRES Storage System
The new storage manager: "no-overwrite"• No transaction log used, so only one write to disk• Old record remains in database
![Page 37: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/37.jpg)
POSTGRES Storage System
Time Travel (a.k.a. Versioning)
![Page 38: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/38.jpg)
Overview
1.Objects and Databases in 1986 2.Trends with Objects and Databases 3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 39: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/39.jpg)
POSTGRES Implementation (v2.1)
Four areas different from RDBMS:1. Process structure2. Extendability3. Dynamic loading4. Rule wake-up
![Page 40: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/40.jpg)
POSTGRES Performance (v2.1)
Summary of Tests• At time of paper (June 1991), POSTGRES v2.1 was running on 125
sites• Use the Wisconsin benchmark and an engineering benchmark• Systems compared with:
o UC Berkeley version of INGRESo Commercial version of INGRES from ASKo Cattell's in-house systemo Commercial OODBo Commercial RDBMS
![Page 41: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/41.jpg)
POSTGRES Performance (v2.1)
Summary of Results
![Page 42: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/42.jpg)
POSTGRES Performance (v2.1)
![Page 43: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/43.jpg)
Overview
1.Objects and Databases in 1986 2.Trends with Objects and Databases 3.POSTGRES Data/Query Model & Fast Path4.POSTGRES Rules and Storage5.POSTGRES v2.1 Implementation6.Future of Objects and Databases
![Page 44: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/44.jpg)
POSTGRES Future (1996 to present)
• Postgres95 -- replaced POSTQUEL with SQL
• Spun off into Open Source project, PostgreSQL as v6.0
• Implemented many standard DBMS features
• Up to v9.1 with (K-nearest-neighbor indexing, etc.)
![Page 45: Objects & Databases Trends over the last 25 years by Dolan Antenucci and Poorva Potdar.](https://reader035.fdocuments.us/reader035/viewer/2022062407/56649c7b5503460f9492eca8/html5/thumbnails/45.jpg)
Future of Objects and Databases
"Predictions for 2006"• Fully integrated solution• Server functionality & performance• Client integration• Legacy data sources• Standardization