Odb A short visit Object Database in C++.

Slides:



Advertisements
Similar presentations
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
Advertisements

File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Keys Chapter 8 Database Design for Mere Mortals. Why Keys Are Important They ensure that each record in a table can be properly identified. They help.
Automation Repository - QTP Tutorials Made Easy The Zero th Step TEST AUTOMATION AND QTP.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Advanced Web 2012 Lecture 4 Sean Costain PHP Sean Costain 2012 What is PHP? PHP is a widely-used general-purpose scripting language that is especially.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Mastering STACKS AN INTRODUCTION TO STACKS Data Structures.
1 History of compiler development 1953 IBM develops the 701 EDPM (Electronic Data Processing Machine), the first general purpose computer, built as a “defense.
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
26 Mar 04 1 Application Software Practical 5/6 MS Access.
CSC Intro. to Computing Lecture 10: Databases.
GALE: The GRAPPLE Adaptive Learning Environment Paul De Bra Eindhoven University of Technology January 24, 2011 GRAPPLE Public Event Slide 1.
Microsoft Excel – Pivot Tables Introduction to Microsoft Excel Pivot tables Please login to the computers and launch Microsoft Excel. Rob Jones Room WG43.
Information Integration By Neel Bavishi. Mediator Introduction A mediator supports a virtual view or collection of views that integrates several sources.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
 Enhancing User Experience  Why it is important?  Discussing user experience one-by-one.
CHAPTER 1 – INTRODUCTION TO ACCESS Aliya Farheen March 5, 2014.
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
1 MS Access. 2 Database – collection of related data Relational Database Management System (RDBMS) – software that uses related data stored in different.
Finding a PersonBOS Finding a Person! Building an algorithm to search for existing people in a system Rahn Lieberman Manager Emdeon Corp (Emdeon.com)
1 U3O2: Database Design Tools  Naming Conventions  Eg.s prefix tables with tblCustomer, tblProducts; customer table, cusCustomerID, cusAddress; Queries,
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
Aggregator Stage : Definition : Aggregator classifies data rows from a single input link into groups and calculates totals or other aggregate functions.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different.
Pros and Cons of Static or Dynamic Websites. As a website user, you may not bother if a site you visit is static or dynamic as it is a sheer backend functionality.
Introduction toData structures and Algorithms
Database System Implementation CSE 507
Gridpp37 – 31/08/2016 George Ryall David Meredith
Microsoft Office Access 2010 Lab 1
SQL – Python and Databases
Creating Your Own Classes
View Integration and Implementation Compromises
IST 220 – Intro to Databases
Module 11: File Structure
GO! with Microsoft Office 2016
Databases Chapter 16.
UVOS and VOMS differences
Database Normalization
GO! with Microsoft Access 2016
Constraints in Entity-Relationship Models
History of compiler development
Intro to PHP & Variables
Translation of ER-diagram into Relational Schema
Introduction to Ms-Access Submitted By- Navjot Kaur Mahi
What is a Database and Why Use One?
Compiler Construction
Enhancements for Simple YAML Profile v1.2
Database Fundamentals
Variables ICS2O.
Announcements Project 2’s due date is moved to Tuesday 8/3/04
TransCAD Vehicle Routing 2018/11/29.
Chapter 14 Normalization – Part I Pearson Education © 2009.
Coding Concepts (Data Structures)
CMSC 202 Trees.
An Introduction to Software Architecture
Computer Science Projects Database Theory / Prototypes
Mastering Memory Modes
Introduction to Requirements Modeling
Introduction to Access
Introduction to Data Structure
Do it now – PAGE 3 You will find your do it now task in your workbook – look for the start button! Tuesday, 09 April 2019.
How to use hash tables to solve olympiad problems
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Query-by-Example Transparencies
CSE 326: Data Structures Lecture #14
Presentation transcript:

odb A short visit Object Database in C++

Problems to address What is the odb good for

Problems to address Mainly empty data tables Most tables in Relational Databases are empty because they preserve space for fields which may receive data

Problems to address Mainly empty data tables Intermediate data structures to build relations To establish links between data elements, additional data elements must be used, not representing data but links. Links are of a different nature than data but while relational databases are named relational, they do not incorporate relations in their design.

Problems to address Mainly empty data tables Intermediate data structures to build relations Static data- and relation models Relational database structures have to be designed and implemented to become able to store certain data and relations. Changes are not simple to make, in most practical applications can't be done at all. Users do not have any influence over the data model. If e.g. some DB application is missing a specific data field (may be a 4th name), this information gets lost if it exists but the DB model designer did not provide such field.

Solution odb tries to address those problems with simple answers.

Solution No tables If most tables in databases are almost empty, why use tables? odb only stores data, not non-data / potential data

Solution No tables No relational information as data (terry&gaspode, what is the relational data?) Relations are information, but not data. Data is e.g. „name=Pratchett“ and „dog=Gaspode“ but the relation between the men called „Pratchett“ and the dog called „Gaspode“ is characterized by the reason the relationship is made for. So data for such relationship is „Terry Pratchett“ relates to „Gaspode“ by „has written about“. So the data related to data relations is the reason for said relation. This information is not stored in relational databases. In contrast odb stores reasons within links.

Solution No tables No relational information as data No data models odb doesn't support the design of predefined data models. The application using odb defines the interface to the data stored in the odb. odb itself does not support data structures.

odb A short introduction The following presentation will try to a little bit deeper into the design of the odb. A short introduction

odb Using classes of ´things´ to store odb is using different classes of things to store data in a meaningful, a semantic way

odb Using classes of ´things´ to store Objects of types/classes Objects are complex ´things´. In our physical macro cosmos a person may count as an Object. So one may store „Terry Pratchett“ as Object of class „Person“ as well as „Lyn Pratchett“ of the same class. Or one may store „The color of magic“ of class „Novel“

odb Using classes of ´things´ to store Objects of types/classes Reasons to link Objects „Terry Pratechtt“ had of course a relation to „Lyn Pratchett“ by being „married“ to here and to „The color of magic“ by being the „Author“ of it.

odb Using classes of ´things´ to store Objects of types/classes Reasons to link Objects Atoms (or attributes) Atoms store attributes for Objects, Objects may link to Objects, and contain Atoms. So for an Object of class „Person“ named „Terry Pratchett“ an Atom may be „profession=Author“. Objects may link (with no Reason) to an infinite amount of Atoms and (with Reason) to an infinite amount of Objects

odb Using classes of ´things´ to store Objects of types/classes Reasons to link Objects Atoms (Ropes of Atoms) One possibly premature optimization (and specialization) was the introduction of Ropes which store chains of Atoms in a single Atom linkage. I only name this construct for people who visit the code so that they understand what Ropes are for.

odb - Linking Objects Now, how to link one object to another one?

odb - Linking Objects Objects, by nature, are having relations. All objects of the world are having relations, some sense full, some senseless.

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Terry Pratchtt“ may be linked to „Lyn“ for the reason „is married to“.

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Terry“ „is married to“ „The color of Magic“ But amazingly „Terry Pratchett“ should not be linked to „The color of Magic“ for the same reason („is married to“)

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Terry“ „is married to“ „The color of Magic“ odb should solve this problem by design. To solve this problem, one should become aware about another problem. Whilst „Terry“ „is married to“ „Lyn“, as humans know also means „Lyn“ „is married to“ „Terry“

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Lyn“ „is married to“ „Terry“ The same can´t be said about „Terry“ and „The color of Magic“

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Lyn“ „is married to“ „Terry“ „Terry“ „is author of“ „The color of Magic“ Whilst „Terry“ „is author of“ „The color of Magic“

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ „is married to“ „Lyn“ „Lyn“ „is married to“ „Terry“ „Terry“ „is author of“ „The color of Magic“ „The color of Magic“ „is author of“ „Terry“ The sam can’t be true vice versa. Which means, links are unidirectional

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ > „is married to“ > „Lyn“ „Terry“ > „is author of“ > „The color of Magic“ If Reasons are unidirectional they should be forceable to link Objects only by possible class relationships. „is married to“ is allowed to link „Person“ Objects to other „Person“ Objects whilst „is author of“ is suitable to link „Person“ Objects to „Novel“ Objects. This enables to establish all feasible links

odb - Linking Objects Objects, by nature, are having relations. For example „Terry“ > „is married to“ > „Lyn“ „Lyn“ > „is married to“ > „Terry“ „Terry“ > „is author of“ > „The color of Magic“ The relation „The color of Magic“ „is author of“ „Terry“ is not assignable because there is no matching Reason in the database.

odb - Linking Objects Reasons are used to Link Objects to Objects To link objects to objects Reasons are necessary

odb - Linking Objects Reasons are used to Link Objects to Objects Optionally enforcing Class Relationship Reasons may (and should) be given Classes to determine which kind of Objects the specific Reason is suitable to link. So it’s possible to force Reasons to specific classes of Object on one or both ends („id owner of“ may link a „Person“ Object to every other Class of Objects by linking from „Person“ to NULL

odb - Linking Objects Reasons are used to Link Objects to Objects Optionally enforcing Class Relationship, e.g. 'is married to' links from Person to Person For example the Reason ‚is married to‘ is suitable to link an Object of Class ‚Person‘ to an Object of Class ‚Person‘. It is the property of an Object to be linked to another Object.

odb - Linking Objects Reasons are used to Link Objects to Objects Optionally enforcing Class Relationship, e.g. 'is married to' links from Person to Person, or ‚is owner of‘ links from Person to ??? „is owner of“ is allowed to link a „Person“ Object to all other classes of Objects.

odb - Linking Objects Reasons are used to Link Objects to Objects Optionally enforcing Class Relationship, e.g. 'is married to' links from Person to Person, or ‚is owner of‘ links from Person to ??? Reason("is owner of“, classPerson, nullptr) The instantiation of a Reason may look like this: „Reason Name“, „Class to link from“, „Class to link to“

odb - Linking Objects Class 'Person' Reason 'is married to' Class So there may exist a Reason named „is married to“ which is allowed to link a Person to a Person. Class 'Person' Reason 'is married to' Class 'Person'

odb - Linking Objects Object "Terry" of Class 'Person' Object "Lyn" And there may exist two Objects of Class Person Object "Terry" of Class 'Person' Object "Lyn" of Class 'Person'

odb - Linking Objects Class 'Person' Class 'Person' Object "Terry" So this Reason can be used to link those Objects. Remember, the link from the first object to the second one is the property of the first object. Now it may be interesting for the second Object to „know“ which Objects do have links to it. Object "Terry" of Class 'Person' Reason 'is married to' Object "Lyn" of Class 'Person'

odb - Linking Objects Class 'Person' Class 'Person' Object "Terry" Therefor the creation of a link from one Object to another one adds an unnamed Backlink entry to the properties of the second Object. Such Backlinks are only Backlinks without Reason information and only exists once, even if the first Object links multiple times (with different Reasons) to the second one. Object "Terry" of Class 'Person' Reason 'is married to' Object "Lyn" of Class 'Person' Unnamed backlink

odb - Linking Objects Class 'Person' Class 'Novel' Object "Terry" Another Reason to link two Objects may be setup as „is author of“, linking a Person to a Novel. Object "Terry" of Class 'Person' Reason 'is author of' Object „The …“ of Class 'Novel' Unnamed backlink

odb - Linking Objects Reason 'is married to' Object "Lyn" Object "Terry" of Class 'Person' Reason 'is married to' Object "Lyn" of Class 'Person' Unnamed backlink So „Terry“ has two links to different Objects, those Objects are having Backlinks to „Terry“. AND: The used Reasons store Links to the „Terry“ Object instance. Object "Terry" of Class 'Person' Reason 'is author of' Object „The …“ of Class 'Novel' Unnamed backlink

odb - Linking Objects A linking Object stores Links with Reasons One entry per Reasons Objects store Reasons for Links to link to Objects

odb - Linking Objects A linking Object stores Links with Reasons One entry per Reasons A linked Object stores Links to linking Objects without Reason, one entry per linking Object Objects store Backlinks to linking Objects

odb - Linking Objects A linking Object stores Links with Reasons One entry per Reasons A linked Object stores Links to linking Objects without Reason, one entry per linking Object A Reason stores Objects it links from One entry per Object Reasons store Objects they are used by

odb - Query Objects How to Query linked and linking Objects

odb - Query Objects Ask Objects Where they link to For what reasons they link to An Object may be asked to which Objects they are linking to and for which Reason

odb - Query Objects Ask Objects From whom they are linked to Query linking Objects for the Reason they link Objects may be asked which Objects are linking to them. If one needs to know the Reason(s) the linking Object has to be asked.

odb - Query Objects Ask Reasons Which Objects are using them Ask Objects for their Link Destinations Reasons may be asked which Objects they are used by. Reason using Objects may be asked for the Objects they are linking to for a specific Reason.

odb - Query Objects Ask Atoms Which Objects are using them Ask Objects for their lists of Atoms Reasons may be asked which Objects they are used by. Reason using Objects may be asked for the Objects they are linking to for a specific Reason.

odb - Atoms A short view to ‚conventional' data storing in odb

odb - Atoms Used to „store data“ in the sense of Databases are Applicable data fields for Objects Objects may hold an unlimited amount of Atom References

odb - Atoms Used to „store data“ in the sense of Databases are Applicable data fields for Objects are Shareable between Objects Atoms may be used by an unlimited amount of Objects

odb - Atoms Used to „store data“ in the sense of Databases are Applicable data fields for Objects are Shareable between Objects are Collectalbe in Ropes Ropes collect „mass Atom collections“ using one single connection to the object they are used.

odb - Atoms Used to „store data“ in the sense of Databases are Applicable data fields for Objects are Shareable between Objects are Collectalbe in Ropes know who uses them Atoms know who are using them.

odb - Templates For practical reasons odb supports a kind of ‚thing‘-templating

odb - Templates An example Object: Class „Person“ Atom Name = „Lyn“ Atom Gender = „Female“ Atom Profession = „Lector“ If an application provides a GUI to odb data and the GUI depends on the fields stored in the object, that's to say the GUI is as dynamic as the database, it would be not a nice GUI if each data field had to be defined by the user each an every time. Then you would have to follow these steps „define new field“, „input the name for the field“, „input the content for the field“. This would be a most tedious experience. That´s why odb provides a template mechanism.

odb - Templates An example Object: Class „Person“ Atom Name = „Terry“ Atom Gender = „Male“ Atom Profession = „Author“ A second, similar Object assigned to the same Class may be instantiated

odb - Templates An example Object Master Atom List (OMAL): Class „Person“ Atom Name = „“ Atom Gender = „“ Atom Profession = „“ An Object Master Atom List (OMAL) is a template that provides a predefined Class for the Object and a list of suggested Atoms suitable to the Object. The final „Person“ Object may then look like this:

odb - Templates An example Object using an OMAL: OMAL „PERSON“ Atom Name = „Terry“ Atom Profession = „Author“ The Object will be assigned to the Atoms filled in with data and none of the template Atoms if not given.

odb - Templates An example Object using an OMAL: OMAL „PERSON“ Class „Person“ Atom Name = „Terry“ Atom Gender = „“ Atom Profession = „Author“ Empty Atoms can be presented by a GUI provided as place holders for data input but if not used, will not be stored.

odb - Templates Some example Atoms: „title“ = „The color of Magic“ „pagecount" = „256“ „Pages“ „price“ = „CHF“ „14.90“ This can be realized directly or by use of Atom template objects, called Atom Definition Objects (ADO)

odb - Templates Atom attributes besides ´data´: name prefix format suffix An Atom, and so an ADO (because an ADO is an Atom) supports additional elements like prefix and suffix and also format strings to output its data element

odb - Templates ADO: „pagecount" = „256“ „Pages“ name = „pagecount“ prefix = „“ format = „%d %s“ suffix = „Pages“ No prefix given

odb - Templates ADO: „price" = „CHF“ „14.90“ name = „price“ prefix = „CHF“ format = „%s %.2f“ suffix = „“ No suffix given

https://github.com/morgner/odb