0% found this document useful (0 votes)
7 views

Section 6 - Introduction to Databases

The document provides an introduction to database management, explaining key concepts such as databases, DBMS, and various database terminologies including tables, records, and keys. It outlines the purpose of databases, their advantages, and the types of data used in Microsoft Access. Additionally, it describes relationships between tables, including one-to-one, one-to-many, and many-to-many relationships.
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)
7 views

Section 6 - Introduction to Databases

The document provides an introduction to database management, explaining key concepts such as databases, DBMS, and various database terminologies including tables, records, and keys. It outlines the purpose of databases, their advantages, and the types of data used in Microsoft Access. Additionally, it describes relationships between tables, including one-to-one, one-to-many, and many-to-many relationships.
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/ 27

Information

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:

FirstName LastName Address City Cust_ID


Kevin Nevers 2 Rose St Kingston 220

Tuple – is a row of data in relational databases. It gives details about a


particular entity. For example: (Kevin, Nevers, 2 Rose St,Kingston,220)
Database Terminology -
Field
 Field – is a single column in a database table that stores data. Also
referred to as an attribute in a database For example :

Field 1 Field 2 Field 3 Field 4 Field 5

FirstName LastName Address City Cust_ID


Kevin Nevers 2 Rose St Kingston 220

This record consists of Five(5) fields or columns.


One item of data such as the actual address is called a Data Value.
Database Terminology
Byte – is a group of eight bits, usually representing a single character.

An example of a byte is: 11000001 which represents the letter “A”

Bit – is an acronym for binary digit. It can be a value of 1 or 0.


Microsoft Access Data Types
Data Type Description
Short Text – formerly Text Use for text or combinations of text and
numbers. 255 characters maximum

Long Text – formerly Memo Memo is used for larger amounts of


text. Stores up to 65,536
characters. Note: You cannot sort a
memo field. However, they are
searchable
Currency Use for currency. Holds up to 15 digits
of whole dollars, plus 4 decimal
places. The upper limit for Currency is
922 trillion. By default, values will
display using the Currency symbol
specified in the Windows Region
Settings.
Microsoft Access Data Types
Data Type Description
AutoNumber AutoNumber fields automatically give
each record its own number, usually
starting at 1
Date/Time Use for dates and times - You can
show just the date, just the time, or a
combination of both—all in various
display formats.
Yes/No A logical field can be displayed as
Yes/No, True/False, or On/Off. In code,
use the constants True and False
(equivalent to -1 and 0).Note: Null
values are not allowed in Yes/No fields
Microsoft Access Data Types
Data type Description
Number Used to store numbers with or without
decimal places.

Ole Object Can store pictures, audio, video, or


other BLOBs (Binary Large OBjects)

Hyperlink Contain links to other files, including


web pages

Lookup Wizard Let you type a list of options, which can


then be chosen from a drop-down list
Microsoft Access Data
Types
Number data type can have the following formats:
Number format Description
Byte Allows whole numbers from 0 to 255

Integer Allows whole numbers between -32,768 and 32,767

Long Integer Allows whole numbers between -2,147,483,648 and


2,147,483,647
Single Single precision floating-point. Will handle most decimals

Double Double precision floating-point. Will handle most decimals

Decimal Allows numbers from -9.999…x 1027 to 9.999… x 1027 with


decimal places

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.

CourseID Semester Lecturer Room_No Year


M10A Spring Brown SSLT 2005
M10A Summer Forbes N5 2004
M10A Spring Smith SSLT 2004
EC21A Spring Forbes IFLT 2005
EC21A Summer Brown IFLT 2004
Other Keys - Secondary or
Alternate Key
Secondary or Alternate Key - a candidate key that has not been selected
as the primary key.
In this table the Cust_ID key was selected as the Primary key and as a
result the secondary key is TRN number.
Other Keys – Foreign
Key
 Foreign Key - a field in a table that is has been linked with the primary
key field of another table .
 In the example below, the DVD ID in the orders table is a foreign key
because it is the primary key in the DVD Inventory table.
Relationships Between
Tables
One to One - In a one-to-one relationship each record in one table has at
most (one and only one) one related record in another table.
One to Many - A one-to-many relationship is the most common type of
relationship. In a one-to-many relationship, a record in Table A can have
many matching records in Table B, but a record in Table B has only one
matching record in Table A.
*Many to Many - In a many-to-many relationship, a record in Table A can
have many matching records in Table B, and a record in Table B can have
many matching records in Table A. This type of relationship is only possible
by defining a third table (called a junction table) whose primary key consists
of two fields the foreign keys from both Tables A and B. A many-to-many
relationship is really two one-to-many relationships with a third table. Not
emphasized for the CSEC Syllabus.
Relationships in Access
Questions???

Email kmorrison@campioncollege.com
Credits/ References

Adapted/modified from the Information Technology


Database Management Workshop 2012 Presentation by:
Mrs. Collins-Robinson
Practical
Notes
FOLLOW PAGES 197 – 226 IN TEXT BY
GAY AND BL ADES

You might also like