Download presentation
Presentation is loading. Please wait.
Published byDominic Pierce Modified over 9 years ago
1
Dept [0..*] dname: string location: string [1..*] Emp [0..*] name: string age: integer sal: integer [0..1] worksIn [1..1] employs [1..*] i 50 Dept i 51 dname ”Trade” i 52 location ”Paris” i 53 location „Rome” i 54 employs i 10 i 60 Dept i 61 dname ”Ads” i 62 location ”Berlin” i 63 employs i 30 i 64 employs i 20 i 30 Emp i 31 name ”Lee” i 32 age 20 i 33 worksIn i 60 i 10 Emp i 11 name ”Doe” i 12 age 29 i 13 sal 1900 i 14 worksIn i 50 i 20 Emp i 21 name ”Poe” i 22 age 41 i 23 sal 2500 i 24 worksIn i 60
2
Dept [0..*] dname location[1..*] worksIn employs [1..*] Emp [0..*] name sal address[0..1] city street house# S – Objects, } >,, } >,, < i 12, address, {, } >,, } >,, } > R - Start identifiers i 1, i 5, i 9, i 17, i 22
3
i 17 Dept i 18 dname ”Trade” i 19 location ”Paris” i 20 location ”Rome” i 21 employs i 22 Dept i 23 dname ”Ads” i 24 location ”Rome” i 25 employs i 26 employs i 1 Emp i 2 name ”Doe” i 3 sal 2500 i 4 worksIn i 5 Emp i 6 name ”Poe” i 7 sal 2000 i 8 worksIn i 9 Emp i 10 name ”Lee” i 16 worksIn i 11 sal 900 i 12 address i 13 city ”Rome” i 14 street ”Boogie” i 15 house# 13
4
Company C# 102030 CName Syntex Boss employs Employee Name Doe Salary 1500 worksIn Employee Name Lee Salary 2000 worksIn Employee Name Poe Salary 2500 worksIn
5
Relational schema: Emp( name, sal, worksIn ) name Doe Poe Lee sal 2500 2000 worksIn Production Sales Relation: Emp Model AS0: S - Objects:, } >,, } >,, } > R - Start identifiers i 1, i 5, i 9
6
Trade Paris London Doe Ads Rome Poe Lee S – Objects, } >,, } > R - Start identifiers i 17, i 22
7
Doe... 1.2 2006.01.10 Doe...
8
John Doe, born 1973 Warsaw, Sienna 5 His salary is 2500 John Doe, born 1973 Sienna 5, Warsaw His salary is 2500
9
S – Objects,... } >,,,,... } >,,,,...} > C - Classes,... other invariants of the PersonClass... } >,,,... other invariants of the EmpClass... } > R - Start identifiers i1, i5, i9 CC - Inheritance among classes SC - Membership of objects within classes,,
10
i 1 Person i 2 name ”Doe”... i 9 Emp i 10 name ”Lee” i 16 worksIn i 11 sal 900... i 5 Emp i 6 name ”Poe” i 7 sal 2000 i 8 worksIn... i 40 PersonClass i 41 age (...code...)... i 51 changeSal (...code...)... i 50 EmpClass i 52 netSal (...code...) CC SC i 22 i 33
11
Student Employee Club-member Student Tax-payer Dog-owner Person Patien t
12
S – Objects (and roles), } >,, } >..... C - Classes,...other properties of PersonClass...}>,,,...other properties of EmpClass... }>,,...other properties of StudentClass... }>,..... R – Root identifiers i1, i4, i7, i13, i16, i19,... CC - Inheritance between classes Empty. SC - Membership of objects and roles in classes,,,,,,... SS – Inheritance between roles and objects,,,...
13
i 40 PersonClass i 41 age (...code...)............. i 1 Person i 2 name ”Doe” i 3 born 1948 i 4 Person i 5 name ”Poe” i 6 born 1975 i 127 i 13 Emp i 14 sal 2500 i 15 worksIn i 7 Person i 8 name ”Lee” i 9 born 1951 i 128 i 16 Emp i 17 sal 1500 i 18 worksIn i 19 Student i 20 studentNo 223344 i 21 faculty ”Physics” i 60 StudentClass i 61 avgScore (...code...)............. i 50 EmpClass i 51 changeSal (...code...) i 52 netSal (...code...).............
15
Variables declared within block b Variables and actual parameters of procedure p2 Variables and actual parameters of procedure p1........ Global variables Top of the stack Bottom of the stack the order of searching for variable X
16
i 1 Emp i 5 Emp i 9 Emp i 17 Dept i 22 Dept Persistent (shared) objects i 127 X i 128 Y Volatile (non-shared) objects ClientServer
17
Emp(i 1 ) Temporary processing section - properties of an executed procedure Temporary processing section - properties of a processed object Temporary processing section Global sections Database section X(i 127 ) Y(i 128 ) N(5) I("Maria")......... name(i 10 ) sal(i 11 ) address(i 12 ) worksIn(i 16 ) Binders to volatile properties of the current client session Emp(i 1 ) Emp(i 5 ) Emp(i 9 )... Dept(i 17 ) Dept(i 22 )... Binders to global library functions Binders to properties of the computer environment......... Top
18
Emp(i 1 ) X(i 127 ) Y(i 128 ) N(5) I("Maria")......... name(i 10 ) sal(i 11 ) address(i 12 ) worksIn(i 16 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 )... Dept(i 17 ) Dept(i 22 )............ start of the search end of the search
19
sequence{ i 1, i 6, i 11 } i 1 i 6 i 11 bag{ struct{i 1, i 56 }, struct{i 6, i 72 }, struct{i 11, i 72 }} i 1 i 6 i 11 i 56 i 72 bag{ struct{ n(„Doe"), s(i 9 ) }, struct{ n(„Poe"), s(i 14 )}, struct{ n(”Lee" ), s(i 18 )}} n ”Doe" ”Poe" ”Lee" s i 9 i 14 i 18
20
Emp where (name = ”Poe” and sal > 1000) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) name(i 10 ) sal(i 11 ) address(i 12 ) worksIn(i 16 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) Initial ENVS state. bind( Emp ) = {i 1, i 5, i 9 } ENVS during evaluation of the condition for the third object Emp. bind( name ) = i 10 ; bind( sal ) = i 11 binding Interior of the third object Emp condition
21
i 9 Emp i 10 name ”Lee” i 16 worksIn i 11 sal 900 i 12 address i 13 city ”Rome” i 14 street ”Boogie” i 15 house# 13 nested( i 9 ) = { name( i 10 ), sal( i 11 ), address( i 12 ), worksIn( i 16 ) }
22
query ::= literalThe set L query ::= nameThe set N query ::= unaryAlgOperator queryUnary algebraic operators unaryAlgOperator ::= count | sum | max | - | sqrt | not |... query ::= query binaryAlgOperator queryBinary algebraic operators binaryAlgOperator ::= =| | +| -| *| /| and| or| intersect|... query ::= query NonAlgOperator queryNon-algebraic operator NonAlgOperator ::= where |. | join | ∀ | ∃ | order by query ::= ∀ query query | ∃ query query Alternative (traditional) syntax for quantifiers query ::= query as nameName definition query ::= query group as nameGrouping and name definition query ::= if query then queryConditional query query ::= if query then query else queryAnother conditional query querySeq ::= query | query, querySeqSequence of queries query ::= struct( querySeq ) | (querySeq)Structure constructor query ::= bag( ) | bag( querySeq )Bag constructor query ::= sequence( ) | sequence( querySeq )Sequence constructor
23
(2 *((5 + 3 ) / 4)) - 12 5 3 + 4 / * 1 - Expression 22 5 2 5 3 2 8 4 2 2 4 1 432 8 + / * - Reverse polish notation empty
24
15 i 17 struct{ x(i 61 ), y(i 93 ) } bag{ struct{ n(„Doe"), s(i 9 )}, struct{ n(„Poe"), s(i 14 )}, struct{ n(”Lee" ), s(i 18 )}} bottom the only visible stack section invisible stack sections top
25
Object store Environment stack ENVS Query result stack QRES Query evaluation Non-algebraic operators references to objects Volatile (non-shared) objects Persistent (shared) objects
26
Parser of queries and programs Software development environment (editor, debugger, etc.) Client Syntactic tree of a query/program Volatile (non-shared) objects ENVS QRES Static ENVS Static QRES Persistent (shared) objects Object manager Processing persistent abstractions (views, stored procedures, triggers) Register of indices Server Local metabase Metabase of persistent objects Optimization by rewriting Optimization by indices Interpreter of queries & programs (proc. eval) Strong type checker Network Register of views Administration module
27
previous state of QRES eval( q ) result of query q previous state of QRES previous state of QRES a consumer of the result
28
Start Non-algebraicwhere Left subqueryRight subquery NameEmp Algebraic2= Left subqueryRight subquery Namename Algebraic1derefString value”Poe”
29
result( q 1 ) = bag{ e 1, e 2, e 3 } Previous state of ENVS Previous state of ENVS nested(e 1 ) Previous state of ENVS Previous state of ENVS nested(e 2 ) Previous state of ENVS Previous state of ENVS nested(e 3 ) Previous state of ENVS time result(q 2 ) result(q 1 θ q 2 )
30
Emp where ( sal > 1000 ) i1i5i9i1i5i9 i3i3 i7i7 i 11 i1i5i1i5 Result returned by query Emp Results returned by query sal Iteration over elements of the previous result Dereference forced by > 2500 2000 900 Results returned by query 1000 1000 true false Results returned by query sal>1000 Final result of the query name(i 2 ) sal(i 3 ) worksIn(i 4 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) name(i 6 ) sal(i 7 ) worksIn(i 4 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) name(i 10 ) sal(i 11 ) address(i 22 ) worksIn(i 16 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) Emp(i 1 ) Emp(i 5 ) Emp(i 9 ) Dept(i 17 ) Dept(i 22 ) ENVS before evaluation
31
Emp e# name job sal worksIn Dept d# dname boss Location d# loc Address e# city street house# Relational schema Dept [0..*] d# dname loc[1..*] Object-oriented schema (class diagram) worksIn employs [1..*] Emp [0..*] e# name job sal Address [0..1] city street house# manages [0..1] boss
32
( Dept join avg((employs. Emp ). sal ) ) Emp(..) Emp(..),... Dept(..) Dept(..)... Emp(..) Emp(..),... Dept(..) Dept(..)... d#(..), dname(..) loc(..) loc(..)... employs(..) employs(..)... boss(..) Emp(..) Emp(..),... Dept(..) Dept(..)... Emp(..) d#(..), dname(..) loc(..) loc(..)... employs(..) employs(..)... boss(..) Emp(..) Emp(..),... Dept(..) Dept(..)... d#(..), dname(..) loc(..) loc(..)... employs(..) employs(..)... boss(..) Emp(..) Emp(..),... Dept(..) Dept(..)... e# (..) name (..) job (..) sal(..) worksIn(..) manages(..) d#(..), dname(..) loc(..) loc(..)... employs(..) employs(..)... boss(..) Emp(..) Emp(..),... Dept(..) Dept(..)... d#(..), dname(..) loc(..) loc(..)... employs(..) employs(..)... boss(..) Emp(..) Emp(..),... Dept(..) Dept(..)...
33
Binders to internal properties of the currently processed object O Binders to internal properties of the class C1 that O is a member Binders to internal properties of the class C2 that is a superclass of C1 Binders to internal properties of the class C3 that is a superclass of C2............................ Binders with start identifiers of the object store Top of the ENVS stack Sections pushed on ENVS during processing of the object O by a non-algebraic operator Object O Class C1 Class C2 Class C3 CC SC Search order
34
name(i 6 ) sal (i 7 ) worksIn (i 8 ).... changeSal(i 51 ) netSal(i 52 )... age(i 41 )............ Person(i 1 )... Emp(i 5 ) Emp(i 9 )... nested(i 5 ) - internals of the currently processed Poe’s object nested (i 50 ) – internals of EmpClass nested (i 40 ) – internals of PersonClass... other sections... Binders to database objects Top of the ENVS stack Sections pushed by the dot operator
35
Calculation of parameters, binding the name MyMethod and firing the method result(q 0 ) Previous QRES state Operator where Evaluation of q 0 Removing the results of q 1, q 2 Processing of the MyMethod body After completing MyMethod....... Global sections time result(q 2 ) result(q 1 ) result(q 0 ) Previous QRES state result(q 0 ) Previous QRES state result(q) result(q 0 ) Previous QRES state nested(r 1 ) nested(i MC )....... Global sections p 1 (result(q 1 )) p 2 (result(q 2 )) x 1 (..) x 2 (..) nested(r 1 ) nested(i MC )....... Global sections nested(r 1 ) nested(i MC )....... Global sections
36
Emp[0..*] e# job[1..*] sal[0..1] changeSal(newSal) netSal( ) Dept[0..*] d# dname loc[1..*] budget() employs[1..*]worksIn Person[0..*] name birthYear age() Address [0..1] city street house# manages[0..1] boss
37
Binders to volatile objects/variables of the current user session Person(i 1 ) Person(i 4 ) Person(i 7 ) Emp(i 13 ) Emp(i 16 ) Student(i 19 )... Binders to global library functions Binders to variables and functions of the computer environment Global sections Database section
38
Properties of the currently processed Emp role Properties of the EmpClass Properties of the Person super- role of the Emp role Properties of the PersonClass Database section Search order sal(i 17 ) worksIn(i 18 ) changeSal(i 51 ) netSal(i 52 )... name(i 8 ) born(i 9 ) age(i 41 )............ Person(i 1 ) Person(i 4 ) Person(i 7 ) Emp(i 13 ) Emp(i 16 ) Student(i 19 )............ Bottom of ENVS
39
i R1C R1Class i R1 R1 i R2 R2 i R3 R3 i R5 R5 i R4 R4 i R6C R6Class i R45C R45Class i R7C R7Class i R23C R23Class
40
nested(i R5 ) nested(i R45C ) nested(i R3 ) nested(i R23C ) nested(i R6C ) nested(i R7C ) nested(i R1 ) nested(i R1C ) nested(i R7C )......... Sections of the role R5 Sections of the role R3 Sections of the role R1
41
Emp[0..1] e# job[1..*] sal[0..1] changeSal(newSal) netSal( ) Dept[0..*] d# dname loc[1..*] budget() employs[1..*] studiesAt manages boss Person[0..*] name birthYear age( ) Address [0..1] city street house# Student[0..*] s# faculty[0..1] scholarship avgScore( ) Exam[0..*] subject score School[0..*] name city worksIn teaches[0..*] Manager[0..1]
42
Software : strategic decisions, analysis, design, construction, testing, documentation, deployment, user training, operation, maintenance, modifications, etc. The world of the problem domain: complex, interdependent knowledge, business processes, aspects, problems and solutions. The world of analysis and design: teams of people having limitations of memory, perception, expressing information and communication. The world of software users: psychological factors, ergonomy, limitations of memory, tendency to errors and abuse, ownership, intellectual properties, privacy, security, etc. The world of computer technologies: hardware, software, networks, languages, methodologies, tools, facilities, standards, etc.
43
Human perception of the problem domain Abstract conceptual model of the problem domain Programmer’s view of data structures and operations mapping...
44
Real objects or concepts in the problem domain Classes of abstract objects in the conceptual model of the problem domain Objects and their classes as data structures within an object-oriented database seamless mapping...
45
PersonCompany EmployerEmployee Employment Details 1..* worksFor 0..*
46
Broker Deal Subject Date Price Person Name Buyer Seller Broker Person Name Buyer Seller Deal Subject Date Price
47
Deal House 1995.08.16 40000 Deal Car 1998.05.15 20000 Person Kim Broker Deal Car 1998.05.15 20000 Person Lee Person Noe Buyer Seller Broker Deal House 1995.08.16 40000 Person Poe Person Doe BuyerSeller Person Kim Broker Person Lee Person Noe Buyer Seller Broker Person Poe Person Doe BuyerSeller
48
Employee employee# job salary company# netSalary() changeSalary(...) Student student# yearOfStudy faculty insertScore(...) acceptSemester() Person firstName lastName dateOfBirth age() object inheritance
49
StudentEmployee Club-memberStudentTax-payer Dog-owner Person Patient
50
Person Name Doe BirthYesr 1948 PersonClass Name BirthYear Age() EmployeeClass Salary Job NetSalary() ChangeSalary(..) StudentClass Semester StudentNo NewScore(...) AvgScore() Classes Person Name Brown BirthYear 1975 Employee Salary 2500 Job analyst Person Name Jones BirthYear 1940 Student Semester 4 StudentNo 556677 Objects with roles Company Name Bank works_in School Name NYA studies_at School Name MLI studies_at is_a_customer_of Person Name Smith BirthYear 1951 Employee Salary 1500 Job clerk Student Semester 7 StudentNo 223344 is a member of association link inherits from dynamically inherits from
51
Employees..... Employee Employments..... Employment Job Surname Children... Child Employee Employments..... Employment Job Surname Children... Child
52
EW[0..*]WECW[0..*]WC Person[0..*] lName fName[1..*] Addres[1..*] Company[0..*] cName cLocation[1..*] Work[0..*] Payment[0..*] Expertise[1..*] Expert[0..*] Competence[1..*]
53
Company(C#, cName) cLocation(Place, C#) Work(W#, C#, E#) Expert(E#, P#) Expertise(eText, W#) Payment(pAmount, W#) Person(P#, lName) Competence(cDescr, E#) Names(fName, P#) Addresses(Addres, P#)
54
Communication Bus Integration view Existing sources Contributory view 1 O-R wrapper Relational databases Contributory view 2 O-RDF wrapper RDF resources XML importer/ exporter XML files Contributory view 3 O-WS wrapper Web Service applications Contributor y view …. wrapper …. application ODRA database server Application 1 Client view 1 Client view 2 Application 2 Client view 3 Application 3 Client view 4 Web Service application Applications based on virtual repository
55
Part [0..*] name Aggregate [0..*] assemblyCost assemblyMass Detail [0..*] cost mass Component [1..*] amount leadsTo
56
* hasSharesIn isOwnedBy * Company name
57
SupplierClass …. Default attribute Sname = ” ” Default attribute Status = -1 Default attribute City = ”???” ….. Supplier Sname Black Sno 1234 City Rome Supplier Sname Gray Sno 1256 Status 55
58
Local environment of m Class C2 …. method m …. Class C1 …. Default attribute a = … …. Object O … attribute a = … The rest of the environment a) The natural scoping rule Local environment of m Class C1 …. Default attribute a = … method m …. Object O … attribute a = … The rest of the environment b) Binding conflict
59
name(”Brown”) address(..) job(..) worksIn (..) name(..) address(..) salary(..) job(..) worksIn (..)......... Global stack sections Section pushed by the third where operator for the Brown’s object Section pushed by the second where operator for an Emp object Binding salary
60
engine ….. carburettorstarter bolt10x30 …… ….. ……
61
mypersonancestorsresultallcousins
62
Temporary processing section - properties of an executed procedure Temporary processing section - properties of a processed object Temporary processing section Database section Emp(i 1 ) X(i 127 ) Y(i 128 ) N(5) I("Maria")......... name(i 10 ) sal(i 11 ) address(i 12 ) worksIn(i 16 ) Binders to volatile properties of the current client session Emp(i 1 ) Emp(i 5 ) Emp(i 9 )... Dept(i 17 ) Dept(i 22 )... Libraries and computer environment......... Emp(i 1 ) Environment of i loc......... Environment of i 9 Environment of i ses Environment of i db Libraries and computer environment......... < i 9, Emp, {, } > Conceptual ENVS Optimized ENVS
63
Emp[0..*] eno: integer job: string[0..1] sal: real changeSal(newSal: real) netSal( ): real Dept[0..*] dno: integer dname: string loc: string[1..*] budget(): real employs[1..*]worksIn Person[0..*] name: string birthYear: integer age(): integer address [0..1] city: string street: string house: integer manages[0..1] boss
64
Activation record of P1........ Global entities Activation record of P2 Activation record of P1........ Global entities Activation record of P3 Activation record of P2 Activation record of P1........ Global entities Activation record of P2 Activation record of P1........ Global entities Activation record of P1........ Global entities P1 calls P2 Top of the stack P1 is runningP2 is runningP3 is runningP2 is runningP1 is running P3 ends P2 calls P3 P2 ends time
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.