Database Concept
Database Concept
✓ Functions of a DBMS:
Example:
Database Components
A database consists of various components that work together to store and manage data
efficiently:
• Queries: Queries are requests to retrieve or manipulate data in the database. SQL
(Structured Query Language) is the standard query language used to interact with
relational databases.
• Forms: Forms provide a user interface for entering, updating, and interacting with
data in a database.
• Indexes: Indexes are used to speed up the retrieval of data by creating pointers to
specific rows based on certain column values.
• Relationships: These define how tables are related to each other. In a relational
database, relationships are typically defined using primary and foreign keys.
Example:
• A "Books" table in a library database might have columns for "Book ID", "Title",
"Author", and "Genre", and it would be linked to a "Transactions" table using a
"Book ID" as a foreign key.
Database models define the structure and organization of data within a database. The
main types of database models include:
• Network Database: Similar to hierarchical models, but records can have multiple
parents, creating a more complex, graph-like structure of interconnected records.
✓ Key Concepts:
• Normal Forms: The process of normalization is carried out in stages, each known
as a "normal form" (1NF, 2NF, 3NF, etc.). The most common are:
1. 1st Normal Form (1NF): Ensures that each table has a primary key, and all
columns contain atomic (indivisible) values.
2. 2nd Normal Form (2NF): Removes partial dependencies, ensuring that all
non-key columns depend on the entire primary key.
Example:
• A "Student-Course" table that has multiple courses for each student might be in
1NF, but after normalization, we would separate it into a "Students" table and a
"Courses" table to eliminate redundancy.
SQL (Structured Query Language) is the standard language for managing and querying
relational databases. SQL allows users to define, manipulate, and query data within a
database.
• Common SQL Commands:
▪ Example: INSERT INTO Students (ID, Name, Age) VALUES (1, 'John
Doe', 20);
Metadata is data that describes other data. It provides context, meaning, and structure
to the data, making it easier to understand, manage, and use effectively. Metadata can
describe the content, quality, format, and relationships of the data.
• Types of Metadata:
1. Descriptive Metadata: Provides information about the data, like its title,
author, and keywords.
Example:
• A photograph file might have metadata that includes the date the photo was taken,
the camera model, and the GPS coordinates of where it was taken.
Summary