Basi di dati e World Wide Web - Roma Tre Universityatzeni/didattica/BD/materiale/BD14-2003.pdf · 1...

27
Basi di dati e World Wide Web Paolo Atzeni 30/05/2003 30/05/2003 Basi di dati e World Wide Web 20 Problems with many Web-sites design information is often poorly organized and difficult to access it is not even clear which pieces of information are available the access structure is casual and many dangling references occur the style of presentation is heterogeneous maintenance difficulties in updating the content (type and values) difficulties in changing the initially defined structure difficulties in changing the presentation details

Transcript of Basi di dati e World Wide Web - Roma Tre Universityatzeni/didattica/BD/materiale/BD14-2003.pdf · 1...

1

Basi di dati e World Wide Web

Paolo Atzeni

30/05/2003

30/05/2003 Basi di dati e World Wide Web 20

Problems with many Web-sites

• design– information is often poorly organized and difficult to access– it is not even clear which pieces of information are available– the access structure is casual and many dangling references

occur– the style of presentation is heterogeneous

• maintenance– difficulties in updating the content (type and values)– difficulties in changing the initially defined structure– difficulties in changing the presentation details

2

30/05/2003 Basi di dati e World Wide Web 21

Esistono pagine con la stessa struttura

30/05/2003 Basi di dati e World Wide Web 22

Indipendenza dei dati negli ipertesti:stessi dati, diversa struttura ipertestuale

3

30/05/2003 Basi di dati e World Wide Web 23

Indipendenza dei dati negli ipertesti:stessi dati e stessa struttura ipertestuale,

diversa presentazione

30/05/2003 Basi di dati e World Wide Web 24

Hypertext data-independence

• Data “what information is offered through the site and what are the conceptual details and the logical organization”

• Hypertext “how data is arranged in pages and what navigation links correlate them”

• Presentation “the appearance of each piece of information in pages”

4

30/05/2003 Basi di dati e World Wide Web 25

Design Issues

• Datachoosing the content

• Hypertextchoosing page organization and navigation paths

• Presentationdefining layout and graphics

Maintenance Issues

• Datachanging the (type of) content

• Hypertextchanging page organization and navigation paths

• Presentationchanging layout and graphics

30/05/2003 Basi di dati e World Wide Web 26

Components and Models

data ER and Relationalhypertextpresentation HTML

What is missing is a model for hypertexts!

5

30/05/2003 Basi di dati e World Wide Web 27

Models for hypertexts

• in data-intensive Web sites (and often in general) there are (many) pages with a similar (or even the same) structure

• thirty or forty years ago people realized that in an application it is often the case that there are records with the same structure; files with a rather fixed structure were invented with this purpose

• the notion of scheme of the database was later introduced as an overall description of the content of a database

30/05/2003 Basi di dati e World Wide Web 28

Pagine con la stessa struttura

6

30/05/2003 Basi di dati e World Wide Web 29

Pagine con un'altra struttura

30/05/2003 Basi di dati e World Wide Web 30

A Web page

7

30/05/2003 Basi di dati e World Wide Web 31

A page-scheme: ProfessorPage

ProfessorPageNamePositionAddressEMail

ResearchListArea

ToResP

30/05/2003 Basi di dati e World Wide Web 32

ADM (Araneus Data Model): a logical model for Web hypertexts

• page-schemes• “unique” pages• simple attributes

– text, images, ...– link (anchor, URL)

• complex attributes: lists (possibly nested)• heterogeneous union• form (as virtual list over form fields and link to the result)

8

30/05/2003 Basi di dati e World Wide Web 33

A Web page (containing a list of links)

30/05/2003 Basi di dati e World Wide Web 34

A “unique” page-scheme: ProfessorListPage

ProfessorListPage

ProfessorListNameToProfP

9

30/05/2003 Basi di dati e World Wide Web 35

An ADM Scheme

ProfessorListPage

ProfessorListNameToProfP

ProfessorPageNamePositionAddressEMail

ResearchListArea

ToResP

30/05/2003 Basi di dati e World Wide Web 36

Heterogeneous Union and Forms

10

30/05/2003 Basi di dati e World Wide Web 37

Heterogeneous Union and Forms in ADM

ProfessorListPage

ProfessorListNameToProfP

ProfessorPageNamePositionAddressEMail

ResearchListAreaToResP

Name

Submit

U

SearchProfPage

30/05/2003 Basi di dati e World Wide Web 38

11

30/05/2003 Basi di dati e World Wide Web 39

Data Models

ER

ADM

Database ConceptualScheme

(entities - relationships)

Hypertext LogicalScheme

(page-schemes, links)

There is a lot of ‘distance’ between the two!

30/05/2003 Basi di dati e World Wide Web 40

12

30/05/2003 Basi di dati e World Wide Web 41

30/05/2003 Basi di dati e World Wide Web 42

A simple ER scheme

13

30/05/2003 Basi di dati e World Wide Web 43

An ADM scheme

30/05/2003 Basi di dati e World Wide Web 44

Data Models

ER

ADM

Database ConceptualScheme

(entities - relationships)

Hypertext LogicalScheme

(page-schemes, links)

There is a lot of ‘distance’ between the two!

14

30/05/2003 Basi di dati e World Wide Web 45

Data Models

ER

ADM

Database ConceptualScheme

(entities - relationships)

Hypertext LogicalScheme

(page-schemes, links)

There is a lot of ‘distance’ between the two!

NCMHypertext Conceptual

Scheme(macroentities,

directed relationships,aggregations)

30/05/2003 Basi di dati e World Wide Web 46

Data Models

Hypertext LogicalScheme

(page-schemes, links)

ER

NCM Hypertext ConceptualScheme

(macroentities,directed relationships,

aggregations)ADM

NCM fills the gap between the two

Database ConceptualScheme

(entities - relationships)

15

30/05/2003 Basi di dati e World Wide Web 47

Navigation Conceptual Model (NCM)

Hypertext Conceptual Features

• Which concepts should be the hypertext nodes

• Which should be the navigation paths between nodes

• How nodes should be aggregated to build the hierarchical access structure

NCM Constructs

• Macroentity

• Directed Relationship

• Aggregation

30/05/2003 Basi di dati e World Wide Web 48

NCM: Macroentities and directed relationships

Professor

Course

Student

Teacher

Tutorship

Name

Room

Email

Name

Description

Day

Room

HourLessonN

1:1

1:N

1:1Name

...

16

30/05/2003 Basi di dati e World Wide Web 49

NCM: aggregation nodes

Professor CourseStudent

TeacherTutorship1:11:N1:1

Seminar

People

Department

Activities

30/05/2003 Basi di dati e World Wide Web 50

An NCM scheme

17

30/05/2003 Basi di dati e World Wide Web 51

30/05/2003 Basi di dati e World Wide Web 52

18

30/05/2003 Basi di dati e World Wide Web 53

The Araneus Methodology

Database conceptual design

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

30/05/2003 Basi di dati e World Wide Web 54

design from scratch

Database conceptual design

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

19

30/05/2003 Basi di dati e World Wide Web 55

design from an existing database(with an ER scheme)

Database conceptual design

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

30/05/2003 Basi di dati e World Wide Web 56

design from an existing database(without an ER scheme)

Database conceptual design(reverse engineering)

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

20

30/05/2003 Basi di dati e World Wide Web 57

Hypertext conceptual design:from ER to NCM

Database conceptual design

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

30/05/2003 Basi di dati e World Wide Web 58

Hypertext Conceptual DesignER scheme NCM Scheme

• step 1 choose and describe macroentities: design “views” over the input ER scheme

• step 2choose navigation paths

• step 3shape the hypertext access structure on the basis of (“bottom-up”) conceptual aggregation

21

30/05/2003 Basi di dati e World Wide Web 59

Hypertext Conceptual DesignER scheme NCM Scheme

step 1 choose and describe macroentities: design “views” over the input ER schemeusually it corresponds to “de-normalize” the input ER scheme

Course

Lesson

Course

Name

DescriptionName

DescriptionDay

HourLesson

Day

Hour

1:1

1:N

1:N

ER NCM

30/05/2003 Basi di dati e World Wide Web 60

Hypertext Conceptual DesignER scheme NCM Scheme

step 2 choose navigation pathsit may introduce redundancies

Professor

Research-Group

1:1

1:N

ER NCM

Paper

Professor

Research-Group

1:1

1:NPaper

1:N

1:N

1:N

1:N

1:N

1:N

22

30/05/2003 Basi di dati e World Wide Web 61

Hypertext Conceptual DesignER scheme NCM Scheme

step 3 shape the hypertext access structure it is based on “bottom-up” conceptual aggregations

Professor

Research-Group

1:1

1:N

NCM NCM

Seminar

Professor

Research-Group

1:1

1:N

Seminar

...

...

ResearchActivities

30/05/2003 Basi di dati e World Wide Web 62

The Input ER scheme

23

30/05/2003 Basi di dati e World Wide Web 63

The resulting NCM scheme

30/05/2003 Basi di dati e World Wide Web 64

Hypertext logical design:from NCM to ADM

Database conceptual design

Hypertext logical design

Presentation design

Page GenerationSite generation

Presentation design

Requirements analysis

Database logical designHypertext logical design

Hypertext conceptual design

24

30/05/2003 Basi di dati e World Wide Web 65

Hypertext Logical DesignNCM scheme ADM Scheme

step 1 map each macroentity into either

a page-scheme ora list inside a page-scheme

step 2map each directed relationship into a (list of) link attribute(s)

step 3map each aggregation into a unique page-scheme with link attributes to the target page-schemes

30/05/2003 Basi di dati e World Wide Web 66

Hypertext Logical DesignStep 1 (example)

25

30/05/2003 Basi di dati e World Wide Web 67

Hypertext Logical DesignStep 1 (example)

30/05/2003 Basi di dati e World Wide Web 68

Hypertext Logical DesignStep 2 (example)

26

30/05/2003 Basi di dati e World Wide Web 69

Hypertext Logical DesignStep 3 (example)

30/05/2003 Basi di dati e World Wide Web 70

R e s u l t i n g A D M S c h e m e

27

30/05/2003 Basi di dati e World Wide Web 71

Maintenance

• The Schemes help designers to maintain the hypertext structure• Maintenance activities correspond to apply scheme

transformations:– introduce multilevel lists– introduce forms– split pages– ...

30/05/2003 Basi di dati e World Wide Web 72

Maintenance: example