Top Banner
Databases
15

Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Dec 24, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Databases

Page 2: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Objectives

Define what a database is.Understand the difference between a flat and

relational databaseDesign and create a relational database using

tables

Page 3: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Database definition

A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

Example: A telephone book

Write down three other examples of databases (they do not have to be computer based)

Page 4: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Example of a database

Page 5: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Database termsTableA group of recordsExample: Class 11AB student detailsRecordA group of fields containing data about a

person, item etc.Example: Name and Address and Date of BirthFieldOne piece of information you want to use in

your databaseExample: Name, Date of BirthValueAn entry for a fieldExample: Paul, 07/02/1990

Page 6: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
Page 7: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Flat database

A flat database is represented by a table which is made up of fields and records.

Flat databases are used to store limited amounts of information such as personal details.

Page 8: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Examples of Flat databases

Page 9: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Data types in AccessData Type Description

AutoNumberThis filed is automatically created for each record in your database. The AutoNumber field is primarily used for Primary Keys in Access. For example 1, 2, 3

TextA Text field can contain values that are text, numbers or both. For example, Fname, LName

Number The Number field can store numeric values up to 16 bytes of data.

Date/TimeThe Date/Time field allows storage of date and time information. For example, 10/11/2012

Yes/No Boolean data storage of true/false values. EG YES/NO

Page 10: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Field names and Datatypes

Page 11: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Primary Key

The primary key of a table uniquely identifies each record in the table.

This number can be given by Access or can be chosen by you.

What number could be used to uniquely identify you?

Page 12: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

A relational database

A relational database stores data in a collection of related tables.

Each table contains one specific type of information.

This makes sure that data is stored only once, reducing the amount of duplicate data that is stored.

Page 13: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Example of a relational database

Page 14: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

Create a database

Use the manual given to start designing and creating your database.

Page 15: Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.

The database design process consists of several steps

1. Determine the purpose of your database.2. Gather existing data and make a list of

required fields.3. Arrange the data into tables. 4. Use sample data to troubleshoot for possible

problems such as reducing redundant data.5. Identify primary keys and specify foreign

keys used to relate tables. 6. Determine table relationships and revise the

table design as necessary.