Sie sind auf Seite 1von 64

February 18, 2019 Lecture

Data vs. Information


 Data:
 Raw facts; building blocks of information
 Unprocessed information
 Information:
 Data processed to reveal meaning
 Accurate, relevant, and timely information is key to
good decision making
 Good decision making is the key to survival in a global
environment
Database
 Database is collection of related data and its
metadata organized in a structured format
for optimized information management
 Database—shared, integrated computer
structure that stores:
 End user data (raw facts)
 Metadata (data about data)
Database Management System
 Database Management System (DBMS) is a software
that enables easy creation, access, and modification of
databases for efficient and effective database
management
 DBMS (database management system):
 Collection of programs that manages database structure
and controls access to data
 Possible to share data among multiple applications or
users
 Makes data management more efficient and effective
DBMS (continued)
 End users have better access to more and better-
managed data
 Promotes integrated view of organization’s operations
 Probability of data inconsistency is greatly reduced
 Possible to produce quick answers to ad hoc queries
Database Management System
 manages interaction between end users and database
Types of Databases (1)
 Single-user:
 Supports only one user at a time
 Desktop:
 Single-user database running on a personal computer
 Multi-user:
 Supports multiple users at the same time
Types of Databases (2)
 Workgroup:
 Multi-user database that supports a small group of users
or a single department
 Enterprise:
 Multi-user database that supports a large group of users
or an entire organization
Types of Databases (3)
Can be classified by location:
 Centralized:
 Supports data located at a single site
 Distributed:
 Supports data distributed across several sites
Types of Databases (4)
Can be classified by use:
 Transactional (or production):
 Supports a company’s day-to-day operations
 Data warehouse:
 Stores data used to generate information required to
make tactical or strategic decisions
 Often used to store historical data
 Structure is quite different
Why Database Design is
Important
 Defines the database’s expected use
 Different approach needed for different types of
databases
 Avoid redundant data
 Poorly designed database generates errors  leads to
bad decisions  can lead to failure of organization
Structural and Data
Dependence
 Structural dependence
 Access to a file depends on its structure
 Data dependence
 Changes in the data storage characteristics without
affecting the application program’s ability to access the
data
 Logical data format
 How the human being views the data
 Physical data format
 How the computer “sees” the data
Data Redundancy (1)
 Data redundancy results in data inconsistency
 Different and conflicting versions of the same
data appear in different places
 Errors more likely to occur when complex entries
are made in several different files and/or recur
frequently in one or more files
 Data anomalies develop when required changes in
redundant data are not made successfully
Data Redundancy (2)
Types of data anomalies:
 Update anomalies
 Occur when changes must be made to existing
records
 Insertion anomalies
 Occur when entering new records
 Deletion anomalies
 Occur when deleting records
Database Systems
 Problems inherent in file systems make using a
database system desirable
 File system
 Many separate and unrelated files
 Database
 Logically related data stored in a single logical data
repository
Database Systems
Database systems
 Database System is an integrated system of:
 Hardware
 Software
 People
 Procedures and
 Data
 That define and regulate the collection, storage,
management, and use of data within a database
environment
Database System Environment

 Hardware
 Software
- OS
- DBMS
- Applications
 People
 Procedures
 Data
Purpose of Database
Optimizes data management
Transforms data into information
Importance of Database Design
 Defines the database’s expected use
 different approach needed for different types of
databases
 Avoid data redundancy & ensure data integrity
 Data is accurate and verifiable
 Poorly designed database generates errors
 Leads to bad decisions
 Can lead to failure of organization
Functions of Database System
 Stores data and related data entry forms, report
definitions, etc.
 Hides the complexities of relational database model
from the user
 Facilitates the construction/definition of data elements
and their relationships
 Enables data transformation and presentation
 Enforces data integrity
 Implements data security management
 Access, privacy, backup & restoration
Process of creating database cr
 Planning analysis
 Design
 Implementation
 Maintenance
Planning Analysis
 Assess
 Goal of the organization
 Database environment
 existing hardware, software, raw data, data processing
procedures
 Identify
 Database needs
what database can do to further the goal of the organization
 User needs and characteristics
 who the users are, what they want to do, how they envision doing it

 Database system requirements


 what the database system should do to satisfy the database and user
needs
Design, Implementation &
Maintenance
 Design
 From conceptual design to a detailed system
specification

 Implementation
 Create the database

 Maintenance
 Troubleshoot, update, streamline the database
Data Models
 Importance
 Abstraction of complex real-word data structures in relative simple
(graphical) representations
 Facilitate interaction among the designer, the applications programmer,
and the end user
 Basic Building Blocks
 Entity
 Thing about which data are to be collected and stored
 Attribute
 A characteristic of an entity
 Relationship
 Describes an association among entities
 Constraint
 Restriction placed on the data
Evolution of Data Models
Historical Roots
 Manual File System
 To keep track of data
 Used tagged file folders in a filing cabinet
 Organized according to expected use
 e.g. file per customer
 Easy to create, but hard to
 Locate data
 Aggregate/summarize data
 Computerized File System
 To accommodate the data growth and information need
 Manual file system structures were duplicated in the computer
 Data Processing (DP) specialists wrote customized programs to
 Write, delete, update data (i.e. management)
 Extract and present data in various formats (i.e. report)
File System
 Weakness
 “Islands of data” in scattered file systems.
 Problems
 Duplication
 same data may be stored in multiple files
 Inconsistency
 same data may be stored by different names in different format
 Rigidity
 requires customized programming to implement any changes
 cannot do ad-hoc queries
 Implications
 Waste of space
 Data inaccuracies
 High overhead of data manipulation and maintenance
Example of a File System
Problem of File System
Database Vs File System
Hierarchical Database
 Background
 Developed to manage large amount of data for complex manufacturing
projects
 e.g., Information Management System (IMS)
 IBM-Rockwell joint venture

 Clustered related data together

 Hierarchically associated data clusters using pointers

 Hierarchical Database Model


 Assumes data relationships are hierarchical
 One-to-Many (1:M) relationships

 Each parent can have many children

 Each child has only one parent

 Logically represented by an upside down tree


Example of Hierarchical
Database
Advantages of Hierarchical
Database
 Conceptual simplicity
 Groups of data could be related to each
other
 Related data could be viewed together
 Centralization of data
 Reduced redundancy and promoted
consistency
Disadvantages of Hierarchical
Database
 Limited representation of data relationships
 Did not allow Many-to-Many (M:N) relations
 Complex implementation
 Required in-depth knowledge of physical data
storage
 Structural Dependence
 Data access requires physical storage path
 Lack of Standards
 Limited portability
Network Database
 Objectives
 Represent more complex data relationships
 Improve database performance
 Impose a database standard
 Network Database Model
 Similar to Hierarchical Model
 Records linked by pointers
 Composed of sets
 Each set consists of owner (parent) and member (child)

 Many-to-Many (M:N) relationships representation


 Each owner can have multiple members (1:M)

 A member may have several owners


Example of Network Database
Advantages & Disadvantages of
Network Database
 Advantages
 More data relationship types
 More efficient and flexible data access
 “network” vs. “tree” path traversal
 Conformance to standards
 enhanced database administration and portability

 Disadvantages
 System complexity
 require familiarity with the internal structure for data access
 Lack of structural independence
 small structural changes require significant program changes
Problems with legacy database
systems
 Required excessive effort to maintain
 Data manipulation (programs) too dependent on
physical file structure
 Hard to manipulate by end-users
 No capacity for ad-hoc query (must rely on DB
programmers).
Evolution of Data Organization
 E. F. Codd’s Relational Model proposal
 Separated the notion of physical representation (machine-view)
from logical representation (human-view)
 Considered ingenious but computationally impractical in 1970
 Relational Database Model
 Dominant database model of today
 Eliminated pointers and used tables to represent data
 Tables
 flexible logical structure for data representation

 a series of row/column intersections

 related by sharing common entity characteristic(s)


Example of Relational Database
Advantages and Disadvantages
of Relational
 Advantages
 Structural independence
 Separation of database design and physical data storage/access

 Easier database design, implementation, management, and use

 Ad hoc query capability with Structured Query Language (SQL)


 SQL translates user queries to codes

 Disadvantages
 Substantial hardware and system software overhead
 more complex system

 Poor design and implementation is made easy


 ease-of-use allows careless use of RDBMS
Entity Relationship Model
History
 Peter Chen’s Landmark Paper in 1976
 Entity “The Relationship Model: Toward a Unified View of Data”
 Graphical representation of entities and their relationships
Entity Relation (ER) Model
 Based on Entity, Attributes & Relationships
 Entity is a thing about which data are to be collected and stored
 e.g. EMPLOYEE
 Attributes are characteristics of the entity
 e.g. SSN, last name, first name
 Relationships describe an associations between entities
 i.e. 1:M, M:N, 1:1
 Complements the relational data model concepts
 Helps to visualize structure and content of data groups
 entity is mapped to a relational table
 Tool for conceptual data modeling (higher level representation)
 Represented in an Entity Relationship Diagram (ERD)
 Formalizes a way to describe relationships between groups of data
E-R Diagram – Chen Model
E-R Diagram: Crow’s Foot
Model
Advantages and disadvantages
of E-R Model
 Advantages
 Exceptional conceptual simplicity
 easily viewed and understood representation of database
 facilitates database design and management
 Integration with the relational database model
 enables better database design via conceptual modeling
 Disadvantages
 Incomplete model on its own
Limited representational power
 cannot model data constraints not tied to entity relationships, e.g. attribute
constraints
 cannot represent relationships between attributes within entities

 No data manipulation language (e.g. SQL)

 Loss of information content


 Hard to include attributes in ERD
Object-Oriented Database:
History
 Semantic Data Model (SDM)
 Modeled both data and their relationships in a single
structure (object)
 Developed by Hammer & McLeod in 1981
 Object-oriented concepts became popular in 1990s
 Modularity facilitated program reuse and construction
of complex structures
 Ability to handle complex data types (e.g. multimedia
data)
Object-Oriented Database
Model (OODBM)
 Maintains the advantages of the ER model but adds more features
 Object = entity + relationships (between & within entity)
 consists of attributes & methods
 attributes describe properties of an object
 methods are all relevant operations that can be performed on an object
 self-contained abstraction of real-world entity

 Class = collection of similar objects with shared attributes and methods


 e.g. EMPLOYEE class = (employ1 object, employ2 object, …)
 organized in a class hierarchy
 e.g. PERSON > EMPLOYEE, CUSTOMER
 Incorporates the notion of inheritance
 attributes and methods of a class are inherited by its descendent classes
OODBM & OO Languages
 Object DBMS's increase the semantics of the C++ and Java.
 It provides full-featured database programming capability, while
containing native language compatibility.
 It adds the database functionality to object programming languages.
 Applications require less code, use more natural data modeling, and
code bases are easier to maintain.
 Object developers can write complete database applications with a
decent amount of additional effort.
 The object-oriented database derivation is the integrity of object-
oriented programming language systems and consistent systems.
 The power of the object-oriented databases comes from the cyclical
treatment of both consistent data, as found in databases, and transient
data, as found in executing programs.
OODBM & OO Languages
OODBMs &OO Languages
 Object-oriented databases use small, recyclable separated of
software called objects.
 The objects themselves are stored in the object-oriented
database.
 Each object contains of two elements:
 Piece of data (e.g., sound, video, text, or graphics).
 Instructions, or software programs called methods, for what to do
with the data.
 Some OODBMs were designed to work with OOP languages such as
Delphi, Ruby, C++, Java, and Python.
 Some popular OODBMs are TORNADO, Gemstone, ObjectStore,
GBase, VBase, InterSystems Cache, Versant Object Database,
ODABA, ZODB, Poet. JADE, and Informix.
Advantages of OODBM
 Semantic representation of data
 Fuller and more meaningful description of data via
object
 Modularity, reusability, inheritance
 Ability to handle
 Complex data
 Sophisticated information requirements
Disadvantages of OODBM
 Lack of standards
 No standard data access method
 Complex navigational data access
 Class hierarchy traversal
 Steep learning curve
 Difficult to design and implement properly
 More system-oriented than user-centered
 High system overhead
 Slow transactions
Graph Database
 A graph database is a database designed to treat the
relationships between data as equally important to the
data itself.
 It is intended to hold data without constricting it to a
pre-defined model.
 Instead, the data is stored showing how each
individual entity connects with or is related to others.
Graph Databases
 Graph Databases are NoSQL databases and use a graph structure for
sematic queries.
 The data is stored in form of nodes, edges, and properties.
 In a graph database, a Node represent an entity or instance such as
customer, person, or a car.
 A node is equivalent to a record in a relational database system.
 An Edge in a graph database represents a relationship that connects nodes.
 Properties are additional information added to the nodes.
 The Neo4j, Azure Cosmos DB, SAP HANA, Sparksee, Oracle Spatial and
Graph, OrientDB, ArrangoDB, and MarkLogic are some of the popular
graph databases.
 Graph database structure is also supported by some RDBMs including
Oracle and SQL Server 2017 and later versions.
Example of a Graph Database
model
Document Database
 Document databases (Document DB) are also NoSQL
database that store data in form of documents.
 Each document represents the data, its relationship
between other data elements, and attributes of data.
 Document database store data in a key value form.
 Document DB has become popular recently due to
their document storage and NoSQL properties.
 NoSQL data storage provide faster mechanism to store
and search documents.
Examples of Document
Databases
 Popular NoSQL databases are:
 Hadoop/Hbase
 Cassandra
 Hypertable
 MapR
 Hortonworks
 Cloudera
 Amazon SimpleDB
 Apache Flink
 IBM Informix
 Elastic
 MongoDB and
 Azure DocumentDB.
Document Relational Database
Document Database
Document and Relational
Database
Web Database
 Internet is emerging as a prime business tool
 Shift away from models (e.g. relational vs. O-O)
 Emphasis on interfacing with the Internet
 Characteristics of “Internet age” databases
 Flexible, efficient, and secure Internet access
 Support for complex data types & relationships
 Seamless interfaces with multiple data sources and structures
 Ease of use for end-user, database architect, and database
administrator
 Simplicity of conceptual database model
 Many database design, implementation, and application development tools
 Powerful DBMS GUI
Web Database

Das könnte Ihnen auch gefallen