Selecting Objects An OO Architecture of the Relational Model - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Selecting Objects An OO Architecture of the Relational Model

Description:

ln(N) S. Bulk Operations. Delete. Move. Copy. Template objects ... Create object. OK. Cancel. CreateObject(int a, string b) CreateObject(string sourceName) ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 31
Provided by: polaKas
Category:

less

Transcript and Presenter's Notes

Title: Selecting Objects An OO Architecture of the Relational Model


1
Selecting ObjectsAn OO Architecture of the
Relational Model
  • Polina Cherkasova
  • Saint-Petersburg, 2005

2
The Relational and OO models
  • OO designing
  • Relational performance
  • ? Impedance Mismatch

3
Logical Levels
  • User Interface
  • Business Functionality
  • Data Structures

4
Logical Levels
  • User Interface
  • Business Functionality
  • Data Structures
  • Relations
  • Attributes of objects
  • XML structures

5
Logical Levels
  • User Interface
  • Business Functionality
  • Functions, Procedures, Views, Triggers
  • Object methods
  • Middle tier in the Three-Tier mofdel
  • Data Structures

6
Logical Levels
  • User Interface
  • Web Applications
  • Stand-Alone Application
  • Web Service
  • Business Functionality
  • Data Structures

7
N
S
8
  • One by one
  • StartTime
  • S ln(N)
  • S (
  • StartTime
  • ln(N)
  • UpdateTime
  • )
  • _______
  • ln(N) S
  • Together
  • StartTime
  • S ln(N)
  • S UpdateTime
  • _______
  • ln(N) S

9
Bulk Operations
  • Delete
  • Move
  • Copy
  • Template objects
  • Import and export
  • Explicit multiplicity

10
Commonly used approaches
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

11
Commonly used approaches
  • OO interface
  • ------- ----
  • --------
  • ----
  • --- --- ---- --- --
  • -----
  • -------
  • --------
  • -
  • Call-back from the Data Structures level
  • Various data sources

12
Commonly used approaches
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

OnUpdate OnCreate OnDelete
??
??
?????????
?????????
13
Commonly used approaches
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

CreateObject(int a, string b) CreateObject(string
sourceName)
Create object
OK
Cancel
14
Selecting Objectsentities and data sets
15
Selecting Objectsentities and data sets
Restrictions OO interface Encapsulation of data
16
Data Set
  • The query is not executed
  • The query can be modified
  • Data are not accessible
  • The query is executed
  • Data can be used
  • To obtain other data new one more call to the
    database is needed
  • If redundant data was requested, spent resources
    can not be recovered

17
Selecting Objects
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

18
Selecting Objects
  • OO interface
  • ------- ----
  • --------
  • ----
  • --- --- ---- --- --
  • -----
  • -------
  • --------
  • -
  • Call-back from the Data Structures level
  • Various data sources

19
Selecting Objects
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

OnUpdate OnCreate OnDelete
??
??
?????????
?????????
20
Commonly used approaches
  • OO interface
  • Call-back from the Data Structures level
  • Various data sources

CreateObject(DataQry qry)
Create object
OK
Cancel
21
Data set types
  • List of field names
  • Base query

22
Detailing
23
Selection
  • SupplierQry qry new SupplierQry()
  • qry.Where.And(SupplierQry.Fields.SupplierName "
    like 'A'")
  • int count qry.ExecuteCount()

24
Updating
  • Methods of the class Entity
  • InsertRows
  • UpdateRows
  • DeleteRows

25
Triggers
  • private void ProcessNewData(SupplierQry inserted)
  • SupplierQry wrongSuppliers new
    SupplierQry(inserted)
  • wrongSuppliers.Where.And(String.Format("not
    IsValidSupplierName(0)",
  • SupplierQry.Fields.SupplierName))
  • string expr String.Format("CorrectSupplierNa
    me(0)", SupplierQry.Fields.SupplierN
    ame)
  • this.UpdateRowsById(wrongSuppliers,
  • Assign.Expression(SupplierQry.Fields.SupplierNa
    me, expr))

26
Designing
  • Does the truncated object-oriented model still
    make sense?

27
Polymorphism and Call-Back
28
Inheritance and Reuse
29
Encapsulation of Data and Complex Calculations
30
Open Issues
  • Obtaining and analysis of the practical results
  • Atomic parts of an SQL query and their nature.
  • Questions of casting of data set types.
  • Rules of interaction with application and the
    structure of interface level of Business
    Functionality
  • How to mitigate risk of low concurrency 15 due
    to encapsulated data behavior?
Write a Comment
User Comments (0)
About PowerShow.com