0% found this document useful (0 votes)
71 views64 pages

DB - Chapter 1

Uploaded by

Muhammad Shahbaz
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)
71 views64 pages

DB - Chapter 1

Uploaded by

Muhammad Shahbaz
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/ 64

Introduction to Database

Why Data Matters?


Databases are used to store,
manipulate, and retrieve data in
nearly every type of
organization, including business,
health care, education, government,
and libraries.
Basic Concepts
and Definitions
Database

“An organized collection of logically related data.”

A database may be of any size and complexity:


- A small database managed by a salesman on his/her computer.
- A large corporation may build a large database on a large mainframe computer.
- Very large data warehouses.
Data

“Facts concerning objects and events that could be recorded and stored on
computer media.”

For Example:
In a salesperson’s database, the data would include facts such as customer name,
address, and telephone number.
Data - Continue

The traditional definition of data now needs to be expanded to reflect a new


reality:
“Stored representations of objects and events that have meaning and
importance in the user’s environment.”
Information

“Data that have been processed in such a way as to increase the knowledge of
the person who uses the data.”
For example, consider the following list of facts:
Baker, Kenneth D. 324917628

Doyle, Joan E. 476193248

Finkle, Clive R. 548429344

Lewis, John C. 551742186

McFerran, Debra R. 409723145


Data in Context
Summarized Data/ Information
Metadata

“Data that describe the properties or characteristics of end-user data and the
context of those data.”
- Some of the properties that are typically described include data names,
definitions, length (or size), and allowable values.
- Metadata describing data context include the source of the data, where the
data are stored, ownership, and usage.
Example Metadata for Class Roster
Progression from File Processing
Systems to Databases
Traditional File Processing Systems

● When computer-based data processing was first available, there were no


databases.
● To be useful for business applications, computers had to store, manipulate,
and retrieve large files of data.
File Processing Systems at Pine Valley Furniture Company
Disadvantages of File Processing Systems

1. Program-Data Dependence
2. Duplication of Data
3. Limited Data Sharing
4. Lengthy Development Times
5. Excessive Program Maintenance
Disadvantages of File Processing Systems

1. Program-Data Dependence
2. Duplication of Data
3. Limited Data Sharing
4. Lengthy Development Times
5. Excessive Program Maintenance
Disadvantages of File Processing Systems

1. Program-Data Dependence
2. Duplication of Data
3. Limited Data Sharing
4. Lengthy Development Times
5. Excessive Program Maintenance
Disadvantages of File Processing Systems

1. Program-Data Dependence
2. Duplication of Data
3. Limited Data Sharing
4. Lengthy Development Times
5. Excessive Program Maintenance
Disadvantages of File Processing Systems

1. Program-Data Dependence
2. Duplication of Data
3. Limited Data Sharing
4. Lengthy Development Times
5. Excessive Program Maintenance
Can these limitations arise in
Database?
The Database Approach

● Data Models:

Graphical systems used to capture the nature and relationships among data.
The Database Approach

● Entity:

A person, a place, an object, an event, or a concept in the user environment


about which the organization wishes to maintain data.
The Database Approach

● Relationship:

A well-structured database establishes the relationships between entities that


exist in organizational data so that desired information can be retrieved.
Segment of a Enterprise Level
Data Model
Segment of a Project Level Data Model
The Database Approach

● Relational Database:

A database that represents data as a collection of tables in which all data


relationships are represented by common values in related tables.
The Database Approach

● Database Management Systems:

A software system that is used to create, maintain, and provide controlled


access to user databases.
Data Model of Pine Valley Furniture Company
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Advantages of the Database Approach

● Program-data independence
● Planned data redundancy
● Improved data consistency
● Improved data sharing
● Enforcement of standards
● Improved data quality
● Improved data accessibility and responsiveness
● Reduced program maintenance
● Improved decision support
Tell some limitations that arise in
Database?
Components of Database Environment
Exercise:
For each of the following pairs of related entities, indicate whether (under
typical circumstances) there is a one-to-many or a many-to-many relationship.
Then, draw a diagram for each of the relationships.

1. STUDENT and COURSE (students register for courses)


2. BOOK and AUTHOR (book is written by an author)
3. CLASS and ROOM (classes are scheduled in rooms)
4. INSTRUCTOR and COURSE (instructor teaches a course )
5. PATIENT and APPOINTMENT (patient makes an appointement)
Types of Database
Hierarchical Databases

● Oldest Model - 1950’s


● Tree-Like Structure
● Parent-Child Relationship
● Limited Flexibility
● Example : IBM Information Management System
Hierarchical Databases
Network Databases

● Formalized by the Database Task group in the 1960s


● Generalization of the Hierarchical model
● Graph like Structure
● Example: Integrated Data Store (IDS)
Network Databases
Relational Databases

● Developed by E. F. Codd in 1970


● Tables consisting of rows and columns
● Predefined schema
● Relationships connect the tables
● Example : MySQL, PostgreSQL, Oracle Database, Microsoft SQL Server,
and SQLite
Relational Databases
Object-Oriented Database

● Data in the form of objects as used in OOP


● Supports OOP principles
● Rich Type System
● No Standardization of Query Language, Data Modelling techniques
● Example : MySQL, PostgreSQL, Oracle Database, Microsoft SQL Server,
and SQLite
Object-Oriented Database
NoSQL Database

● Handles unstructured and


Semi-structured data
● Non-tabular data model
● Dynamic Schema
Document Database

● Data in the form of JSON or XML format


● In contrast to Relational Model
○ Row vs Document
○ Column vs Properties
○ Schema vs Schema Free
● Example: MongoDB, Couchbase, CouchDB and Elasticsearch
Document Database - JSON Document
Document Database - XML Document
Key-Value Database

● Utilizes keys to access associated values


● Key: a distinct identifier, mapping to a corresponding value or data
location
● Value: various data types, ranging from basic strings or integers to
intricate objects with nested values
● Example: Redis, Google Cloud Firestore, Amazon DynamoDB, Microsoft
Azure Cosmos DB
Key-Value Database
Column Database

● Store data in columns rather than rows.


● Can be both SQL and NoSQL
● Example: Apache Cassandra, Apache HBase, ScyllaDB
Column Database
Graph Database

● Nodes (entities) and Edges (connections between entities) and Properties


● Example: Neo4j, TigerGraph, and ArangoDB
Graph Database
Exercise:
Consider a book rental system in a comic store. When a customer borrows or
returns a comic book, the shopkeeper needs to mark down the transaction or
update the corresponding record on the transaction book.

1. Identify the Entities for this system


2. Identify the type of relationship between the entities.
3. Think some attributes for these entities that needs to be stored.
4. Draw a diagram to represent the system.

You might also like