Slajd 1 - PowerPoint PPT Presentation

1 / 64
About This Presentation
Title:

Slajd 1

Description:

i5, Emp, { i6, name, 'Poe' , i7, sal, 2000 , i8, worksIn, i22 ... Alternative (traditional) syntax for quantifiers. query ::= query query | query query ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 65
Provided by: Kazimier4
Category:

less

Transcript and Presenter's Notes

Title: Slajd 1


1
i30 Emp
i10 Emp
i20 Emp
i31 name Lee
i11 name Doe
i21 name Poe
Emp 0.. name string age integer sal integer
0..1
i32 age 20
i12 age 29
i22 age 41
i13 sal 1900
i23 sal 2500
i33 worksIn i60
i14 worksIn i50
i24 worksIn i60
worksIn 1..1
i50 Dept
i60 Dept
employs 1..
i51 dname Trade
i61 dname Ads
Dept 0.. dname string location string 1..
i52 location Paris
i62 location Berlin
i53 location Rome
i63 employs i30
i54 employs i10
i64 employs i20
2
(No Transcript)
3
(No Transcript)
4
Employee
Employee
Employee
Name Doe
Name Lee
Name Poe
Salary 1500
Salary 2000
Salary 2500
worksIn
worksIn
worksIn
Boss
employs
C 102030
employs
CName Syntex
employs
Company
5
(No Transcript)
6
ltDeptgt ltdnamegt Trade lt/dname gt ltlocationgt Paris lt/location gt ltlocationgt London lt/location gt ltemploysgt Doe lt/employsgt lt/Dept gt ltDeptgt ltdnamegt Ads lt/dname gt ltlocationgt Rome lt/location gt ltemploysgt Poe lt/employsgt ltemploysgt Lee lt/employsgt lt/Dept gt S Objects lt i17, Dept, lt i18, dname, Tradegt, lt i19, location, Parisgt, lt i20, location, Londongt lt i21, employs, Doegt gt, lt i22, Dept, lt i23, dname, Adsgt, lt i24, location, Romegt, lt i25, employs, Poegt, lt i26, employs, Leegt gt R - Start identifiers i17, i22
7
ltemp version1.2 date2006.01.10gt ltnamegt Doe lt/namegt ... lt/empgt ltempgt lt_at_versiongt 1.2 lt/_at_versiongt lt_at_dategt 2006.01.10 lt/_at_dategt ltnamegt Doe lt/namegt ... lt/empgt
8
ltempgt John Doe, born 1973 ltaddressgt Warsaw, Sienna 5 lt/addressgt His salary is 2500 lt/empgt ltempgt ltinfogt John Doe, born 1973 lt/infogt ltaddressgt Sienna 5, Warsaw lt/addressgt ltinfogt His salary is 2500 lt/infogt lt/empgt
9
S Objects lt i1, Person, lt i2, name, Doegt,
... gt, lt i5, Emp, lt i6, name, Poegt, lt i7,
sal, 2000gt, lt i8, worksIn, i22gt, ... gt, lt i9,
Emp, lt i10, name, Leegt, lt i11, sal, 900gt, lt
i16, worksIn, i33gt, ... gt C - Classes lt i40,
PersonClass, lt i41, age, (...the code of the
method age)gt, ... other invariants of the
PersonClass... gt, lt i50, EmpClass, lt i51,
changeSal, (... the code of the method
changeSal...)gt, lt i52, netSal, (... the code of
the method netSal ...)gt, ... other invariants of
the EmpClass... gt R - Start identifiers i1, i5,
i9 CC - Inheritance among classes lt i50, i40gt SC
- Membership of objects within classes lt i1,
i40gt, lt i5, i50gt, lt i9, i50gt
10
(No Transcript)
11
Person
Employee
Club-member
Student
Patient
Student
Dog-owner
Tax-payer
12
S Objects (and roles) lti1, Person, lti2, name,
Doe gt, lti3, born, 1948 gt gt, lti4, Person,
lti5, name, Poe gt, lti6, born, 1975 gt gt, lti7,
Person, lti8, name, Lee gt, lti9, born, 1951 gt
gt, lti13, Emp, lti14, sal, 2500 gt, lti15, worksIn,
i127gt gt, lti16, Emp, lti17, sal, 1500 gt, lti18,
worksIn, i128gt gt, lti19, Student, lti20,
studentNo, 223344 gt, lti21, faculty, Physics gt
gt ..... C - Classes lti40, PersonClass , lti41,
age, (...code of the method Age...) gt, ...other
properties of PersonClass...gt, lti50, EmpClass ,
lti51, changeSal, (...code of the method
changeSal...) gt, lti52, netSal, (...code of the
method netSal...) gt, ...other properties of
EmpClass... gt, lti60, StudentClass , lti61,
avgScore, (... code of the method AvgScore...) gt,
...other properties of StudentClass ...
gt, ..... R Root identifiers i1, i4, i7, i13,
i16, i19, ... CC - Inheritance between
classes Empty. SC - Membership of objects and
roles in classes lt i1, i40gt, lt i4, i40gt, lt i7,
i40gt, lt i13, i50gt, lt i16, i50gt, lt i19, i60gt ,
... SS Inheritance between roles and objects lt
i13, i4gt, lt i16, i7gt, lt i19, i7gt , ...
13
(No Transcript)
14
(No Transcript)
15
the order of searching for variable X
Top of the stack
Variables declared within block b Variables and
actual parameters of procedure p2 Variables and
actual parameters of procedure
p1 ........ Global variables
Bottom of the stack
16
Client
Server
Persistent (shared) objects
Volatile (non-shared) objects
i1 Emp
i17 Dept
i128 Y
i127 X
i5 Emp
i22 Dept
i9 Emp
17
(No Transcript)
18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
query literal The set L
query name The set N
query unaryAlgOperator query Unary algebraic operators
unaryAlgOperator count sum max - sqrt not ...
query query binaryAlgOperator query Binary algebraic operators
binaryAlgOperator lt gt - / and or intersect...
query query NonAlgOperator query Non-algebraic operator
NonAlgOperator where . join ? ? order by
query ?query query ?query query Alternative (traditional) syntax for quantifiers
query query as name Name definition
query query group as name Grouping and name definition
query if query then query Conditional query
query if query then query else query Another conditional query
querySeq query query, querySeq Sequence of queries
query struct( querySeq ) (querySeq) Structure constructor
query bag( ) bag( querySeq ) Bag constructor
query sequence( ) sequence( querySeq ) Sequence constructor
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
Results returned by query salgt1000
Result returned by query Emp
Results returned by query sal
Iteration over elements of the previous result
Results returned by query 1000
Final result of the query
Dereference forced by gt
i1 i5 i9
i1 i5
i3
2500
1000
true
i7
2000
1000
true
ENVS before evaluation
i11
900
1000
false
Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22)
Emp where (
sal gt
1000 )
31
Relational schema
Emp e name job sal worksIn
Dept d dname boss
Location d loc
Address e city street house
Object-oriented schema (class diagram)
Emp 0.. e name job sal
worksIn
employs1..
Dept 0.. d dname loc1..
manages0..1
boss
Address 0..1 city street house
32
( Dept join avg((employs . Emp
) .
sal ) )

e(..) name(..) job(..) sal(..)
worksIn(..) manages(..)
Emp(..)
d(..), dname(..) loc(..) loc(..)
... employs(..) employs(..) ... boss(..)
d(..), dname(..) loc(..) loc(..)
... employs(..) employs(..) ... boss(..)
d(..), dname(..) loc(..) loc(..)
... employs(..) employs(..) ... boss(..)
d(..), dname(..) loc(..) loc(..)
... employs(..) employs(..) ... boss(..)
d(..), dname(..) loc(..) loc(..)
... employs(..) employs(..) ... boss(..)
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
Emp(..) Emp(..), ... Dept(..) Dept(..) ...
33
(No Transcript)
34
(No Transcript)
35
Processing of the MyMethod body
Calculation of parameters, binding the name
MyMethod and firing the method
After completing MyMethod
p1(result(q1)) p2(result(q2)) x1(..) x2(..)
nested(r1) nested(iMC) ....... Global sections
Operator where
nested(r1) nested(iMC) ....... Global sections
nested(r1) nested(iMC) ....... Global sections
....... Global sections
time
Evaluation of q0
Removing the results of q1, q2
result(q2) result(q1) result(q0) Previous QRES
state
result(q) result(q0) Previous QRES state
result(q0) Previous QRES state
result(q0) Previous QRES state
36
Person0.. name birthYear age()
Address 0..1 city street house
Emp0.. e job1.. sal0..1 changeSal(newSal)
netSal( )
Dept0.. d dname loc1.. budget()
employs1..
worksIn
manages0..1
boss
37
(No Transcript)
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(i17) worksIn(i18) changeSal(i51)
netSal(i52 ) ... name(i8) born(i9) age(i41)
... ......... Person(i1) Person(i4)
Person(i7) Emp(i13) Emp(i16) Student(i19) ...
.........
Bottom of ENVS
39
(No Transcript)
40
(No Transcript)
41
Person0.. name birthYear age( )
Student0.. s faculty0..1 scholarship avg
Score( )
School0.. name city
Address 0..1 city street house
Exam0.. subject score
studiesAt
teaches0..
Emp0..1 e job1.. sal0..1 changeSal(newSal)
netSal( )
Dept0.. d dname loc1.. budget()
employs1..
worksIn
boss
Manager0..1
manages
42
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.
Software strategic decisions, analysis, design,
construction, testing, documentation, deployment,
user training, operation, maintenance,
modifications, etc.
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
mapping
mapping
Human perception of the problem domain
Abstract conceptual model of the problem domain
Programmers view of data structures and
operations
44
seamless mapping
seamless mapping
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
45
1..
0..
Employer
Employee
Employment Details
46
Buyer
Buyer
Person Name
Person Name
Deal Subject Date Price
Deal Subject Date Price
Seller
Seller
Broker
Broker
47
Person Doe
Person Doe
Person Poe
Person Poe
Buyer
Seller
Buyer
Seller
Deal House 1995.08.16 40000
Deal House 1995.08.16 40000
Broker
Broker
Person Kim
Person Kim
Broker
Broker
Deal Car 1998.05.15 20000
Deal Car 1998.05.15 20000
Seller
Seller
Buyer
Buyer
Person Lee
Person Noe
Person Lee
Person Noe
48
Person firstName lastName dateOfBirth age()
inheritance
Employee employee job salary company netSalary()
changeSalary(...)
Student student yearOfStudy faculty
insertScore(...) acceptSemester()
object
object
object
object
object
object
object
object
49
Person
Club-member
Student
Tax-payer
Patient
Student
Employee
Dog-owner
50
PersonClass Name BirthYear Age()
EmployeeClass Salary Job NetSalary() ChangeSalary(
..)
StudentClass Semester StudentNo NewScore(...) AvgS
core()
Classes
Person Name Doe BirthYesr 1948
Person Name Brown BirthYear 1975
Person Name Jones BirthYear 1940
Person Name Smith BirthYear 1951
Employee Salary 2500 Job analyst
Employee Salary 1500 Job clerk
Objects with roles
Student Semester 4 StudentNo 556677
Student Semester 7 StudentNo 223344
is_a_customer_of
is a member of association link inherits
from dynamically inherits from
works_in
works_in
studies_at
studies_at
Company Name Bank
School Name NYA
School Name MLI
51
Employees
.....
52
(No Transcript)
53
(No Transcript)
54
Application 1
Application 2
Application 3
Web Service application
Applications based on virtual repository
Client view 1
Client view 2
Client view 3
Client view 4
ODRA database server
Integration view
Communication Bus
Contributory view 1
Contributory view 2
XML importer/ exporter
Contributory view 3
Contributory view
O-R wrapper
O-RDF wrapper
O-WS wrapper
. wrapper
Existing sources
Relational databases
RDF resources
XML files
Web Service applications
. application
55
Part 0.. name
Aggregate 0.. assemblyCost assemblyMass
Detail 0.. cost mass
Component 1.. amount leadsTo
56
Company name
isOwnedBy

hasSharesIn

57
SupplierClass . Default attribute Sname
Default attribute Status -1 Default attribute
City ??? ..
58
a) The natural scoping rule
Local environment of m
Class C1 . Default attribute a .
Object O attribute a
The rest of the environment
59
Binding salary
name(Brown) address(..) job(..) worksIn
(..) name(..) address(..) salary(..) job(..)
worksIn (..) ......... Global stack sections
Section pushed by the third where operator for
the Browns object
Section pushed by the second where operator for
an Emp object
60

engine
..
carburettor
starter
..
bolt10x30
61
myperson
ancestors
result
allcousins
62
Emp(i1)
Temporary processing section
Temporary processing section - properties of an
executed procedure
X(i127) Y(i128) N(5) I("Maria")
.........
Temporary processing section
name(i10) sal(i11) address(i12) worksIn(i16)
Temporary processing section - properties of a
processed object
Conceptual ENVS
.........
Temporary processing section
Binders to volatile properties of the current
client session
Emp(i1) Emp(i5) Emp(i9) ... Dept(i17) Dept(i22)
...
Database section
Libraries and computer environment
Optimized ENVS
63
(No Transcript)
64
P1 calls P2
P2 calls P3
P3 ends
P2 ends
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 P2 Activation record of
P1 ........ Global entities
Top of the stack
Activation record of P1 ........ Global entities
Activation record of P1 ........ Global entities
P1 is running
P2 is running
P3 is running
P2 is running
P1 is running
time
Write a Comment
User Comments (0)
About PowerShow.com