1 access architecture the general method data models access / business modules definitions models...

11
1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the documentation define describe generate

Upload: beverley-york

Post on 04-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

1

ACCESS ARCHITECTUREthe general method

data models

access / business modules definitions

models construction

the access modules, the test programs,the documentation

define

describe

generate

Page 2: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

2

PRODUCTnum_prodDescrprixid: num_prod

Detailnum_comnum_prodqteid: num_com

ref: num_comref: num_prod

num_prod

ORDERnum_comnum_cliDateid: num_comref: num_cli

CustNum_clinomid: Num_cli

Access mod

« customer »

programs

ACCESS MODULES VS BUSINESS MODULES

BUSINESS MODULECOM-PRIX-TOTAL IS CALCULATED BY

THE BUSINESS OBJECTSAccess mod

 detail 

Access mod

order

Access mod

« product »

PRODUCTPROD-NUMPROD-DESCPROD-PRICEid: PROD-NUM

DETAILDET-NUM-ORD

DET-NUM-PRODDET-QTYid: DET-NUM-ORD

DET-NUM-PRODref: DET-NUM-ORDref: DET-NUM-PROD

ORDERORD-NUMORD-NUM-CUSORD-DATEid: ORD-NUMref: ORD-NUM-CUS

CUStCLI-NUMCLI-NOMid: CLI-NUM

Page 3: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

3

Access modules rolesTo garantee some independance to the

programs vs the DBTo homogenise DB access (if different

DBMS)To centralize the data access in a single

moduleTo verify the integrity constraintsTo garantee confidentiality and access

controlTo manage the transactionsTo put measure points in place ( for

statistical or invoicing purpose)

Program n…

Program 3Program 2

Program 1 EMPRUNTEUR0-1

REPONDANT0-N

REPONDANT

REFERENCE0-N

ORIGINE0-N

REF_BIBLIOGRAPH

0-N

0-N

0-N

EMP_CLOTUREDATE_DEBUTDATE_FINid: EXEMPLAIRE

DATE_DEBUT

0-N

0-N

0-1

EMPRUNTDATE_EMPRUNT

0-N

1-N

ECRIT

1-1

0-N

DE

PROJETCODENOMid: CODEid': NOM

OUVRAGENUMEROTITREEDITEURDATE_PREM_PARUTIONNOTE_PRESENTATION[0-1]MOT_CLE[0-10]id: NUMERO

EXEMPLAIRENUMERO_D_ORDREDATE_D_ACQUISITIONLOCALITE

ETAGETRAVEERAYON

NOMBRE_DE_LIVRESETAT_LIVRECOMMENTAIRE_ETAT[0-1]id: DE.OUVRAGE

NUMERO_D_ORDRE

EMPRUNTEURMATRICULENOMPRENOMADRESSE

SOCIETEVOIECODE_POSTALVILLE

TELEPHONE[0-5]id: MATRICULE

AUTEURNOMPRENOM[0-1]DATE_NAISSANCE[0-1]ORIGINE[0-1]

BIBLIOTHEQUE/1Business modules

EMPRUNTEUR0-1

REPONDANT0-N

REPONDANT

REFERENCE0-N

ORIGINE0-N

REF_BIBLIOGRAPH

0-N

0-N

0-N

EMP_CLOTUREDATE_DEBUTDATE_FINid: EXEMPLAIRE

DATE_DEBUT

0-N

0-N

0-1

EMPRUNTDATE_EMPRUNT

0-N

1-N

ECRIT

1-1

0-N

DE

PROJETCODENOMid: CODEid': NOM

OUVRAGENUMEROTITREEDITEURDATE_PREM_PARUTIONNOTE_PRESENTATION[0-1]MOT_CLE[0-10]id: NUMERO

EXEMPLAIRENUMERO_D_ORDREDATE_D_ACQUISITIONLOCALITE

ETAGETRAVEERAYON

NOMBRE_DE_LIVRESETAT_LIVRECOMMENTAIRE_ETAT[0-1]id: DE.OUVRAGE

NUMERO_D_ORDRE

EMPRUNTEURMATRICULENOMPRENOMADRESSE

SOCIETEVOIECODE_POSTALVILLE

TELEPHONE[0-5]id: MATRICULE

AUTEURNOMPRENOM[0-1]DATE_NAISSANCE[0-1]ORIGINE[0-1]

BIBLIOTHEQUE/1

Business modules roles

Same role as access modules

+ Programs are totally independant from

the DB Programs are getting simpler The management rules for the business

objects are written once and by business specialists.

Maintenance improvement Performances optimization

Access

modules

Access modules vs business modules

Page 4: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

4

ACCESS ARCHITECTUREthe general method

data models

access / business modules definitions

models construction

the access modules, the test programs,the documentation

define

describe

generate

Page 5: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

5

BUSINESS MODULE CONSTRUCTION

LOGICAL MODELProduit

num_prodlibelleprixniveauid: num_prod

Detailnum_comnum_prodqteid: num_com

num_prodref: num_comref: num_prod

Commandenum_comnum_cliDateid: num_comref: num_cli

ClientNum_clinomprenomadressetelephoneid: Num_cli

The business module is derived from the logical model

by transformation within DB-MAINKeeps the mapping between the 2 schemas

BUSINESS MODULE

sem : la dernière commandeselect : date in (select max(date) from commande)

sem : retourne les commandes passées le "DATE"name : DATEtech : COMMANDE.DATE = :TB-COMMANDE.TB-DATE

tech : PERFORM COMPUTE-PRIX-TOTAL.

tech : COMPUTE-PRIX-TOTAL. ....

1-1

0-NPASSE-LAST

1-1

0-N

PASSE

acc: COMMANDE

COMMANDE-LASTNUM-COMNOMPRENOMADRESSEDATEDETAIL[0-20]

NUM-PRODLIBELLEQTEPRIXPRIX-TOTALid: NUM-COM

COMMANDENUM-COMNOMPRENOMADRESSEDATEDETAIL[0-20]

NUM-PRODLIBELLEQTEPRIXPRIX-TOTALid: NUM-COMacc: DATEADD-DETAILDEL-DETAIL

CLIENTNUM-CLINOMPRENOMADRESSETELEPHONEid: NUM-CLIacc: NOM

The instructions depend on the technological

platform

Page 6: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

6

1-10-N possede-10

personnenomprenomadresseid: nom

acc

compte-10-mvtnumsoldemouvement[10-10]

datevaleur

id: numacc: soldeid(mouvement):

datemethod

Formalism to represent business module Close to an entity-relationship schema Keeps the link between the logical schema and the business schema Allows an automatic generation of the components

concept

association 0-N(between concepts)

attribute (simple)Decomposable attribute

Access criteria

method/function

BUSINESS MODULE CONSTRUCTION

Page 7: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

7

name : component namesem : component description select : selection (clause where)order_by : sort keyupdatable: true/falsevar : varaibles declaration in workinghost_var : déclaration of "host variables"insert_pre: code to be executed before an insertioninsert_post: code to be executed after an insertiontech : code to be added at the end of the program

BUSINESS MODULE CONSTRUCTION

sem : attribute descriptionselect : selection (where clause)order_by : sort key

sem : criteria descriptionname : criteria nametech : selection (clause where) order_by : sort key

name : method namesem : method descriptiontech : method code

1-10-N possede-10

personnenomprenomadresseid: nom

acc

compte-10-mvtnumsoldemouvement[10-10]

datevaleur

id: numacc: soldeid(mouvement):

datemethod

compte-10-mvtnumsoldemouvement[10-10]

datevaleur

id: numacc: soldeid(mouvement):

datemethod

Complementaryinformations

name : relation namesem : relation description

Model enrichment by simply adding meta-properties in DB-Main.

Page 8: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

8

ACCESS ARCHITECTUREthe general method

data models

access / business modules definitions

models construction

the access modules, the test programs,the documentation

define

describe

generate

Page 9: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

9

ACCESS MODULE GENERATION

Modules generation Depends on the technical platform language (COBOL, C, C++, JAVA,…) The generation of business modules can be done simultaneously in different

languages( eg: JAVA and COBOL) The same base can be accessed following the same logic by different applications

( back-end application in Cobol and front-end application in Java for the internet)

Ducumentation generation

Test program generation Allow to test the generated modules

Page 10: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

10

BUSINESS MODULES ADDED VALUE

At conception time

Conception environment method formalism

Independence vs the physical structure If change in the DB without busines

change modification of the business modules no modification in the programs

If a busines change implies a change in the DB busines modules modifications very often, programs modifications

Automatic generation code documentation Test programs

At maintenance time

Modification of the logical and business models

Automtic (re-) generation Impact analysis

Impacted components list Programs list using the

impacted components

Page 11: 1 ACCESS ARCHITECTURE the general method data models access / business modules definitions models construction the access modules, the test programs, the

11

A large part of the constraints are not managed by the DBMS 50% of the implicit constraints

The implicit constraints have to be managed by the programs Error risks :

Duplicated code The programmer doens’t know all

the constraints to verify

Maintenance problems If DBMS change If DB structure change

Program n…

Program 3Program 2

Program 1

EMPRUNTEUR0-1

REPONDANT0-N

REPONDANT

REFERENCE0-N

ORIGINE0-N

REF_BIBLIOGRAPH

0-N

0-N

0-N

EMP_CLOTUREDATE_DEBUTDATE_FINid: EXEMPLAIRE

DATE_DEBUT

0-N

0-N

0-1

EMPRUNT

DATE_EMPRUNT

0-N

1-N

ECRIT

1-1

0-N

DE

PROJETCODENOMid: CODEid': NOM

OUVRAGE

NUMEROTITREEDITEURDATE_PREM_PARUTIONNOTE_PRESENTATION[0-1]MOT_CLE[0-10]id: NUMERO

EXEMPLAIRE

NUMERO_D_ORDREDATE_D_ACQUISITIONLOCALITE

ETAGETRAVEERAYON

NOMBRE_DE_LIVRESETAT_LIVRECOMMENTAIRE_ETAT[0-1]id: DE.OUVRAGE

NUMERO_D_ORDRE

EMPRUNTEUR

MATRICULENOMPRENOMADRESSE

SOCIETEVOIECODE_POSTALVILLE

TELEPHONE[0-5]id: MATRICULE

AUTEUR

NOMPRENOM[0-1]DATE_NAISSANCE[0-1]ORIGINE[0-1]

BIBLIOTHEQUE/1

Program n…

Program 3Program 2

Program 1

EMPRUNTEUR0-1

REPONDANT0-N

REPONDANT

REFERENCE0-N

ORIGINE0-N

REF_BIBLIOGRAPH

0-N

0-N

0-N

EMP_CLOTUREDATE_DEBUTDATE_FINid: EXEMPLAIRE

DATE_DEBUT

0-N

0-N

0-1

EMPRUNTDATE_EMPRUNT

0-N

1-N

ECRIT

1-1

0-N

DE

PROJETCODENOMid: CODEid': NOM

OUVRAGENUMEROTITREEDITEURDATE_PREM_PARUTIONNOTE_PRESENTATION[0-1]MOT_CLE[0-10]id: NUMERO

EXEMPLAIRENUMERO_D_ORDREDATE_D_ACQUISITIONLOCALITE

ETAGETRAVEERAYON

NOMBRE_DE_LIVRESETAT_LIVRECOMMENTAIRE_ETAT[0-1]id: DE.OUVRAGE

NUMERO_D_ORDRE

EMPRUNTEURMATRICULENOMPRENOMADRESSE

SOCIETEVOIECODE_POSTALVILLE

TELEPHONE[0-5]id: MATRICULE

AUTEURNOMPRENOM[0-1]DATE_NAISSANCE[0-1]ORIGINE[0-1]

BIBLIOTHEQUE/1

modules

WITHOUT THE MODULES WITH THE MODULES

Procesing and data dissociation

Programs simplification Less duplicated code The programmer doesn’t have to

know the constraints Drastic reduction of the errors

risks ( less code and code written by specialists)

Constraints are better coded ( more readable, more efficient..;)

Easier maintenance

BUSINESS MODULES ADDED VALUE