Topic: Databases. information about the described objects
Municipal autonomous educational institution
"Miass Secondary School No. 16"
Presentation
in computer science for 9th grade
on the topic of:
Computer science teacher, 1st category
Shavaleeva Svetlana Alekseevna
Miass
DATABASE.
INFORMATION SYSTEM is a collection of a database and the entire complex of hardware and software for its storage, modification and retrieval of information for interaction with the user
DATABASE MANAGEMENT SYSTEM (DBMS) Software, designed to work with databases
DATABASE (DB)
DATABASES AND INFORMATION SYSTEMS
DATABASE (DB)
An organized collection of data intended for long-term storage external memory computer and permanent use
FACTUAL
Brief information about objects in a strictly defined format
DOCUMENTARY
DISTRIBUTED DBs
Documents in various formats
Storing different parts of one database on many computers interconnected by a network.
- text information
- graphic objects
- audio information
- multimedia objects
- . . . . . . . . . . . . . . . . . .
- library catalog
- personnel database
- reference file
- . . . . . . . . . . . . . . . .
Hierarchical model
In the hierarchical model, the information structure has the form of a tree. At the topmost (first) level there is only one vertex, which is called the root. This vertex has connections with vertices of the second level, vertices of the second level have connections only with vertices of the third level, etc.
- IN network model main structure information representation has the form of a network, in which each vertex can have a connection with any other.
- In the relational model information is presented in table form. The rows of the table are records, and the columns are the same fields.
DATABASE MANAGEMENT SYSTEMS
- DBMS - application program, designed to work with the database.
DBMS - software, providing access to information stored in the database, its maintenance and processing.
- DBMS examples:
- KBASE, FOXPRO, VISTA, RBDMSX, ACCESS.
- KBASE
- FOXPRO,
- VISTA,
- RBDMSX
- ACCESS.
DATA TYPES
1) Text - The meaning of a text data is represented by a set of alphanumeric characters. The length of text data does not exceed 255 characters. Default, Microsoft Access sets the length to 50 characters. Setting the length of a text field means that if you try to enter more than long text extra characters will be ignored. If a text field contains numeric data, then this data is perceived as text and cannot participate in mathematical operations.
Text data type
Text data type
DATA TYPES
2) Counter - used for automatic numbering of records.
Counter data type
DATA TYPES
3) Numerical - used for data (integer and fractional) involved in calculations.
Numeric data can be in any of the following formats:
Meaning
Description
Byte
Numbers from 0 to 255 (without fractional part)
Whole
Fraction
Long integer
Numbers from -32768 to 32767 (without fractional part)
Absent
Size
1 byte
(Default value). Numbers from -2147483648 to 2147483647
(without fractional part)
Absent
Floating point (4 bytes)
Floating point (8 bytes)
Numbers from
-3.402823* to 3.402823*
Absent
2 bytes
4 bytes
Numbers from
-1.79769313486232* to 1.79769313486232*
Replication code
4 bytes
Globally unique identifier (GUID)
8 bytes
Undefined
16 bytes
DATA TYPES
4) Date/Time- used to store time or date. It is possible to make calculations with data (calculate the time interval between individual dates).
Date data type
DATA TYPES
5) Monetary - almost the same as the numeric type, but with a fixed number of decimal places and a currency sign.
DATA TYPES
6) Boolean fields - are used to store data that can take one of two possible values: True / Lie , Yes / No or On off. In this case, the values True , Yes And On True, and the values Lie , No And Off equivalent boolean value False .
DATA TYPES
7) OLE object fields - allows you to store images and other binary data (for example, spreadsheet Microsoft Excel, document Microsoft Word , drawing, sound recording).
DATA TYPES
DATA TYPES
9) Field MEMO - text fields arbitrary lengths can contain the same data types as simple text fields. The difference between these fields is that the field size MEMO is not limited to 255 characters, but can contain up to 65535 characters.
DATA TYPES
10) Lookup wizard data type - is designed to create a field that offers a selection of values from a drop-down list containing a set of constant values or values from another table.
TYPES OF FIELDS IN RELATIONAL DATABASES
Field type defines the set of values that a given field can take on in different records
numerical
symbolic
date Time
logical
These fields are designed to store calendar dates and time of day data
Date: "day/month/year"
Time watch : minutes"
The field value can only be a number
These fields store character sequences (words, texts, etc.)
Database "Electives"
Database "Time Accounting"
Last name, first name
Ivanov Petya
Petrov Vanya
Time tracking
Sidorov Vitya
Time spent
numerical
symbolic
logical
Access 2007 objects
Tables- main database objects.
Requests- these are special structures designed to process database data.
Forms- these are objects with the help of which new data is entered into the database or existing data is viewed.
Reports- these are “vice versa” forms. With their help, data is output to the printer in a convenient and visual form.
Macros - This macro commands.
Modules are software procedures written in Visual Basic.
Modes of operation with Access 2007
There are two different modes when working with any database: design - using the constructor
And operational(custom) – using a wizard.
Database (DB) - Database (DB) is a collection, in a certain way
organized information for some
topic.
For example:
Library book collection database;
Database of the institution's personnel;
Database of legislative acts in the region
criminal law;
Database of modern pop songs.
Database classification.
Databases are classified according to different criteria:by the nature of the stored database information
divided into factual and
documentary;
According to the method of storing data, databases are divided into
centralized and distributed;
according to the structure of the database organization
classified into relational
network and hierarchical.
In factual databases
contained brief information aboutdescribed objects, presented with
strictly defined format.
Examples:
1. In the library database about each book
The following information is stored: year
edition, author, title, etc.
2. Questionnaires are stored in the HR department database
employee data: full name, year of birth and
etc.
Documentary DB
contains extensive information aboutvarious types: text, graphic,
sound, multimedia.
Examples:
1. in the database of laws - the texts of the laws themselves,
2. in the pop song database – texts and notes
songs, biography of authors, information about
poets, composers and performers,
sound and video clips.
Information system
– this is the totality of the database and the entire complexhardware and software for it
storage, modification and retrieval
information to interact with
user.
Examples:
1. ticket sales systems
passenger trains and airplanes.
2. WWW is a global information platform
system.
Database (DB)
is a structured collectioninterconnected data within
some subject area,
designed for long term
storage in external memory
computer and permanent
applications. Can be used to store the database
to one computer, such a database
called centralized.
If different parts of the same database
stored on multiple computers
interconnected by a network, then
such a database is called
distributed database.
A database is called hierarchical,
in which information is organizedas follows: one element
records are considered the main one, the rest
subordinates.
Examples: file systemFamily tree
The network is called a database,
in which to the vertical connectionshorizontal connections are added.
Relational databases
- databases with tabular formorganizing information.
A relational database consists of one or
several interrelated
two-dimensional tables.
Examples:
In relational (tabular) databases, a row is called a record, and a column is called a field.
Fields are different characteristics(sometimes called attributes) of an object.
Field values in one line
refer to the same object.
Different fields have different names.
Example 1. Organization of information in a single-table database “Cinema repertoire for the week.”
Cinemamovie
Russia
Adventures 11.00
Pinocchio
Titanic
13.00
3.00
Russia
Russia
Titanic
Star
landing
17.00
21.00
20.00
15.00
World
Wait for it!
11.00
3.00
World
Titanic
13.00
15.00
World
Thief
17.00
10.00
Russia
time
price
15.00
Primary (master) key of the database
is a field or group of fields, withwith which you can clearly
identify the entry. Meaning
primary key shouldn't
repeat for different records. IN
in the example discussed above
as the primary key of the database you need
take field group
cinema + time.
Field type
defines a set of values,which this can take
field in various records.
In relational databases
There are four main types used
fields: numeric, character,
date, logical Numeric types have fields whose values
can only be numbers. Numbers can be
whole and real.
Character types have fields that will
character sequences are stored
(words, texts, codes, etc.).
The date type has fields containing
calendar dates in various forms.
The boolean type corresponds to the field that
can take only two values:
“yes” - “no” or “true” - “false”.
Example 2. Describe the structure of the database “Cinema repertoire for a week.”
To describe a structure means to indicate everythingtable fields and their characteristics.
field name
type
width
cinema
symbolic
15
movie
symbolic
25
time
numerical
5
2
price
numerical
5
2
quantity
decimal
signs
Example 3. Given a fragment of a relational database: Specify the main key; describe the characteristics of the fields.
Number Datedeparture flight
2156
Type
Price
plane ticket
10.23.08 TU-154
4564.50
Availability
tickets
Yes
Main key: flight number + departure date. Field descriptions:
field nametype
width
Flight number
numerical
4
departure date
date
Aircraft type
symbolic
10
Ticket price
numerical
5
Availability
tickets
logical
Qty
decimal
signs
2
Example 4. Convert to tabular form the hierarchical structure shown in Fig.
Example 4. Convert hierarchical to tabular formstructure shown in Fig.
department
faculty
University
general physics
Physical
PSU
theoretical physics
Physical
PSU
organic chemistry
Chemical
PSU
inorganic chemistry
Chemical
PSU
botanists
Biological
PSU
zoology
biological
PSU
Task No. 1
Convertbelow
information to
tabular view,
defining the table name and
name of each field:
Olya, Petya, 13, singing, 14,
basketball, Vasya, Katya,
13, hockey, basketball,
football, 15.11, Kolya, 11,
dancing, Seryozha.
Table title: Employment in
mugs
Name
Age circle
Olya
13
Singing
Peter
14
Basketball
Vasya
13
Hockey
Kate
15
Basketball
Kolya
11
Football
Serezha 11
dancing
Do it yourself:
1.The “Patient” database table contains
fields: last name, first name, patronymic, date
birth, plot number, address,
presence of chronic diseases, date
last visit to the doctor.
Determine the type and width of each
Slide 1
Slide 2
Databases are used to store and search large amounts of information. Database examples: Notebook, dictionaries, reference books, encyclopedias. Database – structural information model DATABASE (DB) – a set of stored interconnected data, organized according to certain rules Kolesova Zh. V.Slide 3
Based on the nature of the information stored, databases are divided into: Factual databases contain brief information about the objects being described, presented in a strictly defined format. For example, a library database stores bibliographic information about each book: year of publication, author, title, etc. Documentary databases contain documents (information) of the book itself. different types: text, graphic, sound, multimedia (for example, various reference books, dictionaries) Kolesova Zh. V.Slide 4
EXAMPLES OF DATABASES: DB of the library's book collection; DB of the institution's personnel. DB of legislative acts in the field of criminal law; Database of modern rock music. factual documentary The database itself includes only information (DB - “information warehouse”) Kolesova Zh.V.Slide 5
Based on the storage method, databases are divided into Centralized database - the database is stored on one computer Distributed database - different parts of one database are stored on many computers interconnected by a network Example: information in Internet networks, united WWW web Kolesova Zh. V.Slide 6
According to the structure of organization, databases are divided into RELATIONAL NON-RELATIONAL HIERARCHICAL NETWORK A relational database (from the English word relation) is a database containing information organized in the form of rectangular tables interconnected. Such a table is called a relation. A hierarchical table is called a database in which the information is ordered as follows: one element of the record is considered the main one, the rest are considered subordinates. A hierarchical database is formed by a file system on disk, a family tree. A network database is called a database in which horizontal connections are added to the vertical hierarchical connections. Kolesova Zh. V.Slide 7
DB STRUCTURE Each table must have its own name. A record is a table row. A field is a table column. Table – information model real system. A record contains information about one specific object. The field contains certain characteristics of objects. The main element of the database is the entry of Zh. V. Kolesov.Slide 8
Table name field record The main key is a field or a set of fields that uniquely identifies a record in the table Zh. V. Kolesov.