DATA MODELS.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Database Architectures and the Web
Objectives In this session, you will learn to:
Data - Information - Knowledge
Technical Architectures
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
Databases Chapter Distinguish between the physical and logical view of data Describe how data is organized: characters, fields, records, tables,
Ch1: File Systems and Databases Hachim Haddouti
Introduction to Databases Transparencies
Chapter 2 Database Environment Pearson Education © 2014.
Academic Year 2014 Spring.
Academic Year 2014 Spring.
Chapter 4 Database Management Systems. Chapter 4Slide 2 What is a Database Management System (DBMS)?  Database An organized collection of related data.
Mrs. Maninder Kaur 1Maninder Kaur
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Database Design and Introduction to SQL
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
12 1 Chapter 12 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
CSC271 Database Systems Lecture # 4.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
Database Design - Lecture 2
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
CS 474 Database Design and Application Terminology Jan 11, 2000.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Announcements. Data Management Chapter 12 Traditional File Approach  Structure Field  Record  File  Fixed All records have common fields, and a field.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Database Architectures Database System Architectures Considerations – Data storage: Where do the data and DBMS reside? – Processing: Where.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
1 Chapter 1 Introduction to Databases Transparencies.
Chapter 2 Database Environment.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
Databases and DBMSs Todd S. Bacastow January
- The most common types of data models.
Databases and DBMSs Todd S. Bacastow January 2005.
Database Systems: Design, Implementation, and Management Tenth Edition
Business System Development
N-Tier Architecture.
An Introduction to database system
Chapter 2 Database System Concepts and Architecture
COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI
Database Management System
DATA MODELS.
The Client/Server Database Environment
ICT Database Lesson 1 What is a Database?.
Enterprise Application Architecture
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 2 Database Environment Pearson Education © 2009.
Introduction to Database Management System
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data, Databases, and DBMSs
MANAGING DATA RESOURCES
An Introduction to Computer Networking
Database.
File Systems and Databases
Introduction to Databases Transparencies
Databases and Structured Files: What is a database?
Database Environment Transparencies
DATA MODELS.
MANAGING DATA RESOURCES
Databases.
Database Systems Instructor Name: Lecture-3.
UNIT-I Introduction to Database Management Systems
Data Models in DBMS A model is a representation of reality, 'real world' objects and events, associations. Data Model can be defined as an integrated collection.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

DATA MODELS

Database Models A data model is a formal expression of data, data relationships, and constraints on the data. A complete data model should contain the following three distinct components: Structural information detailing a particular set of rules by which a database can be built. Manipulative information detailing the kinds of operations that are permitted on the data. Integrity information that provides details about how the data will be kept accurate.

Types of Database Models Different types of data models include : Object-Based Data Models Record-Based Data Models Physical Models

Object-Based Model Data is looked in an object- oriented fashion, object within a database have attributes and behaviors that define what the object are and what the object can do. Variable-length records Characterized by the fact that they provide fairly flexible structuring capabilities and allow data constraints to be specified explicitly. More widely known ones are: Entity-relationship model Object-oriented model Semantic data model Functional data model

Entity -Relationship Model Based on a perception of a real world consisting of: a collection of basic objects called entities and relationships among these objects constraints to which contents of DB must conform Entity – a “thing” or “object” distinguishable from other objects by a specific set of attributes Relationship – an association among several entities Entity Set – set of all entities of same type Relationship Set – set of all relationships of same type

Record-Based Model Used in describing data at logical and view levels. Contrast to Object-Based Model, used to: Specify overall logical structure of the DB Provide higher-level description of the implementation The database is structured in fixed-format records of several types Fixed no. fields Each field of fixed length Each fields data type defined

Categories of Record-Based Model Database Systems can be categorized according to the data structures and operators they present to the user. Record-based data models fall into three categories: Relational Model Network Model Hierarchical Model Hierarchical and Network model are the pre-relational models.

Hierarchical Model In the Hierarchical Model, different records are inter-related through hierarchical or tree-like structures. A parent record can have several children, but a child can have only one parent. In the figure, there are two hierarchies shown - the first storing the relations between CUSTOMER, ORDERS, CONTACTS and ORDER_PARTS and the second showing the relation between PARTS, ORDER_PARTS and SALES_HISTORY. The many-to-many relationship is implemented through the ORDER_PARTS segment, which occurs in both the hierarchies. In practice, only one tree stores the ORDER_PARTS segment, while the other has a logical pointer to this segment. IMS (Information Management System) of IBM is an example of a Hierarchical DBMS.

Hierarchical Model (Example)

Network Model In the Network Model, a parent can have several children and a child can also have many parent records. Records are physically linked through linked-lists. IDMS from Computer Associates International Inc. is an example of a Network DBMS.

Network Model (Example)

Relational Model In the Relational Model, unlike the Hierarchical and Network models, there are no physical links. All data is maintained in the form of tables consisting of rows and columns. Data in two tables is related through common columns and not physical links or pointers. Operators are provided for operating on rows in tables. Unlike the other two type of DBMS, there is no need to traverse pointers in the Relational DBMS. This makes querying much more easier in a Relational DBMS than in the the Hierarchical or Network DBMS. This, in fact, is a major reason for the relational model to become more programmer friendly and much more dominant and popular in both industrial and academic scenarios. Oracle, Sybase, DB2, Ingres, Informix, MS-SQL Server are few of the popular Relational DBMSs.

Relational Model (Example) Customer

Relational Model Represents data and relationships among data by a collection of tables Each table corresponds to an entity Table – collection of columns with unique names Relationships links rows from two tables by embedding keys from one table to another Most DBMSs today are based on Relational Data Model.

Physical Model Used to describe data at the lowest level Contrast logical data models, there are few PDMs in use Two widely used ones are: Unifying Model Frame-Memory Model

System Architecture

Building Database Connected System Important to select the right architecture for the Appl. The perfect architecture to use is the one that is right for the particular solution you are working towards. Basically the classification of architecture is based in 3 groups of services. User Services Business Services Data Services

User Services User interface layer Present data and ensures each field has at least the type of data its supposed to have in it. Pre-Validation and formatting of Data Fields. e.g: Date Field

Business Services Handles the business processing rules based on business rules given by the client E.g. business service that connects with your credit card company to validate a customer’s credit card purchase.

Data Services This is all about storage and retrieval of data.The actual place where data resides. Data services know about data integrity rules(say , that an inventory value can’t go below zero) , but don’t care where the credit card approval came from. User Services Business Services Data Services

Single Tier (Host) System Called as Host System because server and client in one single system All the logic involved in the database is on the one single host machine to which all the desktops are connected as dumb terminals. Advantages Disadvantages Requires less bandwidth and is best suited for WAN network Expensive Hardware and difficult to maintain (Mainframes). More reliable and dependable as it hardly down. Inflexible to share information with other systems Easy to install,since done only on host system Limited and expensive software packages

Two Tier Architecture(Client/Server) In a two-tier architecture, the client processes the application logic and presentation of the user interface. The data can come from any number of devices, including a relational DBMS, typically over a network. This architecture is classified into 2 sub types 1. Client Centric 2. Server Centric.

Client Centric: (Thick Client) User and Business Service Data Service Client Server Used on some simple PC’s Data Service on Server The business and U/I services are preformed on the client machine to ensure that no one system is overloaded with work.

Client Centric: (Thick Client) Advantages Disadvantages Distributes the workload on large no of relatively cheap clients. Needs a good network bandwidth otherwise damages the network quickly. Hardware up gradation which means that it allows to upgrade only the necessary client machines Installation are time consuming as it has to be done in every client machine so as to co-ordinate with server components The cost of packages and software components to be installed on client machine is relatively cheap

Server Centric (Thin Client) User Service Business & Data Service Client Server User services reside on client system and other two services remain at the server It tries to gain some features of centralized systems.

Server Centric (Thin Client) Advantages Disadvantages Some upgrades can be done entirely at server level Other upgrades still require a “touch” on every client computer – upgrade and new installation are both very tedious and difficult logistically. Software are comparatively cheap Long – running and heavy loaded jobs done by one user effects all the users It requires Less bandwidth as information send on the network is less Large servers grow exponentially in price.

Three Tier Architecture(Client/Server) Data Service User Service Business Service Client Server(s) Each service on separate logical models Since the workload of the server (business,data services is divided into 2 or more servers it adds a significant level of stability and scalability.

Three Tier Architecture(Client/Server) Advantages Disadvantages Some upgrades can be done entirely at server level Other upgrades still require a “touch” on every client computer – upgrade and new installation are both very tedious and difficult logistically. Bandwidth can be less compared to other models. But the load on Network between Data Services and business services can be high Allows component based development which can increase reusability Two medium Servers are cheaper than one large System

N-Tier Architecture(Client/Server) Extension of 3 Tier wherein either the user service or the business service are spread over two or more servers. User Services Business Service Client Server(s) Data Service (Typically Web Server)

N-Tier Architecture(Client/Server) Advantages Disadvantages Even more upgrades can be done entirely at the server level Often increases the number of connections on the network which may slow down the system Bandwidth can be less since the amount of data to be transferred over the network is limited Allows component based development which can increase reusability

END