FALL 2024 DB Session 1-1
FALL 2024 DB Session 1-1
Database
session
1
By:
Marwan Gaber
Data:
- Data is rows and figures that doesn’t have meaning of
itself
- It represents facts but with no meaning of each other
just data
Information:
- After the data be processed the information come
Ex:
The student data alone cant make anything but if we
process the data we will gain information about the
student .
Entity:
- It represents a real world object or concept (e.g.
employee )
Attributes:
- It represents some property of inserts that describes the
entity
Relationship:
- It is among two or more entities
ex: works-for relationship between the employee and
the department
Here we will know what is the information management
and why we don’t use it and what is the best replacement
of it:
Information management:
- information management is about gathering , organizing,
storing and sharing information they need at the right
time to make decisions
ex: A retail company tracks its weekly sales numbers.
By managing this data well, it can quickly see trends, like
which products are most popular, and decide which
items to stock up on for the following week.
Key concepts of information management:
1- Data Collection: Gathering data from places like internal
systems, outside databases, or user input.
2- Data organization: Structuring the data so it’s easy to
access, often using databases or data warehouses. 3-
Data storge: Selecting secure storage options like
relational databases or cloud storage to keep data safe
and accessible.
4- Data analysis: Using tools to analyze data and gain
insights that help in making decisions.
5- Information Dissemination: Sharing information with
stakeholders through reports, dashboards, or other
formats.
Information management process:
1- Identification
2- Acquisition
3- Storge
4- Processing
5- Distribution
6- Archiving and disposal
1-
Accuracy: means ensuring data is correct, consistent,
and free of errors. It is crucial because inaccurate
information can lead to poor decisions and negative
outcomes.
To achieve accuracy:
1- Pay attention to detail during data entry to avoid
mistakes.
2- 2-Use validation processes to confirm the data is
correct.
3- Perform regular audits to catch and correct any
inconsistencies or errors.
Methods to improve accuracy include:
1- Automating data entry to minimize human error.
2- Using advanced document processing systems to
capture data accurately.
3- Validating data from multiple sources to ensure
consistency.
2- Completeness: means gathering all necessary
information to avoid gaps or missing details, ensuring
that data provides a full picture for analysis and
decision-making
3- Timeliness:
- means providing up-to-date information promptly so
that decision-makers have what they need when they
need it.
- If information is outdated, it can lead to poor decisions
and missed chances, which could have serious negative
impacts on the business.
4- Relevance:
- means providing the right information that aligns with
the organization’s goals and objectives
- it ensures that the appropriate information is delivered
to the right person at the right time and place. - Focusing
on relevant information helps organizations make
informed decisions that directly support their business
objectives.
Example:
A company’s sales team needs up-to-date sales figures
and customer feedback to adjust their strategies, while
the HR department requires employee performance
data to make staffing decisions. By delivering specific,
relevant information to each department, the
organization ensures that every team has the necessary
data to achieve their goals effectively.
5- Accessibility:
- ensures that information is available to authorized
personnel whenever and wherever they need it,
whether in the office or remotely.
- Organizations must have secure, reliable systems that
allow easy access while maintaining document
security.
6- Security:
- involves protecting information from unauthorized
access, modification, or destruction. Given the risks of
cyber threats and data breaches
Example:
A financial institution encrypts client data and restricts
access to only those employees who need it. This
prevents unauthorized individuals from accessing
sensitive information, even if they gain access to the
system.
7- Integrity:
- ensures that the data in a database remains accurate,
consistent, and trustworthy. It protects information
from unauthorized or accidental changes, maintaining
its original form.
To ensure data integrity:
1. Implement Strong Controls
2. Use Validation Rules
3. Data Audits and Backups
3- Program-Data Dependence
- In file systems, data structures are embedded in the
code, meaning any change to the data requires updating
all related programs.
- Effect: Increases development and maintenance time.
4- Integrity Problems
- Data rules (like “balance > 0”) are embedded in the
code, making it hard to enforce or change them.
5- Atomicity Issues
- If an update fails partway, data may be left incomplete.
Example:
A fund transfer should either complete fully or not at all,
otherwise, accounts may show incorrect balances.
Database:
- It is a collection of logically related data stored in a
single repository called Database Management System
(DBMS)
- DBMS manages interaction between end users and
database
Example:
bank and its ATM machines
Effectiveness vs. Efficiency:
- Effectiveness: is about doing the right things to achieve
high-quality results
Example:
A company sets a goal to increase customer
satisfaction. If the company successfully achieves that
goal, the process is effective.
- Efficiency: is about doing those right things in the right
way, using the least amount of time, money, and
resources to achieve the desired results.
Example:
If the same company can increase customer
satisfaction while reducing the cost or time spent on the
process, they have improved their efficiency.
DBMS functionality:
1- Define Database: allows users to define a database by
specifying the data types, structures, and constraints. 2-
Construct or load database: When you create a new
database, the DBMS sets up the physical storage and
organizes the data so it can be efficiently stored and
retrieved.
3- Manipulate database: provides tools for querying,
inserting, deleting, and modifying EX: SQL language
4- Concurrent processing and sharing: ensures that
multiple users and programs can access the database
simultaneously while maintaining data consistency and
validity
Database System
- It is an integrated system of hardware, software ,
people , procedures and data
Procedures
⇨They are a functions , roles and instructions of a system
admin in database
Procedures includes many rules like:
1- Login to the DBMS
2- Start and stop the DBMS
3- Handling hardware and software failures
4- Backup copies of the database
Other functions of a system administrator:
1- OS Management
2- Network management
3- Server hardware management
4- Disk space monitoring
5- Upgrading memory
6- System backup and restoration
Data Model:
⇨It describes the way that the data is organised and how
to represent the relationships among database records
⇨The relationship among many individuals based on one
of several models:
1- Hierarchical Model
2- Network Model
3- Relational Model
4- Entity-Relationship (ER) Data Model
5- Object oriented model
6- Object relational model
1 , 2 , 3 => Record based data models
5 , 6 => object based data model
1- Hierarchical Model (one-to-many)
- Database records are arranged in the form of tree with
several roots (children)
- The root represents the primary key and this paths is the
paths that can be passed
- Relationship among the record is one to many this
means that each parent can have many children but the
children has only one parent
- Ex1:
EX2:
3- Relational Model
- Stores the data in the form of table
- Each table has rows and columns
- Each table has one or more columns that contain the
key of the table
- A single database can has multiple tables
- Relationships representation through common links .
Advantages
1- Data independence: The design of the database is
separate from the way data is stored. Changes in table
structure don’t affect data access or applications
2- Logical structure: Data is stored in tables, a logical setup
that’s easy for users to understand and use.
3- Simplified design and management : Relational
databases are easier to design, manage, and use. 4-
Flexible queries with SQL : SQL allows users to retrieve
data by stating what they need, not how to get it. 5-
Simplify and power : The model is conceptually simple
but powerful for managing data.
Disadvantages
1- High system requirements : Requires significant
hardware and software resources due to hidden
complexities and storage details.
2- Risk of poor design : The ease of use can lead to sloppy
design if not carefully managed.
Conceptual schema
- Describes the overall structure of the database:
Entities, attributes, relationships, and constraints -
Serves as a unified view of the entire database,
independent of physical storage.
- Example
⇨Entities: Customers, Orders
⇨Relationships: A customer can place multiple orders -
Often represented using an Entity-Relationship Diagram
(ERD)
Physical/Internal Schema
- Defines how data is stored on physical media (like hard
drives)
- Optimizes data storage and retrieval
- Techniques:
⇨Unsorted files
⇨sequential files
⇨indexing (e.g., ISAM, B+-trees)
⇨hashing
Data independence
1- Logical data independence:
- Ability to modify the conceptual schema without
affecting external schemas or application programs -
Use Cases:
⇨Adding/removing data items or tables.
⇨Changing relationships.
Database Designer
- Design the database structure
- Responsibilities:
⇨Define entities, relationships, constraints, and user
views.
⇨Ensure the database supports required functions and
transactions
Application programmers
- Write programs to interact with the database -
Develop user-friendly applications that enable
interaction with the database
Database User
- End Users (Naïve Users)
⇨Use pre-written applications (e.g., bank clerks, online
shoppers).
- Casual/Sophisticated Users
⇨Access the database using query languages or tools like
data analysis software.
technical details.
• Key Features:
CourseName).
o Relationships: Connections between entities (e.g.,