0% found this document useful (0 votes)
14 views

Unit - 1 Data Models

The document discusses data models, emphasizing their importance in organizing data for various users and facilitating interaction among designers, programmers, and end users. It outlines the basic building blocks of data models, such as entities, attributes, and relationships, and explores the evolution of data implementation models, including hierarchical, network, and relational models. Additionally, it highlights the significance of business rules in standardizing data views and promoting accurate data modeling.

Uploaded by

Punam Sindhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Unit - 1 Data Models

The document discusses data models, emphasizing their importance in organizing data for various users and facilitating interaction among designers, programmers, and end users. It outlines the basic building blocks of data models, such as entities, attributes, and relationships, and explores the evolution of data implementation models, including hierarchical, network, and relational models. Additionally, it highlights the significance of business rules in standardizing data views and promoting accurate data modeling.

Uploaded by

Punam Sindhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Database Management System

Unit -1
Main Topic: Data Models
• The Importance of Data Models.
• Basic building blocks
• Business rules
• The evolution of data models
• Degrees of data abstraction.
Data Models: Introduction
• A collection of tools for describing:
• Data
• Data Relationships
• Data Semantics
• Data consistency constraints
• A data model provides a way to describe the design of a database at the
physical, logical, and view levels.
• Data Model-Relatively simple representations of complex real world data
structures
• Creating a Data model is iterative and progressive
• Designers, programmers, and end users see data in different ways
The Importance of Data Model
• Facilitate interaction among the designer, the applications
programmer, and the end user.
• End users have different views and needs for data- Data model
organizes data for various users.
• Data model is a conceptual model - an abstraction
• It’s a graphical collection of logical constructs representing the data
structure and relationships within the database.
Data Model - Basic Building Blocks
• Entity - anything about which data are to be collected and stored
• Attribute - a characteristic of an entity
• Relationship - describes an association among entities
• One-to-many (1:M) relationship
• Many-to-many (M:N or M:M) relationship
• One-to-one (1:1) relationship
• Constraint - a restriction placed on the data
Business Rules
• Brief, precise, and unambiguous descriptions of a policies,
procedures, or principles within a specific organization.
• Apply to any organization that stores and use data to
generate information.
• Description of operations or procedures, to create/enforce
actions within an organization’s environment
• Must be in writing and kept up to date
• Must be easy to understand and widely disseminated
• Sometimes externally defined, i.e. government regulations.
Discovering Business Rules
• Sources of business rules:
• Company managers
• Policy makers
• Department managers
• Written documentation
• Procedures
• Standards
• Operations manuals
• Direct interviews with end users
Importance of Business Rules
• Standardize company’s view of data
• Useful as a communications tool between users and designers
• Allows the designer to
• understand the nature, role, and scope of data
• understand business processes
• develop appropriate relationship participation rules and constraints
• Promotes the creation of an accurate data model
Translating Business Rules into Data Model
Components
• Generally, nouns translate into entities
• Verbs translate into relationships among entities
• Relationships are bidirectional
• Two questions to identify the relationship type:
• How many instances of B are related to one instance of A?
• How many instances of A are related to one instance of B?
Examples: Business Rules
• Some examples of business rules:

Departments ------offers---------Course

Course----------generates---------Class

Professor ->->->->->teaches->->->->->Class
Evolution of Data Implementation Models
• Hierarchical
• Logically represented by an upside down tree
• Each parent can have many children
• Each child has only one parent
• Network
• Relational
• Object oriented
• Hybrid, XML
Evolution of Data Implementation Models
The Hierarchical Model
• Developed in the 1960s to manage large amounts of data for complex
manufacturing projects
• Basic logical structure is represented by an upside down “tree”
• Hierarchical structure contains levels or segments
• Depicts a set of one-to-many relationships between segments
• Each parent can have many children
• Each child has only one parent
• For eg, most file systems work this way.
• There is usually a root, or top-level, directory that contains various other directories and
files. Each file or directory can only exist in one directory itself
Example: The Hierarchical Model
Disadvantage: The Hierarchical Model
• It represents one-to-many relationships well i.e one parent has many
children;
• for example, one company branch has many employees
• It has problems with many-to-many relationships.
• Relationships such as that between a product file and an orders file are
difficult to implement in a hierarchical model. Specifically, an order can
contain many products, and a product can appear in many orders.
• Hierarchal model is not flexible because adding new relationships can
result in wholesale changes to the existing structure, which in turn
means all existing applications need to change as well. M
The Network Model
• The network model was created to represent complex data
relationships more effectively than the hierarchical model.
• Improves database performance
• Imposes a database standard
• Represent complex data relationships more effectively -such as child with
multiple parents
• Relationship in the network database model is defined as many-to-
many relationship because one owner file can be linked to many
member files and vice versa.
The Network Model
Network Database vs. Hierarchical Database Model

Network Database Model Hierarchical Database Model

Many-to-many relationship One-to-many relationship

Easily accessed because of the linkage Difficult to navigate because of its strict owner
between the information to member connection

Great flexibility among the information files Less flexibility with the collection of
because the multiple relationships among the information because of the hierarchical
files position of the files
Network Database Model

• Advantages of a Network Database Model


• Because it has the many-many relationship, network database model can
easily be accessed in any table record in the database
• For more complex data, it is easier to use because of the multiple relationship
founded among its data
• Easier to navigate and search for information because of its flexibility
• Disadvantage of a Network Database Model
• Difficult for first time users
• Difficulties with alterations of the database because when information
entered can alter the entire database
The Relational Model
• Developed by E.F. Codd (IBM) in 1970
• Most important advantage of the RDBMS is its ability to hide the
complexities of the relational model from the user
• A Relational table is a purely logical structure – How data are
physically stored in the database is of no concern to the user or the
designer.
• Stores a collection of related entities.
Relational Model Concepts

• Attribute: Each column in a Table. Attributes are the properties which


define a relation. e.g., Student_Rollno, NAME,etc.
• Tables – In the Relational model the, relations are saved in the table
format. It is stored along with its entities. A table has two properties rows
and columns. Rows represent records and columns represent attributes.
• Tables are also known as relations.
• Tuple – It is nothing but a single row of a table, which contains a single
record.
• Attribute domain – Every attribute has some pre-defined value and scope
which is known as attribute domain
The Relational Model
Advantages of using Relational model
• Simplicity: A relational data model is simpler than the hierarchical and
network model.
• Structural Independence: The relational database is only concerned with
data and not with a structure. This can improve the performance of the
model.
• Easy to use: The relational model is easy as tables consisting of rows and
columns is quite natural and simple to understand
• Query capability: It makes possible for a high-level query language like SQL
to avoid complex database navigation.
• Data independence: The structure of a database can be changed without
having to change any application.
• Scalable: Regarding a number of records, or rows, and the number of fields,
a database should be enlarged to enhance its usability.
Relational Integrity constraints

• Domain constraints:
• Domain constraints can be violated if an attribute value is not appearing in
the corresponding domain or it is not of the appropriate data type.
• This is specified as data types which include standard data types integers, real
numbers, characters, Booleans, variable length strings, etc.
• Key constraints:
• An attribute that can uniquely identify a tuple in a relation is called the key of
the table. The value of the attribute for different tuples in the relation has to
be unique.
• Referential integrity constraints
Object-Based Data Model
• Object-oriented programming (especially in Java,C++, or C#) has
become the dominant software-development methodology.
• This led to the development of an object-oriented data model that
stores data in the form of objects and classes.
• An object is an real world entity
• A class is a collection of objects
• Can be seen as extending the E-R model with notions of
encapsulation, methods (functions), and object identity.
• Object Oriented Programming + Relational Database Features
= Object Oriented Database Model

You might also like