Professional Documents
Culture Documents
What is a Database?
The definition of a database
- it is a structured collection of records or data that is stored in a computer system.
- it is a tool for collecting and organizing information.
- In other words, it serves as a container of objects, think of it as an electronic filing
cabinet
Main Characteristics:
It can store large amounts of records such as information about people, products, orders,
or anything in textual or image form.
It allows users to retrieve or access data or information easily and quickly.
It can provide data security or protection.
Basic Structure of a database
field or attribute smallest unit of information
records collection of fields related to a particular object
files or tables collection of related records.
Example:
Primary Key
To qualify as a primary key, an attribute must have
the following properties:
Candidate Key
Any key or minimum set of keys that could be a
primary key is called a candidate key.
Example:
Foreign Key
It completes a relationship by identifying the
parent entity.
It provides a method for maintaining integrity in
the data
(called referential integrity)
Every relationship in the model must be
supported by a foreign key.
FK
FK
FK
PK
FK
PK
Table Relationships
To prevent the duplication of information in
a database by repeating fields in more
than one table
Table relationships can be established to
link fields of tables together.
Types of Relationships
One-to-One Relationship
(one student, one course)
One-to-Many Relationship
(one course, many students)
Many-to-Many Relationship
(many teachers, many students)
End of Lesson 01
(Introduction Database Concepts)