0% found this document useful (0 votes)
26 views4 pages

Databases

The document outlines fundamental concepts of databases, including data processing, database systems, and relational databases. It details normalization processes and various normal forms (1NF to 5NF) that aim to minimize redundancy and ensure data integrity. Each normal form has specific criteria to organize data effectively within a database.

Uploaded by

online school
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Databases

The document outlines fundamental concepts of databases, including data processing, database systems, and relational databases. It details normalization processes and various normal forms (1NF to 5NF) that aim to minimize redundancy and ensure data integrity. Each normal form has specific criteria to organize data effectively within a database.

Uploaded by

online school
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

4.

DATABASES (20%)

4.1 Basic Concepts

 Data and Information: Data refers to raw facts and figures, while information is
processed data that is meaningful and useful.
 Processing: The act of transforming data into information through various methods
like calculations, comparisons, and aggregations.

4.2 Database Systems

 Function of a Database:
o Capture and Storage: Storing data in an organized manner.
o Additions, Edits, Deletions: Performing CRUD (Create, Read, Update,
Delete) operations.
o Manipulations: Data transformations, calculations, and aggregations.
o Reports: Generating reports to present data in a structured format.
 Report Writers: Tools or software used to create and format reports from database
data.

4.3 Database Concepts

 Tables/Files: Structures within a database that store data in rows and columns.
 Records: Rows in a table, representing individual data entries.
 Fields: Columns in a table, representing attributes of the data.
 Field Types:
o Text: For storing alphanumeric characters.
o Date: For storing dates and times.
o Numeric: For storing numbers.
o Boolean: For storing true/false values.
 Range Constraints: Limits set on the values that can be stored in a field.
 Record Access:
o Sequential Access: Reading records in a sequential order.
o Random Access: Accessing records in any order.
o Indexed Sequential: Combination of sequential and random access using an
index.

4.4 Relational Databases

 Relations:
o One-to-One: Each record in one table is related to one record in another table.
o One-to-Many: One record in a table is related to multiple records in another
table.
o Many-to-One: Multiple records in a table are related to one record in another
table.
o Many-to-Many: Records in one table are related to multiple records in
another table, and vice versa.
Normalization

is a process in database design that organizes data to minimize redundancy and dependency.
The primary aim of normalization is to separate data into related tables and ensure data
dependencies make sense to reduce redundancy and improve data integrity. The process
involves dividing large tables into smaller, more manageable pieces without losing data
relationships.

There are several types (or forms) of normalization, each with specific rules and
requirements:

1. First Normal Form (1NF)

A table is in the first normal form if:

 It contains only atomic (indivisible) values.


 Each column contains values of a single type.
 Each column should have a unique name.
 The order in which data is stored does not matter.
 Example:

StudentI StudentName Subject


D
1 John Math
1 John Science
2 Alice Math

2. Second Normal Form (2NF)

A table is in the second normal form if:

 It is in 1NF.
 All non-key attributes are fully functionally dependent on the primary key. This
means no partial dependency of any column on the primary key.

Example:

StudentI Subject Marks


D
1 Math 85
1 Science 90
2 Math 80

3. Third Normal Form (3NF)

A table is in the third normal form if:

 It is in 2NF.
 It does not contain transitive dependencies (non-key attributes depending on other
non-key attributes).

Example:

StudentI Subject TeacherName


D
1 Math Mr. Smith
1 Science Ms. Davis
2 Math Mr. Smith

4. Boyce-Codd Normal Form (BCNF)

A table is in Boyce-Codd Normal Form if:

 It is in 3NF.
 For every functional dependency (A -> B), A should be a super key.

Example:

CourseI Professor Semester


D
101 Dr. John Fall
102 Dr. Alice Spring

5. Fourth Normal Form (4NF)

A table is in the fourth normal form if:

 It is in BCNF.
 It has no multi-valued dependencies. This means that for any non-trivial multi-valued
dependency A ->> B, A must be a super key.

Example:

StudentI CourseID Hobby


D
1 101 Reading
1 101 Swimming
2 102 Reading

6. Fifth Normal Form (5NF)

A table is in the fifth normal form if:

 It is in 4NF.
 It cannot have any join dependency that is not implied by the candidate keys.
Example:

ProjectI EmployeeID Role


D
1 101 Developer
1 102 Manager
2 103 Tester

Summary

 1NF: Ensure the table has only atomic values and a unique column.
 2NF: Ensure all non-key attributes are fully functionally dependent on the primary
key.
 3NF: Eliminate transitive dependencies.
 BCNF: Ensure every determinant is a super key.
 4NF: Eliminate multi-valued dependencies.
 5NF: Eliminate join dependencies that are not implied by candidate keys.

Normalization helps in structuring the data efficiently, making the database more flexible and
reducing redundancy and inconsistency

You might also like