1 / 64

Dept [0..*] dname: string location: string [1..*]

i 10 Emp. i 20 Emp. i 30 Emp. i 11 name ”Doe”. i 21 name ”Poe”. i 31 name ”Lee”. Emp [0..*] name: string age: integer sal: integer [0..1]. i 12 age 29. i 22 age 41. i 32 age 20. i 13 sal 1900. i 23 sal 2500. i 14 worksIn i 50. i 24 worksIn i 60.

palila
Download Presentation

Dept [0..*] dname: string location: string [1..*]

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. i10Emp i20Emp i30Emp i11 name ”Doe” i21 name ”Poe” i31 name ”Lee” Emp [0..*] name: string age: integer sal: integer [0..1] i12 age 29 i22 age 41 i32 age 20 i13 sal 1900 i23 sal 2500 i14 worksIn i50 i24 worksIn i60 i33 worksIn i60 worksIn [1..1] i50Dept i60Dept 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. S – Objects < i1, Emp, {< i2, name, ”Doe”>, < i3, sal, 2500>, < i4, worksIn, i17> } >, < i5, Emp, {< i6, name, ”Poe”>, < i7, sal, 2000>, < i8, worksIn, i22> } >, < i9, Emp, {< i10, name, ”Lee”>, < i11, sal, 900>, < i12, address, { < i13, city, “Rome” >, < i14, street, “Boogie” >, < i15, house#, 13 > } >, < i16, worksIn, i22> } >, < i17, Dept, {< i18, dname, ”Trade”>, < i19, location, “Paris”>, < i20, location, “London”> < i21, employs, i1> } >, < i22, Dept, {< i23, dname, ”Ads”>, < i24, location, “Rome”>, < i25, employs, i5>, < i26, employs, i9> } > R - Start identifiers i1, i5, i9, i17, i22 Emp [0..*] name sal address[0..1] city street house# worksIn employs [1..*] Dept [0..*] dname location[1..*]

  3. i1Emp i5Emp i9Emp i2 name ”Doe” i6 name ”Poe” i10 name ”Lee” i3 sal 2500 i7 sal 2000 i11 sal 900 i12 address i4 worksIn i8 worksIn i13 city ”Rome” i14 street ”Boogie” i15 house# 13 i16 worksIn i17Dept i22Dept i23 dname ”Ads” i18 dname ”Trade” i24 location ”Rome” i19 location ”Paris” i25 employs i20 location ”Rome” i26 employs i21 employs

  4. Employee Employee Employee Name Doe Name Poe Name Lee Salary 1500 Salary 2500 Salary 2000 worksIn worksIn worksIn Boss employs C# 102030 employs CName Syntex employs Company

  5. Model AS0: S - Objects: < i1 , Emp, { < i2, name, ” Doe” >, < i3, sal, 2500 >, < i4, worksIn, ” Production” > } >, < i5 , Emp, { < i6, name, ” Poe” >, < i7, sal, 2000 >, < i8, worksIn, ” Sales” > } >, < i9 , Emp, { < i10, name, ” Lee” >, < i11, sal, 2000 >, < i12, worksIn, ” Sales” > } > R - Start identifiers i1 , i5 , i9 Relational schema: Emp( name, sal, worksIn ) Relation: Emp name Doe Poe Lee sal 2500 2000 2000 worksIn Production Sales Sales

  6. S – Objects < i1, Person, {< i2, name, ”Doe”>, ... } >, < i5, Emp, {< i6, name, ”Poe”>, < i7, sal, 2000>, < i8, worksIn, i22>, ... } >, < i9, Emp, {< i10, name, ”Lee”>, < i11, sal, 900>, < i16, worksIn, i33>, ...} > C - Classes < i40, PersonClass, {< i41, age, (...the code of the method age)>, ... other invariants of the PersonClass... } >, < i50, EmpClass, { < i51, changeSal, (... the code of the method changeSal...)>, < i52, netSal, (... the code of the method netSal ...)>, ... other invariants of the EmpClass... } > R - Start identifiers i1, i5, i9 CC - Inheritance among classes < i50, i40> SC - Membership of objects within classes < i1, i40>, < i5, i50>, < i9, i50>

  7. i40PersonClass i41 age (...code...) ... CC i50EmpClass i51 changeSal (...code...) i52 netSal (...code...) SC ... SC SC i1Person i5Emp i9Emp i2 name ”Doe” i6 name ”Poe” i10 name ”Lee” ... i11 sal 900 i7 sal 2000 i16 worksIn i8 worksIn ... ... i22 i33

  8. Person Employee Club-member Student Patient Student Dog-owner Tax-payer

  9. S – Objects (and roles) <i1, Person, { <i2, name, ”Doe” >, <i3, born, 1948 > } >, <i4, Person, { <i5, name, ”Poe” >, <i6, born, 1975 >} >, <i7, Person, { <i8, name, ”Lee” >, <i9, born, 1951 >} >, <i13, Emp, { <i14, sal, 2500 >, <i15, worksIn, i127> } >, <i16, Emp, { <i17, sal, 1500 >, <i18, worksIn, i128> } >, <i19, Student, { <i20, studentNo, 223344 >, <i21, faculty, ”Physics” >} > ..... C - Classes <i40, PersonClass , { <i41, age, (...code of the method Age...) >, ...other properties of PersonClass...}>, <i50, EmpClass , {<i51, changeSal, (...code of the method changeSal...) >, <i52, netSal, (...code of the method netSal...) >, ...other properties of EmpClass... }>, <i60, StudentClass , { <i61, avgScore, (... code of the method AvgScore...) >, ...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 < i1, i40>, < i4, i40>, < i7, i40>, < i13, i50>, < i16, i50>, < i19, i60> , ... SS – Inheritance between roles and objects < i13, i4>, < i16, i7>, < i19, i7> , ...

  10. i40 PersonClass i41 age(...code...) ............. i50EmpClass i60StudentClass i51 changeSal (...code...) i61 avgScore (...code...) i52 netSal (...code...) ............. ............. i1Person i4Person i7Person i2 name ”Doe” i5 name ”Poe” i8 name ”Lee” i3 born 1948 i6 born 1975 i9 born 1951 i13Emp i16Emp i19Student i14 sal 2500 i17 sal 1500 i20 studentNo 223344 i15 worksIn i18worksIn i21 faculty”Physics” i127 i128

  11. 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

  12. Client Server Persistent (shared) objects Volatile (non-shared) objects i1 Emp i17 Dept i128 Y i127 X i5 Emp i22 Dept i9 Emp

  13. Top Temporary processing section Emp(i1) Temporary processing section - properties of an executed procedure X(i127) Y(i128) N(5) I("Maria") Temporary processing section ......... Temporary processing section - properties of a processed object name(i10) sal(i11) address(i12) worksIn(i16) Temporary processing section ......... Binders to volatile properties of the current client session Emp(i1) Emp(i5) Emp(i9) ... Dept(i17) Dept(i22) ... Database section Global sections Binders to global library functions Binders to properties of the computer environment

  14. start of the search Emp(i1) X(i127) Y(i128) N(5) I("Maria") ......... name(i10) sal(i11) address(i12) worksIn(i16) ......... Emp(i1) Emp(i5) Emp(i9) ... Dept(i17) Dept(i22) ... ......... end of the search

  15. bag{struct{i1, i56}, struct{i6, i72}, struct{i11, i72}} bag{ struct{ n(„Doe"), s(i9) }, struct{ n(„Poe"), s(i14)}, struct{ n(”Lee" ), s(i18)}} sequence{ i1, i6, i11} i1 i6 i11 i1 i6 i11 i56 i72 i72 n ”Doe" ”Poe" ”Lee" s i9 i14 i18

  16. condition Empwhere (name = ”Poe” andsal > 1000) binding binding name(i10) sal(i11) address(i12) worksIn(i16) Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) Interior of the third object Emp Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) Initial ENVS state. bind( Emp ) = {i1, i5, i9} ENVS during evaluation of the condition for the third object Emp. bind( name ) = i10; bind( sal ) = i11

  17. i9Emp i10 name ”Lee” i11 sal 900 i12 address i13 city ”Rome” i14 street ”Boogie” i15 house# 13 i16 worksIn nested( i9 ) = { name( i10 ), sal( i11 ), address( i12 ), worksIn( i16 ) }

  18. Expression Reverse polish notation (2 *((5 + 3 ) / 4)) - 1 2 5 3 + 4 / * 1 - 3 4 / + 5 5 8 8 2 1 * - 2 2 2 2 2 2 4 4 3 empty

  19. top the only visible stack section 15 i17 struct{ x(i61), y(i93) } bag{ struct{ n(„Doe"), s(i9)}, struct{ n(„Poe"), s(i14)}, struct{ n(”Lee" ), s(i18)}} invisible stack sections bottom

  20. Non-algebraic operators Environment stack ENVS Query result stack QRES Query evaluation references to objects references to objects Object store Persistent (shared) objects Volatile (non-shared) objects

  21. Software development environment (editor, debugger, etc.) Client Parser of queries and programs Syntactic tree of a query/program Strong type checker Optimization by rewriting Optimization by indices Interpreter of queries & programs (proc. eval) Static ENVS ENVS Static QRES QRES Volatile (non-shared) objects Local metabase Network Register of indices Object manager Register of views Server Metabase of persistent objects Processing persistent abstractions (views, stored procedures, triggers) Administration module Persistent (shared) objects

  22. result of query q a consumer of the result eval( q ) previous state of QRES previous state of QRES previous state of QRES

  23. Start Non-algebraic where Left subquery Right subquery Algebraic2 = Name Emp Left subquery Right subquery Algebraic1 deref String value ”Poe” Name name

  24. result( q1 ) = bag{ e1, e2, e3 } nested(e1) nested(e2) nested(e3) Previous state of ENVS Previous state of ENVS Previous state of ENVS Previous state of ENVS Previous state of ENVS Previous state of ENVS Previous state of ENVS time result(q2) result(q2) result(q2) result(q1 θq2)

  25. name(i2) sal(i3) worksIn(i4) Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) name(i6) sal(i7) worksIn(i4) Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) name(i10) sal(i11) address(i22) worksIn(i16) Emp(i1) Emp(i5) Emp(i9) Dept(i17) Dept(i22) Results returned by querysal>1000 Result returned by query Emp Iteration over elements of the previous result Results returned by query sal Results returned by query1000 Final result of the query Dereference forced by > 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 > 1000 )

  26. Relational schema Address e# city street house# Emp e# name job sal worksIn Dept d# dname boss Location d# loc Object-oriented schema (class diagram) Emp [0..*] e# name job sal worksIn employs[1..*] Dept [0..*] d# dname loc[1..*] manages[0..1] boss Address [0..1] city street house#

  27. ( Deptjoinavg((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(..) ...

  28. Top of the ENVS stack Search order 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 Class C3 Sections pushed on ENVS during processing of the object O by a non-algebraic operator CC Class C2 CC Class C1 SC Object O

  29. Top of the ENVS stack name(i6) sal (i7) worksIn (i8) .... changeSal(i51) netSal(i52) ... age(i41) ... ......... Person(i1) ... Emp(i5) Emp(i9) ... nested(i5) - internals of the currently processed Poe’s object nested (i50) – internals of EmpClass nested (i40) – internals of PersonClass ... other sections ... Binders to database objects Sections pushed by the dot operator

  30. 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

  31. Person[0..*] name birthYear age() Address [0..1] city street house# Emp[0..*] e# job[1..*] sal[0..1] changeSal(newSal) netSal( ) Dept[0..*] d# dname loc[1..*] budget() worksIn employs[1..*] boss manages[0..1]

  32. Binders to volatile objects/variables of the current user session Person(i1) Person(i4) Person(i7) Emp(i13) Emp(i16) Student(i19) ... Binders to global library functions Binders to variables and functions of the computer environment Database section Global sections

  33. 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 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) ... ......... Search order Bottom of ENVS

  34. iR7C R7Class iR6C R6Class iR1C R1Class iR23C R23Class iR45C R45Class iR1R1 iR2R2 iR3R3 iR4R4 iR5R5

  35. nested(iR5) nested(iR45C) nested(iR3) nested(iR23C ) nested(iR6C ) nested(iR7C ) nested(iR1 ) nested(iR1C ) nested(iR7C ) ......... Sections of the role R5 Sections of the role R3 Sections of the role R1

  36. Person[0..*] name birthYear age( ) Student[0..*] s# faculty[0..1] scholarship avgScore( ) School[0..*] name city Address [0..1] city street house# Exam[0..*] subject score studiesAt teaches[0..*] Emp[0..1] e# job[1..*] sal[0..1] changeSal(newSal) netSal( ) Dept[0..*] d# dname loc[1..*] budget() worksIn employs[1..*] boss Manager[0..1] manages

  37. The world of analysis and design: teams of people having limitations of memory, perception, expressing information and communication. The world of the problem domain: complex, interdependent knowledge, business processes, aspects, problems and solutions. 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.

  38. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... mapping mapping Humanperception of the problem domain Abstract conceptual model of the problem domain Programmer’s view of data structures and operations

  39. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 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

  40. Person Company worksFor 0..* 1..* Employee Employer Employment Details

  41. Buyer Buyer Person Name Person Name Deal Subject Date Price Deal Subject Date Price Seller Seller Broker Broker

  42. 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 Noe Person Lee Person Noe Person Lee

  43. Person firstName lastName dateOfBirth age() inheritance Student student# yearOfStudy faculty insertScore(...) acceptSemester() Employee employee# job salary company# netSalary() changeSalary(...) object object object object object object object object

  44. Person Patient Student Tax-payer Club-member Dog-owner Employee Student

  45. PersonClass Name BirthYear Age() EmployeeClass Salary Job NetSalary() ChangeSalary(..) StudentClass Semester StudentNo NewScore(...) AvgScore() Classes Person NameDoe BirthYesr1948 Person NameBrown BirthYear1975 Person NameSmith BirthYear1951 Person NameJones BirthYear1940 Employee Salary2500 Jobanalyst Employee Salary1500 Jobclerk Objects with roles Student Semester 7 StudentNo223344 Student Semester 4 StudentNo556677 is_a_customer_of is a member of association link inherits from dynamically inherits from works_in works_in studies_at studies_at Company NameBank School NameNYA School NameMLI

More Related