Wróć do informacji o e-podręczniku Wydrukuj Pobierz materiał do PDF Pobierz materiał do EPUB Pobierz materiał do MOBI Zaloguj się, aby dodać do ulubionych Zaloguj się, aby skopiować i edytować materiał Zaloguj się, aby udostępnić materiał Zaloguj się, aby dodać całą stronę do teczki

Topicmdb9999788cafb172_1528449000663_0Topic

Introduction to databases

Levelmdb9999788cafb172_1528449084556_0Level

Third

Core curriculummdb9999788cafb172_1528449076687_0Core curriculum

Secondary school

II. Programming and solving problems with the use of computer and other digital devices.

Basic range. The student:

3) prepares solutions for solving problems using selected applications:

d) searches for information using a database based on at least two tables, defines relations, applies filtering, formulates queries, creates and modifies forms, prints reports

Extended range. The student meets the requirements specified for the basic range, in addition:

4) uses selected advanced applications to prepare solutions for complex problems:

d) designs and creates a relational database composed of many tables and also a network database application for data related to a solving problem, formulates queries, creates and modifies forms and reports, uses SQL language to search for information in the database and to modify it, cares for the integrity of data, security and data protection in the database,

Timingmdb9999788cafb172_1528449068082_0Timing

45 minutes

General objectivemdb9999788cafb172_1528449523725_0General objective

Designing databases.

Specific objectivesmdb9999788cafb172_1528449552113_0Specific objectives

1. Identifying the types of databases.

2. Defining the basic terms related to databases.

Learning outcomesmdb9999788cafb172_1528450430307_0Learning outcomes

The student:

- identifies the types of databases,

- defines the basic terms related to databases.

Methodsmdb9999788cafb172_1528449534267_0Methods

1. Discussion.

2. Learning through observation.

Forms of workmdb9999788cafb172_1528449514617_0Forms of work

1. Individual work.

2. Class work.

Lesson stages

Introductionmdb9999788cafb172_1528450127855_0Introduction

Discussion:

The teacher initiates a short discussion about where the students can come across databases every day.

It is worth to realise that databases are synonymous with storing huge amounts of data. Modern databases collect for instance the photographs of the universe, information about flights and plane passengers all over the world, the descriptions of medicines and their applications. It would be difficult to store such information traditionally, in a notebook or even in a file. Even if you had enough sheets of paper, finding needed information would be simply impossible. For comparison, a single modern personal computer can contain information written on over 20 million sheets of paper.

Proceduremdb9999788cafb172_1528446435040_0Procedure

A database is a set of organized data associated with a specific issue.

Basically a database can be treated as a tool for:

- storing,
- browsing,
- searching,
- sorting information.

The basic terms related to databases are: a table, a recordrecordrecord, a fieldfieldfield and a primary keyprimary keyprimary key.

Data are stored in tables. A database can contain multiple tables. The table must have its unique name in the database. The table is made up of fields, which correspond to columns in a spreadsheet, and data are collected in rows, which are called records. The records, contrary to the spreadsheet, are not assigned the row numbers and can be entered into the table in any order. All data values are based on simple data types. A primary keyprimary keyprimary key is a unique field throughout a table that clearly identifies a given record.

[Interactive graphics]

Task 1

On the internet or in the Help menu of the database programme installed on your computer find what data types can be accepted by the fields in a tabletabletable.

Task 2

What are the data types of the fields in the tables presented in the illustration above?

The types of databases:

Simple databases:

file databasefile databasefile database is a database based on a single file, usually a text file; it can store data for particular applications or devices.

flat‑file databaseflat‑file databaseflat‑file database is a database in which every table is a single document and is not related to the other table.

hierarchical databasehierarchical databasehierarchical database is a database in which each recordrecordrecord, except from the root record, is linked to only one parent record. Data are organized into a tree‑like structure, similar to the structure of directories and files.

Complex databases:

relational databaserelational databaserelational database is a database in which multiple tables are linked with one another with the so called relations.

An object databaseobject databaseobject database is a database which stores a set of objects along with the properties assigned to them.

temporal databasetemporal databasetemporal database is a variation of a relational database in which every record has got a timestamp, which defines the time in which a given value is true. Temporal databases enable storing the entire history of all data.

XML is a data structure based on the markup language. Many databases can import data from the XML file or export data to such a file. Some programming languages enable operating on data directly in XML files.

The classification of databases by their reach:
- local databases,
- databases operating based on the client
- server model,
- centralised databases – databases stored on a single server,
- distributed databases – databases stored on multiple servers,
- data warehouses – databases that collect huge amounts of data, which may come from multiple systems. Such databases do not focus on a single record but analyse data from numerous records.

Database design:

Creating databases should be preceded by their design. In order to design a good database, you must pay attention to the following issues:
- functionality according to assumptions,
- removing data redundancy (duplicating data),
- full data integrity (all data are consistent),
- the scalability (easy expansion) of a database,
- the security of collected data.
In the case of large databases the design process is crucial and unfortunately it is difficult to implement due to the specialised knowledge needed.
mdb9999788cafb172_1527752256679_0Creating databases should be preceded by their design. In order to design a good database, you must pay attention to the following issues:
- functionality according to assumptions,
- removing data redundancy (duplicating data),
- full data integrity (all data are consistent),
- the scalability (easy expansion) of a database,
- the security of collected data.
In the case of large databases the design process is crucial and unfortunately it is difficult to implement due to the specialised knowledge needed.

Table design:

The data types in a single column should be identical and defined already at the stage of the table design. Various programmes may accept slightly different data types. However all of them enable storing text, numbers, dates and time, currencies, multimedia elements, links, etc. The names of fields, similar to tables, should be unique.mdb9999788cafb172_1527752263647_0The data types in a single column should be identical and defined already at the stage of the table design. Various programmes may accept slightly different data types. However all of them enable storing text, numbers, dates and time, currencies, multimedia elements, links, etc. The names of fields, similar to tables, should be unique.

Memorise!

When you create the names of fields in a database tabletabletable, avoid names including spaces and the Polish diacritics.

Task 3

Design a database made up of one table including information about the students who play voleyball at a school club. The design should include:

- the name of the table,
- the names of the fields and the specification of data types,
- identifying primary keys.

Task 4

Open the database designed by you in the database programme installed on your computer. Fill it with fictional data.

Lesson summarymdb9999788cafb172_1528450119332_0Lesson summary

Currently databases are applied almost in every fieldfieldfield of our life.

Selected words and expressions used in the lesson plan

data typedata typedata type

databasedatabasedatabase

fieldfieldfield

file databasefile databasefile database

flat‑file databaseflat‑file databaseflat‑file database

foreign keyforeign keyforeign key

hierarchical databasehierarchical databasehierarchical database

object databaseobject databaseobject database

primary keyprimary keyprimary key

recordrecordrecord

relationrelationrelation

relational databaserelational databaserelational database

tabletabletable

temporal databasetemporal databasetemporal database

mdb9999788cafb172_1527752263647_0
mdb9999788cafb172_1527752256679_0
mdb9999788cafb172_1528449000663_0
mdb9999788cafb172_1528449084556_0
mdb9999788cafb172_1528449076687_0
mdb9999788cafb172_1528449068082_0
mdb9999788cafb172_1528449523725_0
mdb9999788cafb172_1528449552113_0
mdb9999788cafb172_1528450430307_0
mdb9999788cafb172_1528449534267_0
mdb9999788cafb172_1528449514617_0
mdb9999788cafb172_1528450135461_0
mdb9999788cafb172_1528450127855_0
mdb9999788cafb172_1528446435040_0
mdb9999788cafb172_1528450119332_0
field1
field

pole

RxYH504i9ib3R1
wymowa w języku angielskim: field
table1
table

tabela

R66d9qbAlw5HF1
wymowa w języku angielskim: table
record1
record

rekord

R1W0GkCPWlCh61
wymowa w języku angielskim: record
primary key1
primary key

klucz podstawowy

RngMAbyvOgLoB1
wymowa w języku angielskim: primary key
file database1
file database

baza plikowa

R9Rds4A701ucN1
wymowa w języku angielskim: file database
flat‑file database1
flat‑file database

baza kartotekowa

RFHhJwzFIE8l81
wymowa w języku angielskim: flat‑file database
hierarchical database1
hierarchical database

baza hierarchiczna

Rgp4t8pMMeHx91
wymowa w języku angielskim: hierarchical database
relational database1
relational database

baza relacyjna

R1YFPEuFJksih1
wymowa w języku angielskim: relational database
object database1
object database

baza obiektowa

Rrg8R1TDUHTwr1
wymowa w języku angielskim: object database
temporal database1
temporal database

temporalna baza danych

R1chElSBUHKMR1
wymowa w języku angielskim: temporal database
data type1
data type

typ danych

R10dICvIgboj91
wymowa w języku angielskim: data type
database1
database

baza danych

R1S2rRmrphx271
wymowa w języku angielskim: database
foreign key1
foreign key

klucz obcy

R1bcZ4c4qYjqp1
wymowa w języku angielskim: foreign key
relation1
relation

relacja

R1Et25BcdUWVb1
wymowa w języku angielskim: relation