the terms: a record, a field, a primary and foreign keys,
what data types are accepted by databases.
RrlD5hVcYSDEX1
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.
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 tabletabletable 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.
RmRCLN1X8Oojk
Task 1
RoC74bxeHXlcu1
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
R1S6KQaTpKtRs1
What are the data types of the fields in the tables presented in the illustration above?
R15zAFEhFGH1s
The types of databases
Simple databases:
A 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.
A 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.
A 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.
RuURs0hOmZLzP
Complex databases:
A 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.
A 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.
RqRswM9Kf5lhV
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 recordrecordrecord but analyse data from numerous records.
RPO88tXyxzMiE
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.
RGuPGPUY3wZQO
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.
RBXH8AsZIkfgy1
When you create the names of fields in a database tabletabletable, avoid names including spaces and the Polish diacritics.
Task 3
R13kuhQp3gRXu1
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
RJAddliTrg37d1
Open the database designed by you in the database programme installed on your computer. Fill it with fictional data.
R1HSwsZCdgv1X1
Currently databases are applied almost in every fieldfieldfield of our life.
Exercises
RThWe1SPogyrg
Exercise 1
Exercise 2
Design a database for a video games rental consisting of two tables. The design should include:
- the names of the tables, - the names of the fields and specifying data types, - identifying primary and foreign keys.
Exercise 3
On the internet find the information about any programme for designing databases. Describe shortly in English its basic features and application.