15.060 Data, Models, Decisions 15.060 Data, Models, Decisions
Slide 2 data models
-
Upload
lbsitw-trivandrum -
Category
Engineering
-
view
86 -
download
6
description
Transcript of Slide 2 data models
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
DATA MODELS
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
DATA MODELS
• Abstract form of any system• Conceptual tool for describing data, data relationship, semantics, consistency constraints
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Type of DATA MODELS
1)Hierarchical Model2)Network Model3)Relational Model4)ER Model5)Object Oriented Model6)Object Relational Model7)Deductive / Inference Model
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
1)Hierarchical Model
•Oldest data base model. (1950’s)• Tree structure is most frequently occurring relationship.• organize data elements as tabular rows
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Advantages• Simplicity• Data security• Data Integrity• Efficiency : When contains large no of relations
Disadvantages• Implementation complexity• Database management problem : maintaining difficult• Lack of structural independence • programming complexity• Implementation problems (N:N difficult, only 1:N)
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
2) Network Model
• Graph structure• Allow more connection between nodes• Ex: A employee work for two department is not possible in hierarchical model, but here it is possible
Advantages• Conceptual simplicity• handle more relationships• Ease of data access• Data integrity : does not allow a member to exist without an owner• Data independence : isolate programs from complex physical storage• Database standards : like DDL, DML
Disadvantages• System Complexity : not user friendly, navigation difficult, user must familiar with internal structure • Absence of structural independence :database structure change then modify application program
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
3) Relational Model
•Data in the form of table• each table application entity• each row instances of that entity• SQL serves as a uniform interface for users providing a collection of standard expression for storing and retrieving data • Most popular database model
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Formal Relational terms Informal Equivalence
Relation Table
Tuple Row/record
Cardinality of relation Number of rows
Attribute Columns/field
Degree of relation Number of columns
Primary Key Unique identifier
Domain A pool of values from which the values of specific attributes of specific relations are taken
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Advantages• Structural independence• Conceptual simplicity• Design , implementation , maintenance and usage ease• Adhoc Query capability
• Very powerful• Flexible• Easy to use query capability
>SQL : makes adhoc queries a reality : It is 4GL
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Disadvantages• Hardware Overheads (Today it is not a big deal…)• Ease of design leads to bad design• Information island phenomena
• It will prevent information integrity• cause redundancy• cause inconsistency
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
4) Object oriented model
• Handling complex information• represents entity as a class• Suited for•Multimedia applications• Complex relation relationships• can hold data,text,pictures,voice and
video
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Advantages• Large number of different data types• Its features improve productivity• Inheritance• Polymorphism• Dynamic binding
Disadvantages• Difficult to maintain : schema migration(real world data model is not static)• Not suited for all applications(Performance degradation may happen)
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
5) Object relational model
• Combines the advantages of relational database + Object oriented programming• Database and is manipulated collectively with queries
+ A programming API for storing and retrieving objects
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
6) Deductive model
• It can make deductions (i.e., conclude additional facts) based on rules and facts stored in the (deductive) database
• Datalog : is the language typically used to specify facts, rules and queries in deductive databases
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
7) ER model• Developed by Peter Chen and published in a 1976 paper• Defines the conceptual view of database• It works around real world entity and association among them• At view level, ER model is considered well for designing databases.• Terminologies :• Entity• Attribute
• Simple attribute:• Composite attribute:• Derived attribute:• Single-valued attribute:• Multi-value attribute:
• KEYS : PRIMARY KEY, SUPER KEY, FOREIGN KEY, CANDIDATE KEY• CARDINALITIES
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Prepared by Visakh V, Assistant Professor,Dept. of CSE, LBSITW
Advantages • Easy to understand• Helps in physical database creation
Disadvantages
• May contain some amount of ambiguities or inconsitency.• Sometimes diagrams may leads to misinterpretations.