Section 6 - Introduction to Databases
Section 6 - Introduction to Databases
Technology
INTRODUCTION TO
DATABASE
MANAGEMENT
Specific Objectives
•Explain the concept of a database and DBMS
•State the purpose of database
•Use terminology commonly associated with a database
• table, row (record)
• column (field)
• primary key
• secondary key
• candidate key
• foreign key
• Data types: numeric; text; logical; date /time; currency
•Define relationships
What is a Database?
A repository of information
Examples of common databases:
Telephone book
Mailing List
Recipe book
Book shelf
A database s a collection of related tables.
In MS Access, a database is a set of an organized collection of related
information to a specific purpose or topic.
MS Access include tools needed to work with data:
Sorting
Extracting
Summarizing
What is a DBMS?
DBMS – database management system
Database Management System or DBMS is a type of software that helps
manage a database. It is used to find and store information within a
database.
Examples:
1. MySQL
2. PostgreSQL
3. Microsoft SQL Server
4. Oracle Database
5. Microsoft Access
Purpose of a Database
A database is a systematic or organized collection of related information
that is stored in such a way that it can be easily accessed, retrieved,
managed, and updated.
Databases are used for storing, maintaining and accessing any sort of
data. They collect information on people, places or things. That
information is gathered in one place so that it can be observed and
analyzed. Databases can be thought of as an organized collection of
information.
https://intellipaat.com/blog/what-is-database/
Uses of a Database
Advantages of a DBMS
•Minimum data redundancy
•Improved data security
•Increased consistency
•Lower updating errors
•Reduced costs of data entry, data storage, and data
retrieval
•Improved data access using host and query languages
•Higher data integrity from application programs
Database Hierarchy
Database
Table
Record
Fields
Byte
Bit
Database Terminology -
Table
Table - is a collection of related records, made of a set of rows and
columns. Also called a relation.
Database Terminology -
Record
Record – is a row of data , or a collection of related fields in a database.
For example:
https://sfmagazine.com/post-entry/february-2017-access-data-types/
DB
Relationship
s
THESE 2 TABLES ARE JOINED TOGETHER
IN HOLY MATRIMONY.
Primary Keys
Primary Key – A unique field that is used to identify each record in a
database table.
The Cust_ID OR the TRN are both unique. Any of the two fields can be
assigned as the primary key.
Other Keys - Candidate
Key
Candidate Key - a field that could possibly act as the primary key for the
table.
Customer information table the candidate keys are Cust_ID and TRN
number( because they both unique).
Other Keys -
Composite Key
Composite Key - a primary key that consists of two or more fields
together.
In the table below observe that a course may be offered several times
for the year and more than one lecturer teaches a particular course.
Email kmorrison@campioncollege.com
Credits/ References