Docsity

Comparison of Hierarchical, Network, Relational, Entity-Relational, and Semantic Data Mode, Study notes of Database Management Systems (DBMS)

Partial preview of the text

Download Comparison of Hierarchical, Network, Relational, Entity-Relational, and Semantic Data Mode and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

CMSC724: What goes around comes

around

Amol Deshpande

University of Maryland, College Park

February 3, 2009

Data Modeling

A data model theory typically involves

“structural part” – collection of concepts/constructs to

represent data

“integrity part” – constraints to ensure data integrity

“manipulation part” – constructs for manipulating the

data

We would like it to be:

Sufficiently expressive – can capture real-world data well

Easy to use

Lends itself to good performance

Data Models

Network/CODASYL

Constructs: “set” type, network structure

“programmer as a navigator”

Cons:

No physical or logical data independence

Bulk loading

3-way relationships

Very complex programming constructs

Data Models: Network/CODASYL

ndix A Network Model Perryridge Horseneck 1700000 Downtown Brooklyn 9000000 Round Hill Horseneck 8000000 Round Hill Horseneck 8000000 A-102 400 A-101 500 A-201 900 A-305 350 A-305 350 A-402 1000 A-408 1123 Hayes Main Harrison Johnson Alma Palo Alto Turner Putnam Stamford Turner Putnam Stamford customer template account template branch template customer account branch depositor account_branch run unit currency pointers Figure A.20 Program work area. 18 Appendix A Network Model customer.customer city := ”Harrison”; find any customer using customer city ; while DB-status = 0 do begin get customer ; print ( customer.customer name ); find duplicate customer using customer city ; end ; We have enclosed part of the query in a while loop, because we do advance how many such customers exist. We exit from the loop when This action indicates that the most recent find duplicate operation fa that we have exhausted all customers residing in Harrison.

A.4.4 Access of Records within a Set

The previous find commands located any database record of type <re this subsection, we concentrate on find commands that locate records DBTG set. The set in question is the one that is pointed to by the <set-ty pointer. There are three different types of commands. The basic find co find first within <set-type> which locates the first member record of type belong rent occurrence of <set-type>. The various ways in which a set can b discussed in Section A.6.6.

Data Models

Don Chamberlin of IBM was an early CODASYL

advocate (later co-invented SQL)

“He (Codd) gave a seminar and a lot of us went to listen to him. This was as I say a

revelation for me because Codd had a bunch of queries that were fairly complicated

queries and since I’d been studying CODASYL, I could imagine how those queries

would have been represented in CODASYL by programs that were five pages long

that would navigate through this labyrinth of pointers and stuff. Codd would sort of

write them down as one-liners. These would be queries like, "Find the employees

who earn more than their managers." [laughter] He just whacked them out and you

could sort of read them, and they weren’t complicated at all, and I said, "Wow." This

was kind of a conversion experience for me, that I understood what the relational

thing was about after that.”

Data Models

Entity-relational

Constructs: entity, relationship

Limitations: Lack of query language, ease of mapping

into relational

The conceptual model of choice to design the schema

Relational++

Constructs: set-valued attributes, aggregation,

generalization etc

Limitations: Didn’t prove terribly useful either functionally

or performance-wise

Data Models

OR

Constructs: User-defined functions, types, access

methods

Semi-structured

“Schema last”

Constructs: DTD, XMLSchema, union types etc

Issues: Limited applicability ??, doesn’t really solve

semantic heterogeniety

Standard for wire format

Some lessons

Physical/logical data independence desirable

Record-at-a-time, navigational interfaces force manual

query optimization and won’t scale

Technical debates settled by the marketplace in many

cases

KISS

OO: Packages will not sell to users without “major pain”

User-defined functions and access method effective

Schema-last is probably a niche market

Semantic heterogeneity not solved by XML