0% found this document useful (0 votes)
4 views17 pages

Data and Information Management Term 1

A database is an organized collection of data stored in tables, with primary and foreign keys ensuring data integrity and relationships between tables. Good databases maintain data integrity, security, and independence while avoiding anomalies through normalization. Anomalies, such as insertion, update, and deletion anomalies, can be mitigated by following normalization steps and using key fields effectively.

Uploaded by

bc.choma
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)
4 views17 pages

Data and Information Management Term 1

A database is an organized collection of data stored in tables, with primary and foreign keys ensuring data integrity and relationships between tables. Good databases maintain data integrity, security, and independence while avoiding anomalies through normalization. Anomalies, such as insertion, update, and deletion anomalies, can be mitigated by following normalization steps and using key fields effectively.

Uploaded by

bc.choma
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/ 17

Data and

Information
Management
Database design and concept
What is a database?
• A database is an organized collection of data stored in tables
consisting of records (rows) and fields (columns), with a
primary key uniquely identifying each record.
• Records store individual pieces of data, like information about
one person or item.
• Fields represent specific types of data within a record, such as
a name, age, or ID.
• A foreign key is a field in one table that links to the primary
key in another table. It is used to create a relationship
between two tables, ensuring that data in both tables is
connected and consistent.
Characteristics of a good database
• Data integrity in a database means that the data is accurate,
consistent, and reliable throughout its lifecycle.
 It ensures that the information stored in the database is
correct, not corrupted, and follows the rules set for
relationships between tables (e.g., primary and foreign
keys). For example, it prevents entering invalid data, like
assigning grades to a student ID that doesn’t exist.
• Physical integrity refers to the protection and preservation of
the physical storage of data in a database, ensuring that
hardware failures, power outages, or environmental factors
(like fires or floods) do not damage or corrupt the data.
• Logical integrity ensures that the data in a database remains
accurate, consistent, and follows the defined rules and
relationships, regardless of how it is accessed or manipulated.
 It focuses on the correctness of data and its logical
structure, such as enforcing constraints like primary keys,
foreign keys, and data validation rules to prevent errors
like duplicate records or invalid relationships between
tables.
• Referential integrity is a type of logical integrity in a database
that ensures relationships between tables are consistent.
 It requires that a foreign key in one table always refers to
a valid primary key in another table. For example, if a
"Student ID" in a Grades table is linked to the "Student
ID" in the Students table, referential integrity ensures
that you can’t add a grade for a student who doesn’t
exist or delete a student record that still has grades
associated with it.

Data redundancy
• Data redundancy is when the same data is stored in multiple
places in a database or system.

 For example, if a customer's name and address are


saved in both a billing table and a shipping table, that's
redundancy. While it can sometimes help with backup,
it usually wastes space, increases the chance of errors,
and makes updates more complicated since all copies
need to be changed.
Data Independence
• Data independence refers to the ability to change the
structure of a database without affecting the way data is
accessed or how applications interact with it.

 In simpler terms, it means that the way data is stored or


organized can be changed without disturbing the
programs or users that use that data.
Data Security
• Data security is all about keeping the data stored in the
database safe from being stolen, changed, or damaged. It
ensures that:
 Only authorized people can access the data (e.g.,
employees with permission).
 The data stays accurate and unaltered, so it can be
trusted.
 The data is always available when needed, without
interruptions.
• Data security in a database is achieved through passwords,
encryption, and biometric security measures such as
fingerprint scanners to ensure data remains safe, accurate,
and accessible.
Data Maintenance
• Data maintenance refers to the ongoing process of managing
and updating data to ensure its accuracy, consistency, security,
and accessibility. It involves activities such as cleaning,
validating, backing up, and archiving data to keep it reliable
and useful over time.

• Data Maintenance is performed to keep data current. It


includes adding, and deleting records, as well as updating
data. (pg 106)
Problems with
databases
Anomalies
What are anomalies?
• Anomalies refer to inconsistencies, errors, or irregularities that
occur in a database, usually due to poor database design,
redundant data, or improper data handling. They often
happen in un-normalized relational databases and can lead to
data integrity issues.
Types of Anomalies
• Insertion Anomaly – Occurs when new data cannot be added to a
database without adding unnecessary or incomplete data.
• Example: In a student database, if a new student cannot be added
without assigning them a course first, this is an insertion anomaly.
• Update Anomaly – Happens when updating data in one place
does not automatically update it in other related places, leading
to inconsistencies.
• Example: If a student's email is stored in multiple tables, updating
it in one table but not in others causes discrepancies.
• Deletion Anomaly – Occurs when deleting a piece of data
unintentionally removes other useful information.
• Example: If a student drops a course and their record is
completely deleted, losing historical data about their attendance,
this is a deletion anomaly.
How to get rid of anomalies
• Normalize the Database

Normalization is the process of organizing data in a database to


reduce redundancy and improve data integrity. It involves dividing
large tables into smaller, related tables and defining relationships
between them using keys.
Steps to Normalize Data:
• ✅ First Normal Form (1NF) – Remove Repeating Groups
• Ensure that each column has atomic values.
• Example: Instead of storing multiple phone numbers in a single column,
split them into separate rows.
• ✅ Second Normal Form (2NF) – Remove Partial Dependencies
• Ensure that every non-key attribute depends on the entire primary
key, not just part of it.
• Example: If a table has StudentID, CourseID, and StudentName, move
StudentName to a separate Students table.
• ✅ Third Normal Form (3NF) – Remove Transitive Dependencies
• Ensure that non-key attributes depend only on the primary key, not on
other non-key attributes.
• Example: If an Employee table has (EmployeeID, DepartmentID,
DepartmentName), move Department details to a separate
Departments table.
Key fields
• A Primary Key is a unique identifier for each row in a table.
It prevents duplicate records, which avoids update and
deletion anomalies.

• If a table has multiple candidate keys (unique columns), the


one not chosen as the primary key is called an Alternate Key.
It helps enforce uniqueness and avoids data duplication.

• Foreign Keys link two related tables, ensuring referential


integrity (no orphaned records).
Prevents deletion anomalies, where deleting one record
removes necessary related data.
• Composite Keys are multiple columns combined to create a
unique key.
They prevent insertion and update anomalies in many-to-
many relationships.

You might also like