• No results found

Data Model

N/A
N/A
Protected

Academic year: 2022

Share "Data Model "

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Slide 1-1

Data Models

Instructor: Faisal Anwer and Mohammad Nadeem

SOURCE:

Fundamentals of Database Systems (6th Edition) by Ramez Elmasi, Shamkant B.

Navathe + Database System Concepts (English) 6th Edition by Abraham

Silberschatz , S. Sudarshan , Henry F. Korth + Freely Accessible Web Resources

(2)

Data Abstraction

Data Abstraction-

▫ refers to the suppression of details of data organization and storage,

▫ highlighting of the essential features for an improved understanding of data.

▫ There are many approaches to achieve this.

▫ They are called data models.

(3)

Data Model

Data Model: A set of concepts to describe the structure of a database, and certain constraints that the database should obey.

• Data Model can be categorized as follow:

Conceptual (High Level) Data Model.

Representational (Implementation) Data Model.

Physical (Low Level) Data Model.

(4)

The three models

Slide 2-4

(5)

The three models

Slide 2-5

(6)

High level Model

This is the highest level in data abstraction.

Provides the concept that are close to the way many user perceive the data.

At this level users see the data in the form of rows and columns.

Slide 2-6

(7)

Low level Model

This is the lowest level in data abstraction

This level describes how the data is actually stored in the physical memory like magnetic tapes, hard disks etc.

In this level the file organization methods like hashing, sequential, B+ tree comes into picture.

This type of concepts are generally meant for computer hardware specialist.

Slide 2-7

(8)

Representational Data Model

• This is the middle level of abstraction.

• describes what data are stored in the database, and what relationships exist among those data.

• Defines the relationships among tables.

• Types of representational model

 Hierarchical model

 Network model

 Relational data model

 Others

Slide 2-8

(9)

Hierarchical Model

• A hierarchical database consists of a collection of records which are connected to one another through links.

• A link is an association between precisely two records.

• The structure of a hierarchical database consists of

boxes, which correspond to record types

lines, which correspond to links

(10)

Hierarchical Model Example

(11)

Evaluation

Advantages-

▫ The model allows easy addition and deletion of new information.

▫ Data at the top of the Hierarchy is very fast to access.

▫ works through a one to many relationship.

Disadvantages-

▫ No m:n relationships

▫ Slow retrieval of data stored at leaf nodes.

▫ Navigational and procedural nature of processing (you cant jump on an information, you have to start from root).

Slide 2-11

(12)

Evaluation

• The content of a particular record may be replicated in several different locations

• For example in banking system an account may belong to different customer, in this case account information would be replicated at different location.

• Record replication has two major issues:

▫ Updating of record may result in Data inconsistency

▫ Waste of space

Slide 2-12

(13)

Network Model

• Hierarchical database model structures data as a tree of records, with each record having one parent record and many children while, the network model allows each record to have multiple parent and child records, forming a generalized graph structure.

• A network database consists of a collection of records connected to one another through links.

• The network model differs from the hierarchical model in that the records are organized as graph rather than a tree.

• The structure of a Network database consists of

▫ boxes, which correspond to record types

▫ lines, which correspond to links

(14)

Network Model Example

Slide 2-14

(15)

Evaluation

Advantages-

▫ Faster access to leaf records.

▫ works through a many to many relationship.

Disadvantages-

▫ Deletion becomes difficult.

▫ Much more complex than the hierarchical model.

▫ Nobody really gave attention to Network models. It did not have many problems. But soon a more flexible and easy to understand structure (relational model).

Slide 2-15

(16)

Relational Data Model

• Relational model was first introduced by Ted Codd of IBM Research in 1970.

• This model uses the concept of a Mathematical relation as its building block.

• It has its theoretical basis primarily in set theory.

• In relational model, database are represented as a collection of relations. Relation resembles as table of values where each row in the table represented as collection of related data values.

• Each row in the table is called tuple and each column is called attribute.

Slide 2-16

(17)

Example

Slide 2-17

(18)

Evaluation

• Advantages:

▫ Most of what we are looking for.

▫ Very efficient in complex query situations.

▫ Very neat foundation mathematics.

▫ Use simple structures such as tables.

• Disadvantages:

▫ Not suitable where relationships are not clearly defined.

▫ Not much flexibility in creating new data types and methods.

▫ Not suitable for complex data and/or complex data relationships.

Slide 2-18

(19)

Object Oriented Data model

• Data models such as relational, network, and hierarchical, have been quite successful in developing the database technologies for many business database applications.

• However, Relational, Network and Hierarchical models have certain shortcomings to design complex database applications such as databases for engineering design and manufacturing (CAD/CAM), scientific experiments, telecommunications, geographic information systems, and multimedia.

• Object oriented databases have been proposed to meet some of the needs of these more complex database applications.

• An object database (also object-oriented database management system) is a database management system in which information is represented in the form of objects as used in object-oriented programming.

Slide 2-19

(20)

Object Oriented Data model(cont..)

• Object databases provide the designer to specify both the structure of complex objects as well as operations that can be applied to these objects.

• Object databases are designed in such a way that they can be directly integrated with software developed using object- oriented programming languages.

• OO database extend the existence of objects so that they are stored permanently in a database, and hence the objects become persistent objects.

Slide 2-20

(21)

Example

Slide 2-21

(22)

Evaluation

• Advantages:

▫ Designer can specify the structure of objects and their behavior (methods).

▫ Better interaction with object-oriented languages such as Java and C++

▫ Definition of complex and user-defined types

▫ Encapsulation of operations and user-defined methods.

• Disadvantages:

▫ Query processing is not effective.

▫ No well-defined underlying mathematics.

▫ No well-accepted standards.

▫ Relatively new.

▫ Uses complex structures.

▫ Only useful when relational model can’t be used.

Slide 2-22

(23)

Object v/s Relational Models

Slide 2-23

(24)

Object-Relational Model

• The relational model with object database enhancements is sometimes referred to as the object-relational model.

• Some object oriented features have been added in SQL-99 such as

▫ Inheritance mechanism have been added

▫ Facility of defining new data types and methods.

Slide 2-24

References

Related documents

(2) The neural network language model was interpolated with the full back-off language model (trained on CTS and BN data) and compared to this full language model. The first

ambulant male, dressed adequately, uncleaned, unkempt, gaze avoidance present, not intrested in interview, Rapport established with difficulty, Psychomotor activity

34 years old unmarried male with multiple somatic complaints, multiple consultations, intake of over the counter drugs, multiple suicidal attempts, not going to work,

44 year old male with complaints of smoking cannabis, reduced sleep, irritability, anger outbursts, abusive and assaultive behaviour, wandering tendency, making tall claims for

The Sacks Sentence Completion Test is a projective test developed by Dr Sacks and Dr Levy.. It consists of 60 partially completed sentence to which respondent

• Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database.. • Support of multiple views of the data: Each

• Hierarchical database model structures data as a tree of records, with each record having one parent record and many children while, the network model allows each record

Anonymization is a technique to solve the problem of data publishing, it while keep the sensitive information of record owner which is to be used for data analysis it hides the