This is from laboratory robots access. From laboratory work on the topic of control systems. Theory: creation and retrieval of data from databases


ACCESS"

in the course "Informatics"

Student of group C-12:

Vikladach:

Moscow 2008 r.

The theoretical part.

1)Databases and database management systems (DBMS)

Databases (DB) are intended for saving on a computer effective wiki great thanks for the great information:

about books, magazines and newspapers in libraries,

about goods in stores and products in factories,

about exhibits in museums and diverse collections,

about all defense companies, enterprises and installations,

about all flights of pilots at airports, about the availability of tickets and the availability of the place,

about the schedule of all trains from stations, about the availability of tickets and the availability of the place,

about all cars registered in the DIBDR (DAI), including stolen ones,

about all tours, including “hot” ones, from travel agencies and travel agencies,

about the weather in any part of the Earth now and a lot of fates, etc.

p align="justify"> For working with Databases, applied programs are used, called DBMS - Database Management Systems. The most popular DBMSє ACCESS program from Microsoft.

2)All DBMS, including DBMSACCESSallow:

1. Quickly create the Database, add and change them.

2. Shvidko knows the songs you need from the database.

3. Sort the data in the database by different characters (for example, by alphabet).

4. Display on the screen a subset of data following your queries that meet the specified criterion.

5. Construct statistical calculations over the database data for analysis and decision making.

6. Organize data, select for specific purposes, then prepare conclusions, so on.

In the simplest form, a database is an electronic table, which is similar to an Excel electronic table.

Yak i Excel tables, database tables are composed of columns and rows. For this reason, items in the database are called " FIELDS"And the stink of specific names (names" POLIY"), and not letters of the Latin alphabet, as they are in Excel tables. There can be up to 255 such columns, i.e. fields in database tables (like Excel).

Each row in a database table is called " BY RECORDING It has its own serial number, the same as the row in the Excel spreadsheet. There are so many rows that the records in the database tables are practically not separated.

All " RECORDS"(rows) in the database table contain the same type of information in each row, corresponding to the name" FIELDS". This is the main function of the database table as an Excel spreadsheet. For example, at the column with the names of the fields " PIB" For all entries (that is, for all rows), you will add specific nicknames of people;

at the end of the field GODR For all records (that is, for all rows) You will learn the specific origins of the students’ birth;

at the end of the field NG For all records (and for all rows) please provide specific student group numbers.

The database can include not one, but many linked tables.

Cream Table– the main object of the Database - the database can contain other objects, namely:

Form(one piece of sprat). A form is a method of displaying data from a database table on the screen, making it easy to enter data and view it.

Zapit(One chi kilka). Query is a method of selecting and displaying data from the database table based on the criteria you specify.

Sounds(One chi kilka). This is a way to select and display other data from the database table in order to see what kind of needs you need.

Macro(One chi kilka). A macro is a set of macro commands that can be used to associate specific operations with the database, for example, other sounds.

Module(One chi kilka). The module is an Access Basic program that has a lot of non-trivial tasks in the database.

All these objects that were created are included in the Database file, which can be expanded . mdb.

3)The work of creating a rich tabular database includes 4 stages:

1st stage. Designing the database structure, then assigning the number of Tables, their assignment to the warehouse.

2nd stage. Constructed Database Table, i.e. the designation of Fields, their types and authorities, each of the Tables.

3rd stage. Creation of database schemas, i.e. identification and installation of links between database tables.

4th stage. Entering data from an empty database table.

Design of the database structure – 1st stage

Database structure design- This is the value of the table in the database, which is assigned to the warehouse. With you, this work has already been worked out, the fragments have resulted in 6 tables ("Student", "Group", "Department", "Vivcheniya", "Success" and "Vykladachi"), necessary for the creation of the Database of the Institute, which allows the admission of students , form groups from several departments, and also ensure the success of students.

Constructing an empty database table - another stage

Constructing a DB table– the definition of the Names of Fields in the skin Table and the identification of the Types of data and the powers of the skin Fields. There are a number of methods (modes) for constructing a table:

Design Mode

Table mode,

Maistra mode table.

Each of these methods has its advantages and disadvantages. Try all three methods to construct a table for the database you created.

The first part of this allowance has created a database with the tables “Student” and “Subject”.

4)Creation of data base diagrams – stage 3

Creating a database schema means identifying links between tables that go into a given database, or more precisely, between specific fields of that table.

If the tables are linked, changes in one of them are automatically transferred to the other. The main significance of the table is to disable the duplication of records in the database.

The practical part.

Workshop laboratory robots folds with 33 right: viconano -33

I've added Access elements like...

Creation of a simple data base:

Target" or the command "Stock Width" in the "Format" menu:

Creation and vikoristannya "Written with a parameter":

Details of the new object - "Formi":

Creation and development of a new database object - "Zvitu":

https://pandia.ru/text/80/040/images/image006_30.jpg" width="623" height="499 src=">

Select form type:

Independent robot-zalik.

https://pandia.ru/text/80/040/images/image012_16.jpg" width="623" height="499 src=">

https://pandia.ru/text/80/040/images/image014_11.jpg" width="623" height="499">

Hours spent on laboratory work: 140 hours, incl.

Workshop: 80 xv;

Documentation: 45 xv;

Design goes up to DBMSAccess2000 in Constructor mode

Meta robots: how to create practical skills zvіtіv with charges in the rowsі sexy pouches in mode designer, registration of calls, forward view zvіtіv.

Setting up the plant:

To ensure the availability of any trading organization with information about the products and their customers, as well as to analyze these data and their data, it is necessary to create a report that contains information about the hiring of goods that are included in the procurement process, the number of units of goods in each batch, the price per unit of the product, the price of the batch and the final price of the purchase, as presented in Table 6.1.

Table 6.1

Vidomosti about the contract

Zavdannya 6.1. Create a soundAgreement , to provide information about the name of the product, its quantity, price per unit, batch size of the product and the backend quality of the product, in the constructor mode the calls and on the stand are asked SQLVartist .

Open the database file, creations from the laboratory robot 4.

 Go to tab Call and click on the button Creativity.

The modes for creating a new world will appear on the screen (division small 5.1 – laboratory robot 5.)

Vibrate mode Constructor and how the data is stored - written in SQL Vartist .

Add Heading і Note , having crowned the team Type/Title/Note.

Add Headers and footers I'm calling, having signed the command View/Header/Footer.

Add Elements panel , having crowned the team View/Elements Panel.

Add Dzherelo danikh (div. Fig. 6.1), having issued the command View/ Dzherelo data.

Rice. 6.1. Dzherelo danikh zvitu

The designer's window is visible, pointing to Fig. 6.2.

Rice. 6.2. Designer's window

Click on the button ( Written) and place it in the area Heading: text Agreement.

See all data fields Vartist , Vikonavshi clicking on the title of the dzherel.

Place the mouse cursor on the view of the data field, pressing the left mouse button, move it to the center Data areas .

See field signatures in the target Name ,Zamovleno , Price , Variety_parties , pressing the key Shift.

Verify field signatures.

 See the mouse click Header I call.

Paste the views into the clipboard with field signatures.

 Place the field signatures in one row behind the next mouse.

See field signatures by pressing the key Shift.

 Create horizontal and vertical intervals between equal field labels by selecting the command Format/ Horizontal spacing/ Create equalі Format/Vertical spacing/Create equal.

Place fields in Data areas Place them directly under their signatures in one row and align the horizontal and vertical intervals in a similar way.

Click the button on the elements panel.

Painting in the area Note to the voice frame of the new field (div. Fig. 5.7).

Right-click on the signature (left side) of the field, thereby clicking on the contextual menu, and selecting the command Powerful.

A window of authorities will appear on the screen, I will write in Fig. 6.3.

Rice. 6.3. I’ll write a letter to the authorities

Enter on deposit all in the row Subscription name AT ONCE .

Click on the power of the field Vilniy (right side of the field) in a similar way.

Enter on deposit Dani in the row Dani formula that begins with the sign one :

= Sum([vart_st]![vart_st_party])

Press the key Enter.

Close the window of the authorities of the field.

Add write from the elements panel to the area Note to the voice and enter text This is about the promise for the year 2004 .

Press the key Enter.

Viconati team Insert/Side numbers.

Set the following parameters:

StorinkaNhM

footer

Centered

Display number on the first page

Click on the button OK.

Set the skin area to all elements, background color and font color using additional buttons on the toolbar.

Designer's window Agreement matime viglyad, serving on rice. 6.4.

Rice. 6.4. Designer's window Agreement

Introduce a forward view of the sound by issuing a command File/Forward view or by clicking on the button on the toolbar.

Subject:

Creation of the data base.

Pobudova tables in the database.

Meta robots:

Learn how to formulate a table structure, enter and edit data, and create a key to link two tables.

Vikonannya roboti:

The main structural document in Accessє table. Skin table in a different way, for example about students. Each table entry contains all the necessary information about a particular database element.

The table is based on each form, response and query.

The database can contain a single table.

    In the open data base window, click on the tab "Tables" press the button "Create."

    Select from the dialog box list "New table" Table creation method:

    Table mode- Creating a table in table mode;

    Constructor- Creating a table using the table designer;

    Meister table- Creation of the table for the help of the master table;

    Import table- Creating a table by importing data from an external file or another database;

    Create a table for help Constructors. See on the website "Constructor" then press "OK".

    In the window, enter the name of the fields, select the type of data and the power of the fields.



At the column Field names field names are specified:

1. Number; 5. Forgery;

2. Nickname; 6. Date of birth;

3. Im'ya; 7. Group;

4. According to Father;

The table has two fields with the same names.

For the skin field that is turned on before recording, enter the following data type.

Data type indicates the type of information that is stored in this field. The data type is selected from the column Data type .

For the rest The data type is set Textovy.

To change the data type, you need to click in one of the middle columns Data type . A list button will appear on the right side of the box; when clicked, a list of available data types will appear.

At the column Description You can enter comments up to the skin area. This operation is not necessary.

The settings of field displays must be deleted sequentially. for skin field First you need to enter the name, then the data type and, if necessary, a comment.

To go to the required middle, you can use the mouse, keyTab and at the end of the entry you can press the key Enter .

Black tricutnik In the column, the marking of evil indicates the row in which the cursor is located.

After selecting all the fields in the table, enter one field for the search string as the primary key field. You are not allowed to enter entries into the table that are repeated.

First key Can buti be designated as a table constructor.

In this table, the primary key field is represented by the field"Number".

What is needed for:

    see field "Number" just put the cursor there;

    press the button Key field on the standard toolbar from the images of the key or

    menu "Edit" "Key Field"

Z

liva vid of this field show up small image key – sign of the primary key field.

Key field

Prepared according to the design specification of the table, the traces will be saved, and the fragments of this basis will form the entire table.

What is needed for:

menu "File" "Save it"

Since the table is saved first, a dialog is displayed on the screen

vikno "Zberezhennya" In which window you need to enter the table nameSTUDENT .



Introducing and editing data in table mode.

In the created table, the data can be entered either directly in the tabular form behind the window or in a specially divided screen form of the user interface. Editing entries and correcting changes in the data in the table is also possible in each of two modes.

To enter data into a table, you must open the database.

In the database window, click on the table name STUDENT .

U

An empty table appears in the window for entering data.

    The names of the table fields are displayed at the top edge of the window.

    The skin field corresponds to the main section of the table.

    Each entry occupies one row in the table.

Entering data into the table is done using the keyboard. After finishing entering data in the remaining field of the Access record move to the first field yourself new entry This will allow you to enter the data.


After entering the data, close the table.

For which you need to enter a double command

menu "File" "Shut it up"

MINISTRY OF EDUCATION AND SCIENCE OF THE RF
MOSCOW STATE INSTITUTE OF ELECTRONICS AND MATHEMATICS

(Technical University)


Department of Computational Technology
from laboratory robot No. 7

« Microsoft Office .

Database management system
ACCESS»

Student: Malofeev S.A. C-12

Vikladach: Voskov L.S.

Moscow 2008 r.


Vikonav theory:

Basics

DATABASES and Database Management Systems (DBMS)
B azi D Database (DB) is designed for saving on a computer and for efficient storage of large amounts of highly sensitive information:


  • about books, magazines and newspapers in libraries,

  • about goods in stores and products in factories,

  • about exhibits in museums and various collections,

  • about all defense companies, enterprises and installations,

  • about all flights of pilots at airports, about the availability of tickets and the availability of the place,

  • about the schedule of all trains from stations, about the availability of tickets and the availability of the place,

  • about all cars registered in the DIBDR (DAI), including stolen ones,

  • about all tours, including “hot” ones, from travel agencies and travel agencies,

  • about the weather in any part of the Earth now there are a lot of fates, etc.
p align="justify"> For working with Databases, applied programs are used, called DBMS - Database Management Systems. The most popular DBMS is the ACCESS program from Microsoft.
All DBMSs, including the ACCESS DBMS, allow:

  1. Shvidko create the Base Data, add and change them.

  2. Shvidko knows the songs you need from the database.

  3. Sort the data in the database by different characters (for example, by alphabet).

  4. Add more data to your questions on the screen, then. that satisfy the given criterion.

  5. Apply statistical calculations to database data for analysis and decision making.

  6. Organize data, select song goals, etc. prepare your conclusions, call soon.
In the simplest form, a database is an electronic table, which is similar to an Excel electronic table. An example of such a database table called " Student You see on the next page.

Like Excel tables, database tables are made up of their columns and rows. For this reason, items in the database are called " FIELDS and the stink of specific names


(names " POLIY"), and not letters of the Latin alphabet, as they are in Excel tables. Such stovpts, then. Database tables can have up to 255 fields (like Excel).

Each row in a database table is called " BY RECORDING It has its own serial number, the same as the row in the Excel spreadsheet. There are so many rows that the records in the database tables are practically not separated.

All " RECORDS"(rows) in the database table contain the same type of information in each row, corresponding to the name" FIELDS". This is the main function of the database table as an Excel spreadsheet. For example, at the column with the names of the fields " PIB"(Watch the database table " Student on the next page) for all entries (that is, for all rows), you will add specific nicknames of people;

at the end of the field GODR For all records (that is, for all rows) You will learn the specific origins of the students’ birth;

at the end of the field NG For all records (and for all rows) please provide specific student group numbers.

The database can include not one, but many linked tables. Cream Table – the main object of the Database - the database can contain other objects, namely:

Form (one piece of sprat). A form is a method of displaying data from a database table on the screen, making it easy to enter data and view it.

Zapit (One chi kilka). Ask - this is the method of selection what you see on the screen data from the database table based on the criteria you specified.

Sounds (One chi kilka). This is a way to choose vivedennya on druk

Macro (One chi kilka). A macro is a set of macro commands that can be used to associate specific operations with the database, for example, other sounds.

Module (One chi kilka). The module is an Access Basic program that has a lot of non-trivial tasks in the database.

All these objects that were created are included in the Database file, which can be expanded . mdb.

Vivchatimete Access 2000 - I'll keep the version Programs, although they are little modified in the Access 97 version, are subject to conflict with both versions.

Qia practical robot Allow you to master all the basic operations of creating, changing and editing databases regardless of the version of Access you are using.


STARTING THE ACCESS DBMS
External appearance of the screen after launch operating system Windows can be different, but there will always be icons for programs, files and folders on the monitor screen (your desktop), and a Start panel at the bottom (the dark icon in the lower part of the screen with the button) Start.

If there is an Access program icon on the screen, install the mouse register on the new mouse and run the calculation program.

If there is no Access program icon on the screen, then by clicking on the Start button, open the main system menu, select the “Programs” item, and then in another menu that automatically opens, click on the “Programs” item. Microsoft Access run the calculation program.

A typical Windows program window opens with the title “Microsoft Access”, and in the new window (Fig. 1):

Microsoft Access dialog box for creating a new database or opening an existing one.

MENU ROW under the header row (File Edit View Insert Service Window Add),

STANDARD TOOLBAR under the row of menus that can be clicked and clicked with the "Toolbars" command from the "View" menu. All tools have a label that appears automatically when the mouse arrow is placed on the tool.

I WILL BECOME a row of programs at the very bottom of the window. It provides accurate information about your database and Access operating mode.

THEORY: CREATION AND VIKORISTANNYA APPLICATIONS AT THE BASES
DANICH
The most effective way to retrieve a data base is to create Zapitiv". Zapit– this is a method of selecting and displaying data from the database table based on the criteria you specify.
THEORY: CREATION AND VIKORISTANYA OF ZVITIV IN DATABASES
Cream " Table", "forms"і" Zapitiv Database file can be stored one or more Zvitiv". "Sounds - this is the method of selection vivedennya on druk From the data from the database table, you can see which one has the necessary stench, then. To you.

THEORY: CREATION OF DATA BASE SCHEME – 3rd STAGE
Creating a database schema means identifying links between tables that go into a given database, or more precisely, between specific fields of that table.

If the tables are linked, changes in one of them are automatically transferred to the other. The main significance of the table is to disable the duplication of records in the database.

It is easiest to understand the replacement of connections with the specific database you are creating. Initial process. The connection diagram of the database is shown in Fig. 3.

At the window Initial process: database press button Data scheme on the toolbar. At the window that has opened Adding a table, select the bookmark Tables she presses the button Add, can be placed near the window Data scheme all tables. Then press the button Shut up. As a result, Data scheme All database tables will be presented Initial process with lists of your fields.

Rice. 3. Database schema Initial process
Links must be installed behind empty tables, otherwise problems with linking authorities may arise.
THEORY: Creation and search of sounds in databases.

Exploration of the rich table of information
When using single-table views, Access allows you to create multiple-table views to ensure that you can display data from multiple mutually related database tables. To display interconnected data to a rich table, the necessary links are automatically installed to the data scheme.

Rich table sounds can accommodate the main part and the part that is turned on, so that the light sound. The skin of these parts will have its own table.

p align="justify"> Many table sounds may also, although fields from different tables may not be affected by the inclusion of additional sounds.

Let's take a look at the table, which has single-valued entries. These tables have one table as the head table, and the other table is subordinate. The specificity of such a result depends on the choice of the main and subtable tables as the basis for the result.


Right 31. Rich table with the main part based on the head table



Rice. 19. Layout of the information about the departments
Let's take a look at the technology of creating a rich table of information on the application table DEPARTMENT and Vikladac. It is necessary to prepare a report that contains information about departments, including lists of depositors.


    Layout. It is acceptable that the layout for listing the lists of depositors by department is due to the mother's appearance, pointing to Fig. 19. Before designing the layout, you are sent to enter data on each department, including the name, code and telephone number, as well as the name and photograph of the manager. This data is located in the table DEPARTMENT.

  1. At the tabular part of the skin department it is necessary to display a list of depositors. Such data can be removed from the table Vikladach. The proponation layout allows the table to be selected as the main table from this table DEPARTMENT, and the table REPORTVATEL- Here is the data for the simple form with the list of depositors.

Vikonav right:

Right 1. Creating a simple database as one table

To the right 2. Changing the width of the columns using the "target" or the command "Width of columns" in the "Format" menu

To the right 3. “Insert” and “Delete” fields, as well as change the order of directing “Fields” (stovpts) in the table.

Right 4. Inserting a new Field with “photos” of citizens

Right 5. Entering new data in the table, editing and editing records

Right 6. Sorting data from the database table

Right 7. Search for records one by one in large database tables and search by replacing a specific Field instead

To the right 8. Creation and creation of a new database object – “Zapitu”.

To the right 9. Creation and vikoristannya "Application with a parameter."

Right 10. Creation of a new object in the Database - "Forms".

Right 11. Creation and creation of a new database object - “Zvitu”.

To the right 12. Create a sound with a parameter based on a request with a parameter

To the right 13. Designing the table "Group" as "Table"

To the right 14. Design of the "Exhibitors" table in the "Meister" mode

To the right 15. Design of the table "Department" as "Constructor"

Right 16. Constructed table "Vivcheniya" and "Success" in the "Constructor" mode


Right 17. Establishing links between database tables.

To the right 18. See the link between tables

To the right 19. Entering data directly in the tables “Speciality”, “Visitors” and “Groups”

Right 20. Shaping in the “Design” mode

Right 21. Preparation for creation of the warehouse form “List of group students”

To the right 22. Create a table for two for the help of the master

Right 23. Select form type

To the right 24. Assignment of the name of the form and its appearance

To the right 25. Editing the form as a designer

Right 26. Editing the light form

Right 27. Switch to format mode and table view

Right 28. Rich table with the main part based on the head table

To the right 29. Creation of the main part of the world

To the right 30. Creation of the auto link.

Right 31. Additional examination of a subordinate officer

Right 32. Switch on low light.


About the control room:
Database:

Database storage table.

Creation of bonds in the database:

Access is one of the database management systems (DBMS). A database (DB) stores a collection of data and objects that perform specific tasks. It helps us organize information and allows us to quickly select. This could be any kind of information that is saved on the computer’s disk: symbols, words, files, small items, etc. Methods for entering and storing data determine the structure of the data base.

All database objects data Access In addition to macros and modules, you can display them in two modes: table mode and designer mode. Design mode in Access DBMS Designer mode provides great capabilities for creating tables, records, forms and data. For example, in this mode you can set the width of the skin field in order to make the object more compact. Table mode in the Access DBMS In the table mode, you can add, edit, review, or continue other work with table data. Each row of the table is marked with a record, each row is a field.

Created table in design mode Having opened the table in “Design” mode, you can do the following with it: enter field names, set the type and authority of the created table, change field characteristics, add fields, delete fields. The window consists of two parts. The upper part is called the blank. On the form you can enter a field name, type and description. The authorities of the field specify the following characteristics of the field, such as: size, format, signature, thickness of the field. If the field is key, then the authorities indicate that it is indexed.

Creating a table in master mode After going through all the stages of creating a table, in master mode you will see:

Establishing links in the creation of a table to simplify the design of rich table forms, queries and answers can be linked. This connection is supported by a data schema, which is assigned to the information-logical model of the subject area.

Ask the current DBMS to instruct you forgive me at my own expense Search and filter the data vikoristavuyutsya manually, and the hardest way - wash down. In addition, you can change calculations, update data in tables, add or delete records. In this case, the results of the search are presented in a manually visible form - in the form of a table. The query can be made using an additional time table created using another query. You can enter: select, create table, update, add, delete.

The creation of a query is a query for a selection, i.e., it selects data from mutually related tables and other queries. As a result, you will have a table that is open until the request is closed. The table with the results is powered by vikoristovvati for robots with the data; the table is powered for any reason;

When you write to the created table, you write to the created table, the basis for entering a selection, and then changing the remaining result of the query is saved in the new table.

Requesting to delete will ensure that you receive multiple records from one or more linked tables. Nutrition is irrevocable, so you need to get a copy of the table that is being processed.

The update query allows you to make changes to a group of records that are selected for an additional selection query, leading to a new table created by the query.

Request for update When the request is completed, dialog boxes will appear asking you to enter the necessary parameters.

Grouping data After selecting the command Group Operations in the contextual menu, the form will display the row “Group Operation” in the list special functions you need to select the one you need.

Cross-request This request is created by the assistant Master, which is launched by selecting an additional command in the “New request” dialog box. The master creates a table in which the left side creates row headings from the value of one of the table fields, the top row creates column headings from the value of another table field, and bags are placed on the crossbar of the rows and columns and the values ​​that are calculated after the values ​​of the third field. To separate pouch values, grouping is carried out by fields. In addition, the overflow can be applied to creations with the help of the Designer. In this case, a signal is created for the selection, and then it turns into an overflow signal.

Form The basis of the dialogue between the developer and the database is the form, the design of which is designated by the developer. In this case, it is indicated which table and instead of which fields need to be displayed, such as graphic elements The culprits are included in the form.

Creation in the designer The working field of the designer is a form, which consists of three areas: “Form header”, “Data area” and “Form notes”. To place the required objects in areas, it is necessary to customize the elements of the toolbars. After dragging the necessary fields from the table into the “Data Area”, forming and enabling the form to control the form in the “Form Builder” dialog box will appear on the side.

Creating buttons on a form First, on the toolbar, you need to select the “Button” object and place it on the form. Then follow the prompts on the screen and create the desired button.

Completed design The final operation of form design is storage in the database warehouse. To review the form, you need to open the database, click on the “Forms” tab, select the necessary option and select the Open command. As a result, the required form will appear on the screen.

Rich-sided forms Features MS Access allows you to design rich-sided forms, like arranging a number of tabs. Before the creation of this form, a power supply was designed, which became the basis of the creation of the form. This form is vibrated with the help of the Designer.

During the course of this laboratory work, skills were acquired and skills in working with the MS Access DBMS were acquired. It was possible to create different modes and edit tables, queries, forms and sounds. The work was carried out to enhance the use of a computer and to reveal the capabilities of using Microsoft Access database management systems, which may benefit future professionals, as well as future professionals, for simplified systematization ii robots with data.