0% found this document useful (0 votes)
6 views7 pages

Database

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)
6 views7 pages

Database

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/ 7

CHAPTER 18 : DATABASE

What is database?
•A database is a structured collection of data so it can be searched, sorted,
filtered and analysed quickly

In the example below, each row represents the data stored about a single customer
(the customer’s record)
•In the customer table, there are 3 records
•Each record is divided into fields (CustomerID, FirstName, LastName, DOB and
Phone Number)
•Data in a database can be any type of data including text, images, videos, sound
•Databases use tables to store data
Terms

FIELD: RECORD: FILE:


Flat file &
Relational database
• Flat file databases are tables that have data sorted
in rows and columns, whereas relational databases
are several tables grouped together to from a link,
thus preventing unnecessary repetition of data.
• Primary key: The key field of a table which is
unique and identifies each record
• Foreign key: The field linked to the primary field of
the table linked to through a relationship
• At times placeholders for media such as images,
sound bites and video clips are used to enhance
the usability of a database
Data types
•You can import data from existing files, like .csv or .txt
•You can use specified field names to create tables
Database Data Types & Subtype
Data Type Explanation Example

Text/Alphanumeric This data type allows letters, special characters like spaces and punctuation and numbers to be entered into a field NG321AE

Character This allows single characters to be entered into a field. Characters can be any alphanumeric value and can be lowercase or uppercase A

Boolean This data type can be used in fields where there are only two possible options. Data is stored as a 1 or 0 in the database but can be used to represent True/False
True/False or Yes/No or checked/unchecked

Integer Only whole numbers can be entered 15

Currency Used for monetary values £4.75

Decimal / Real Numbers including decimal numbers can be stored 30.99

Date/Time Only dates or times can be entered into a field with this type. A format for the date/time can also be assigned to the field 180855
Setting Data Types and Sub-Types
• You can set appropriate data types to fields
• You can set sub-types of numeric data including
percentages, the number of decimal places
• Setting Display Formats
• You can set the display format of Boolean/logical
fields to either
• Yes/No
• True/False
• Checkbox
• You can set the display format of date/time data

You might also like