Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA MODELS.

Similar presentations


Presentation on theme: "DATA MODELS."— Presentation transcript:

1 DATA MODELS

2 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.

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

4 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

5 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

6 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

7 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.

8 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.

9 Hierarchical Model (Example)

10 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.

11 Network Model (Example)

12 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.

13 Relational Model (Example)
Customer

14 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.

15 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

16 System Architecture

17 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

18 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

19 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.

20 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

21 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

22 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.

23 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.

24 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

25 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.

26 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.

27 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.

28 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

29 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)

30 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

31 END


Download ppt "DATA MODELS."

Similar presentations


Ads by Google