1.0 Introduction To Databases
1.0 Introduction To Databases
Introduction to Databases
Entity-Relationship Modeling
Relational Modeling
Normalization
SQL
Introduction to
Databases
Raymond Freth A. Lagria
Session Outline
https://byjus.com/biology/difference-between-data-and-information/
Data vs Information
Data Information
Unorganized and Unrefined Processed, organized and presented in
a meaningful context
Individual unit that contains raw Group of data that is considered
materials without meaning collectively to carry a logical meaning
Does not depend on information Depends on data
Raw data alone is insufficient for Sufficient for decision making
decision making
Example: an employee’s age, a client’s Example: daily average sales, month’s
current balance, an athlete’s height average daily balance, highest observed
performance department
Information – A Key Resource
Fuels business
Critical factor in determining the success or failure of a
business
Needs to be managed correctly
Easy to
Accurate Complete Update to Date
Understand
Transformation Processes for Data into
Information
Selecting and Filtering
Organizing
Manipulating
Presenting and Visualizing
Storing
Structured Data vs. Unstructured Data
Structured Data
Data residing in a fixed field within a file or record
Usually stored in relational databases (RDBMS)
Unstructured Data
Data is NOT structured in predefined way
No data model
Stored in its native format
Structured Data vs. Unstructured Data
Examples
Structured Unstructured
Dates Document Files
Phone Numbers Text Files
SSS Number Reports
Employee Number Email Messages
Employee Name Audio Files
Customer Last Name Video Files
Supplier Address Images
Structured Data vs. Unstructured Data
Examples
Session Outline
These same
folder files are
not linked.
Limitations of the File-Based Approach
Other limitations:
Duplication of data
Data anomalies like update, insert and delete actions cannot do
the same on redundant data
There should be a way to control and manipulate data in
isolation of the application program
University’s File-Based System
No relation
Not talking to each other
Sample File-Based System
Session Outline
Four Components
Users
Database Application
DBMS
Database
Database
Other functionalities
Data independence
Maintain segregation between the program and the data
Concurrency control – how current your data is
Recovery services
Security management
Enforces user security and data privacy within a database
Utility services
Perform initialization and maintenance operations on a
database
Database Management Systems
https://analyticsindiamag.com/10-most-used-databases-by-developers-in-2020/
Types of Databases According to Design
Relational Databases
Defines database relationships in the form of tables
Most popular DBMS type
Object-oriented Databases
Supports storage of all data types
Considers all data are in the form of object
Types of Databases According to Design
JSON in MongoDB
Document/JSON Databases
Data is stored as document collections
E.g., XML, JSON, BSON
NoSQL Databases
Stands for “Not Only SQL”
Used for large sets of distributed data
Very efficient in handling large-size unstructured data
Schema-free
Types of Databases According to Design
JSON in MongoDB
Document/JSON Databases
Data is stored as document collections
E.g., XML, JSON, BSON
Data Warehouses
NoSQL Databases
Types of Databases
Single user
Supports only one user at a time
Desktop
Single-user database running on a personal computer
Types of Databases: by User Group
Multi-user
Supports multiple user at the same time
Multi-user database that supports a large group of users
or an entire organization
Workgroup
Multi-user database that supports a small group of
users or a single department
Types of Databases; by Location
Centralized
Supports data at a single site
Distributed
Supports data distributed across several sites
Types of Databases; by Use
Transactional
Supports a company’s day-to-day operations
Data Warehouse
Stores data used to generate information required to make
tactical or strategic decisions
Often use to store historical data
Structure is quite different
Advantages of a Database Approach
Advantages:
Segregation of the application program and the data
Minimal data duplication
Ability to retrieve data easily
Reduced development time and maintenance needs
Disadvantages of a Database Approach
Disadvantages:
Complexity
Size
Cost
Session Outline
3) Database Design
Logical Design
4) Implementation
5) Testing
Initial Schema
6) Maintenance and Database
Maintenance
Released Schema
and Database
Desirable Properties of a Database
Property Description
Completeness Ensures that users can access the data they want
Integrity Ensures that data is both consistent (no contradictory
data) and correct (no invalid data)
Flexibility Ensures that a database can evolved without requiring
excessive effort to satisfy changing user requirements
Efficiency Ensures that users do not have unduly long response
times when accessing data
Usability Ensures that data can be accessed and manipulated in
ways that match user requirements
Requirements Gathering
Columns,
primary
keys, FK,
constraints
Implementation
Information consistency
Eliminating redundant data
Efficiently executing queries
Improved performance of a database
Allows to easily access and retrieve data
Importance of Database Design
Data Models
The Entity Relationship Model
Entites
Attributes
Relationships
Cardinalities