You are on page 1of 30

Fundamentals of Database

Omkar Basnet
CDCSIT, Kirtipur , KTM.
Objectives of today’s lecture

• Know common database terminology


• Understand requirements and uses of data
• Know the differences between databases and
flat files
• Realize the importance and need for
databases in problem-solving
• Understand the different types of databases
and their differences
Data: A Resource

• The Success of an organization depends


on efficient use of its resources:
• Buildings, factories, equipment
• Technical knowledge
• Human resources
• Data
• Data: An important organizational
resource
Data
The Organizational Data Cycle

User Decisions

Knowledge Actions

Data Information
Electronic Data

•Why?
• Large volume in a small space
• Ease of sharing
• Ease of use
• Data analysis
•How?
• File-based system versus databases
Legacy (File-based) Systems

• Uncontrolled data redundancy,


• Data inconsistency(same files are kept in
different formats)
• Poor data sharing
• Difficult to keep up with changes
• Record format Vs. user requirements
• Programs Vs. record format
• Low productivity
• High maintenance cost
So what is a database?

• According to Oxford English Dictionary:


“A structured collection of data held in
computer storage; esp. one that
incorporates software to make it accessible
in a variety of ways”
•So does it make pretty much every
collection of data a “database”?
The Database

• The data itself PLUS The data definitions (metadata),


applications, queries and visualizations
Database Approach

• Non-redundant collection of logically related facts


• representing some aspect of the real world
• the data itself plus the data definitions
• Permits sharing
• Consistent representation for each piece of data
• Avoids (minimizes) redundancy
• Allows different user views
• Users are isolated from most changes
Why Databases?

• Independence from representation


formats
• Control redundancy and consistency
• Ensure integrity/security
• Better scalability
• Allow ad hoc access
• Better maintenance
• Better concurrency
Data Independence

• Does data have to be part of programs?


• Do we need to change one if the other
changes?
• Three-tier architecture of databases

View What the users see


Conceptual How we model data
Physical How data is stored
Access Flexibility

• Easy to ask ad-hoc(general, not specific ) questions


• No need for separate codes
• User-friendly interface
• Command-based (e.g., SQL)
• Graphical (e.g., QBE(query by example))
Data Integrity

• Ensures that the stored data are consistent and correct


• Easy to define global rules
• customer_age > 21 years
• number_of_credits < 18
• Can allow multiple users to access data without
compromising on data integrity
Data Security

• Access definition
• Global
• Local
• Uniform access authorization
Data Redundancy

• Data need not be replicated


• Less wastage of storage space
• Less data anomaly
• Reduced and controlled redundancy
• Tighter control of replicated data
Standardization

• Everybody talks the same talk.


• Less chance of misunderstanding
• Easier to interpret other’s data
• Easier to merge
• Useful when several organizations combine to form one.
Productivity and Maintenance

• Increase in productivity
• User-friendly interface
• Independence from specific data structure
• Easier maintenance
• Less code to maintain
• The DBMS is the bulk of the code.
• Ad-hoc queries make it possible to make do with
much less code.
• The vendor makes revisions of the DBMS.
• Economy of scale
DBMS Functions and Users

• Four major uses of a DBMS package


• Database Development, Interrogation, Maintenance, and
• Application Development
• Automated tools for design, query, and application
development
• Database users
• Database administrators ( DBAs )
• Database designer
• End Users
Centralized Database Systems

Database
Client/Server Database Systems

Client

Client
Database
Server
Distributed Database Systems

Database
Server

Database Database
Server Server
Summary

• Data is essential for an organization


• A Database is usually the most effective way of storing and
organizing data
• File-based Vs. database systems
• Database system properties
• Types of database systems
Conceptual Design

• Projects without a strong conceptual design are more


likely to fail
• Design is one of the most important aspects of
project and business process quality management
standards:
• ISO 9000
• CMM Capability Maturity Model is a methodology used to
develop and refine an organization's software development
process
• Designs are typically network structured, not flat like
databases
• Literature in Relational Model shows Benefits of
Conceptual Design in user performance
Database Modeling

• Process Models
• Overview of process components
• Inputs and outputs of different processes
• Data sources and destinations
• Mode of data flow between processes
• Data Models
• Model only the data, no process
• Different components of the data
• Relationships between primary data components
why model?
•If you cannot model, you cannot
comprehend(understand), and if
you cannot comprehend, you
cannot control
•Dual goal:
•Analysis and conceptualization
•Presentation
Models and method
•A model
•describes business or organization
•separates operation from technology
•Good modeling requires good
methodologies
•encompass data, process, decisions
•richly expressive and provide for levels of
analysis
•simple representation
Overview of Data Modeling
•Conceptual design: (ER Model is used at
this stage.)
• What are the entities and relationships in the
enterprise?
• What information about these entities and
relationships should we store in the database?
• What are the integrity constraints or business
rules that hold?
• A database `schema’ in the ER Model can be
represented pictorially (ER diagrams).
• Can map an ER diagram into a relational
schema.
ER Model Basics (Contd.)
• Relationship: Association among two or more entities. E.g., Attishoo
works in Pharmacy department.
• Relationship Set: Collection of similar relationships.
• An n-ary relationship set R relates n entity sets E1 ... En; each
relationship in R involves entities e1 E1, ..., en En
• Same entity set could participate in different relationship sets, or in
different “roles” in same set.

since
name dname

ssn lot did budget

Employees Works_In Departments

You might also like