Development of program databases. Review of programs for creating databases In order for the button to work, you need to enter OnClick in the Observer

Almost any organization has its own database. Well, there are sites that use them to make it easier and simpler to deal with information. It’s easy, they allow you to work without any problems, quickly find the required information, and then simply create order with any information.

Most often, their creations are carried out by programs, and this is a complex process that begins with most initial deposits. There are also a lot of lessons, courses and sets of programs for creating databases. Software for mining databases is very powerful, and you can easily get lost. This article describes the main programs for developing databases.

About SQL

SQL is a general programming tool used for creating databases. Once you install it on your computer and start creating the database, it won’t be very easy. This is due to the fact that SQL itself does not require a single graphical shell, and in order to access the database it is necessary to force it through command row. For these reasons, various programs have appeared to simplify the development of databases. However, it’s still a good idea to learn the basics of this language. Everyone needs to start earning money, but the program is not working correctly.

Microsoft Access

This program for creating databases definitely knows a lot. Aje won't go to the package Microsoft program Office. This program is one of the easiest to master and also know the language SQL programming there is practically no need there. You can even more importantly, what kind of application is written, and the program itself is stored in SQL.

Make sure the programs are up to date. Until now, the data base of the impersonal organization of the formation itself is for additional help. Microsoft Access. In fact, the program itself is quite easy, with an intuitively clear interface. Moreover, the basics of working in Access are taught at school and in early college courses!

PhpMyAdmin

Access, of course, is a good program, but if you need a database for the site, it won’t work. Then PhpMyAdmin will come to help. Tse duzhe Corisna program for the creation of the base data. Installation on a computer takes up to an hour, and during installation it is easy to do something wrong and inappropriate. Therefore, when installing programs for creating databases, you must carefully follow the instructions. Another plus of PhpMyAdmin is that you can deny access to it via the Internet from the site! For example, you have a website that runs on WordPress. Vіn matima database. І because you have a website on yakomus good hosting, then, most importantly, the work with the databases can be accessed through PhpMyAdmin, and you can still deny access through the hosting control panel.

Another program for creating data bases. There is no cost, but there is a paid version with improved options. This program makes it easy to make connections with tables and just do it manually. Another advantage is that you can display the database in a graphical form. Most people who work with databases every hour give the program its advantage. In principle, PhpMyAdmin does not compromise on its capabilities, but it is still better suited for working with database sites.

This article reviewed the main programs for creating databases. In fact, it’s up to you to choose a tool for yourself, but if you’re just getting used to it and want to learn this area, it’s recommended to use MySQL WorkBench. Once you learn the basics of SQL, you will no longer have to worry about how to practice, or even ask again. Of course, those who have created a database in one program can open it through other software, which is also used for working with a database. When creating software with a database, you cannot do without this knowledge. Moreover, once you have mastered SQL, you can create your own software for developing and editing databases.

It’s easy to send your money to the robot to the base. Vikorist the form below

Students, post-graduate students, young people, who have a strong knowledge base in their new job, will be even more grateful to you.

Posted on http://www.allbest.ru/

Enter

3. Data organization models

4. Relational databases

6. Information model

7. Logical model

8. Table structure

12. Creation table

16. Creation of the stars

17. Program listing

Visnovok

List of references

Enter

In order to make informed and effective decisions in industrial activity, in managing the economy and in politics, the current representative is responsible for using computers and ways to recover, save, Enter and process data, presenting the results in the form of official documents. That’s why it’s so important to work with databases.

A database is an organized structure designed to save information. Current databases store both data and information.

Talking about Delphi is like talking about the middleware Swedish door addendums. This is the technology of visual programming, that is. Koristuvach draws up his new program and collects the results of his work even before launching the program itself. In principle, the process of writing a program itself is divided into two parts. The first one is that the program places the necessary elements in its ordered window, positions, sets the required dimensions, and changes the authorities. The other is the power of writing the program code, a description of the power of the elements available only during the working hours of the program, a description of the reaction to the action, the appearance of a window, pressing a button, etc. Change this power in the object inspector (the so-called power monitor of the selected element). This change will automatically update or modify the program code.

This is a great plus for visual programming technology. Creating or modifying your software product, without knowing or extinguishing respect for the power of the program element, but vikoryst only necessary, write a ready-made working product, which at the same time acts on equal terms Story written in a non-visual editor.

We are faced with the task of compiling a database to store data about the initial plan for the initial process. Having populated the database, it is necessary to conduct a selection analysis using Sql queries.

database information table program

1. Additional benefits until the development of database add-ons

The database may be revengeful

a. Tables, saving data, at least 3 tables. The skin table must contain at least 10 entries.

b. Forms for manual review, entry, editing and searching of data, forming and modification of queries. There will be explanations and hints on the confession form. When the form fields for the selected sets are filled in, you will be able to select a value from the list. Forms have been linked to the extent possible to optimize post navigation. The form contains, as far as possible, as much information as possible for the customer. Read more about the semantic pardons, so I can’t blame you.

c. Find out what to do with all tables, forms, ask

d. Menu for access to different database objects

e. Dovidku, what to take revenge povniy description zavdannya

2. To program the database, it is necessary to study the additional literature in SQL language, DELPHI programming system.

3. Overflow and methods of independently solving tasks

1. Analysis of the setting of the task and subject area.

2. Information design, organization of information objects, domains, attributes, links, folding information model.

3. More logical design, priming of base joints, normalization.

4. Design of Sql queries.

5. Programming the structure and hidden functions of the database.

6. Design of a database in a software environment.

7. Exploring the program interface.

8. Drawing up an explanatory note.

4. Criteria for assessing competencies removed from course work

The criteria will be completed by the end of the work, indicated in Table 1. The grade for the course work is indicated behind the average grade.

Table 1. Competency assessment

Name of competence

Object of evaluation

You can understand and follow them

Removing results (DB) (obsessions, structure, relevance to task)

Letter communication

I will put in the notes explanations, clarity, useful structure, type of assignment.

Know the elements of the DELPHI programming system

Components of the database supplement, supply options for the implementation of the database

Know and understand the elements of database technology

Nutritional considerations related to designs and test formats

Increase the demand for stagnant database technology

Entering an explanatory note

Work planning, work organization

Wikonian terms

Self-reliance

Perelik and ways of independently releasing orders

Sleep communication

Public database guard

Data before analysis, synthesis

Infological, logical database model

Pragnenya yakosti result

The vibrancy of their work, the ergonomic displays, the vibrancy of functioning.

The ability to generate new ideas

The interface and additional functions of the database are not provided by the manufacturer.

Datafulness before managing (soundingly) information

The number of information resources found and sourced from course work, number of consultants

2. Basic concepts and classification of database management systems

A database (DB) is a collection of structured data that is stored in the memory of a computing system and displays the state of objects and their interconnections in the subject area that is being viewed.

The logical structure of the data, like the base, is called a data presentation model. The main models of data manifestation (data models) include hierarchical, boundary, relational.

A database management system (DBMS) is a complex of basic and software features for creating, maintaining and maintaining a database with a large number of components. The DBMS is divided according to the data model. Thus, DBMSs that are based on a data-based relational data model are called relational DBMSs.

To work with a database, use a DBMS. However, if it is necessary to ensure the ease of use of the database by unskilled users, or the DBMS interface does not support the users, additional additions may be required. Their creation will require programming. The add-on is a program or a complex of programs that ensures the automation of any application task. Programs can be built into the middle or the middle of a DBMS - using an additional programming system that provides access to the database, for example, Delphi or C++ Wuildeg. Programs that are part of the DBMS are often called DBMS add-ons, and add-ons that are part of the DBMS are called external add-ons.

The data dictionary is a database subsystem designed for the centralized storage of information about data structures, the interconnection of database files one by one, the type of data and the format of their submission, the ownership of data to correspondents, the protection of data and the separation of access, etc. .

p align="justify"> Information systems based on a virtual database must function in a client-server architecture. And here the database is located on a computer server, and there is access to it.

The server of a personal resource in a computer network is the computer (program) that hosts this resource, and the client is the computer (program) that hosts this resource. As a computer network resource, there can be, for example, databases, files, friend services, mail services.

Advantages of the organization information system on the client-server architecture there is further connection between centralized saving, maintenance and collective access to the outside corporate information with individual work of clerks

Due to the basic principle of client-server architecture, data is processed primarily on the server. Koristuvach or the program can formulate queries to reach the database server using SQL language instructions. The database server will search and retrieve the required data, which is then transmitted to the client’s computer. The advantage of this approach, equal to the previous one, is the significantly smaller amount of data that is transmitted.

The following types of DBMS are available:

* full-function DBMS;

* Database servers;

* Assemble the software for robots from the database.

Full-function DBMS and traditional DBMS. These include dBase IV, Microsoft Access, Microsoft FoxPro and others.

Database servers are used to organize data processing centers within the EOM framework. Database servers ensure processing of requests from client programs using additional SQL statements. Database server applications include: Microsoft SQL Server, Inter Base and others.

The role of client programs may include DBMS, spreadsheets, text processors, programs by e-mail ta in.

Assignments for developing robotic programs from the database can be used to create the following programs:

* client programs;

* database servers and other components;

* Dodatkiv koristuvacha.

Depending on the nature of the DBMS, it can be divided into multi-source (industrial) and local (personal).

Promislov, DBMS is the software basis for the development of automated management systems for large economic objects. Promislovi DBMS may be satisfied let's step on the vimogs:

* Possibility of organizing parallel work for rich workers;

* scalability;

* portability across different hardware software platforms;

* resistance to failures of various kinds, including the presence of a rich information backup system that is saved;

* data security and a structured system for access to them.

Personal DBMS is a security program that is oriented towards the highest demands of a local customer service provider or a small group of customer service providers and is intended for local personal computer. This is explained by another name - tabletop. The initial characteristics of desktop systems are:

* remarkable ease of use, which allows you to create practical accessories on their basis;

* To ensure maximum sharing of hardware resources.

According to the data model, DBMSs are divided into hierarchical, boundary, relational, object-oriented, and others. DBMS engines can simultaneously support a number of data models.

To work with data that is stored in the database, the following types of language are used:

*language description of data - Visokorivneva non-procedural language
declarative type, assignments for describing logical
data structures

* Data manipulation is a comprehensive design that ensures the execution of basic operations with data: entering, modifying and selecting data by queries.

The names of languages ​​in different DBMSs may vary depending on the name. The greatest expansion has occurred in two standardized languages: QBE - query-by-word language and SQL - structured query language. QBE mainly involves the power of our data manipulation, SQL combines the power of both types.

The DBMS implements the following basic functions low level:

* data management external memory;

* managing RAM buffers;

* Transaction management;

* keeping a log of changes in the database;

* ensuring the integrity and security of the database.

Implementation of the data management function in external memory will ensure the organization of resource management file system OS.

The need to buffer data is due to the fact that the amount of RAM required is less than that of external memory. Buffers are areas of RAM designed to speed up the exchange between external and RAM. The buffers temporarily store fragments of the database, the data from which is transferred to the database when processed to the DBMS or is planned to be written to the database after processing.

The transaction mechanism is modified in the DBMS to maintain the integrity of the data in the database. A transaction is a sequence of operations on database data that is carried out by the DBMS until completion. For any reason (failure of possession, amends in security software, including the addition), the transaction is left incomplete and is canceled.

Transactions involve three main powers:

* atomicity (all operations that are included in a transaction are included, or else);

* Serializability (daily mutual inflow of transactions signed at the same time);

* Durability (do not cause a system crash until the results of a committed transaction are lost).

The application of a transaction is the operation of transferring money from one account to another in the banking system. Start by taking money from one bank, then spend money on another bank. If one operation does not complete successfully, the result of the operation will be incorrect and the balance of the operation will be destroyed.

The change log is maintained by the DBMS to ensure the reliability of saving data from the database in the event of hardware or software failures.

Ensuring the integrity of the database is essential for the successful functioning of the database, especially for them Merezhny vikoristanni. The integrity of the database is the power of the database, which means that it contains complete, comprehensive and adequately reflects the subject area of ​​information. The entire database system is described to help maintain the integrity of the minds that are responsible for satisfying the data that is stored in the database.

Security is achieved in the DBMS by encrypting data, password guard, ensuring peer access to the database and surrounding elements (tables, forms, responses, etc.).

3. Data organization models

In the hierarchical model, entity-objects and domain data are represented by sets of data that form a tree-like (hierarchical) structure. The hierarchical model of data was historically the first. On this basis, from the 60s to the beginning of the 70s, the first professional DBMSs were fragmented.

The main respect for the exchange of integrity in the hierarchical model lies in the importance of sending messages between ancestors and sites in compliance with the basic rule: no site can be founded without a father.

The Merezheva data model allows you to display various interconnections of data elements as a consistent graph. The Merezheva database consists of a set of records and a set of connections. There are no special boundaries applied to the molded bond. Since in the hierarchical structures of record-bases there may be only one ancestor record, then in the bounded model of these record-sets there can be a greater number of records-ancestors.

The most important aspect of this data is the feasibility and effective implementation. Compared with the hierarchical model, the hemlock model gives greater flexibility in the sense of permissibility of creating additional connections.

What is important about the data model is the high complexity and rigidity of the database schema generated on its basis, as well as the complexity of its understanding by the average developer. In addition, the moderate model of these relaxations controls the integrity of links through the permissibility of installing additional links between records.

Systems based on the hemstone model have not become widely used in practice.

The relational data model was introduced by IBM computer scientist Edgar Codd and is based on the concept of a table (relation).

There are no elements called tuples. The scientific form of the manifestation of the blue table is a two-dimensional table.

Using one table, you can manually describe the simplest type of connections between the data, and also: the division of one object, information about which is stored in the table, into many similar objects, such as indicates a row or record in a table.

The main disadvantages of the relational model are the following: the presence of standard methods for identifying adjacent records and the complexity of the description of hierarchical and interconnected connections.

4. Relational databases

The relational data model (RDM) of a given subject area has a set of data that changes over time. p align="justify"> With the creation of an information system, the collection of entries allows you to save data about objects in the subject area and model connections between them. RMD terms are presented in table. 4.1

Table 4.1. Terminal relational model

Terminrelational code

Equivalent

Statue

Marriage scheme

Row of table column headers (table header)

Table row, record

Substantiality

Description of the authorities of the object

Stovpets, field

No permissible values

attribute

First key

Unique identifier

Cardinality

Number of rows

Number of people

A relational database is a data warehouse that can accommodate a set of two-dimensional tables. The data in the tables is consistent with the following principles:

1. Attribute values ​​may be atomic (in other words,
skin value that fits on the crossbar of the row and column,
may not be divided into a single value).

2. The values ​​of the skin attribute are to blame for one and the same type.

3. The entry in the table is unique.

4. The skin field has unique names.

5. The sequence of fields and records in the table is not correct.

Relation to the most important concepts and a two-dimensional table to accommodate these data.

Entity is an object of some nature, data about which is stored in a database. Data about reality are saved from the relationship.

Attributes are powers that characterize essence. In the table structure, each attribute is called and represents the title of each section of the table.

The key of a relationship is the set of its attributes that uniquely identifies the skins from the relationship tuples. In other words, without the attributes of K, which is the key to relationship, there is the power of uniqueness. The power of the key is coming - not supermundaneity. That is why the power of uniqueness is lost even in its subsets of impersonality.

Skin care always contains a combination of attributes, which can be the key.

Outcomes are possible if there are a number of combinations of attributes, the skin of which uniquely identifies the row tuples. All combinations of attributes have possible relationship keys. Any of the possible keys can be chosen as the first one.

The keys are called upon to be used to achieve the following goals:

Blame duplicates the value of key attributes (other attributes are not accepted);

Ordering of tuples. It is possible to order the increases or changes in the values ​​of all key attributes, as well as mix the order (for one - increase, and for others - change);

Organize the linked table.

It is important to understand the external key. An external key can be defined as a set of attributes of one relationship R2, the values ​​of which are combined with the values ​​of a possible key of another relationship R1.

The attributes of the K2 relationship that become a foreign key are not key for this relationship.

With the help of external keys, connections are made between the tires.

Designing databases of information systems is a labor-intensive task. It forms the basis for formalizing the structure and processes of the subject area, information about how it is transferred to the database. Conceptual and circuit-structural design are separated.

Conceptual design of the IV database is a significant heuristic process. The adequacy of the assumptions made between the information model of the subject area is verified by evidence during the process of functioning of the IV.

Stages of conceptual design:

* Vivcheniya subject galuz for molding zagalnogo manifestation about her;

* vision and analysis of the functions and design of the divided IV;

* The importance of the main objects-essences of the subject area
and the space between them;

* Formalized statements of the subject area.

When designing relational database schemas, the following procedures can be named:

* The meaning of the table and the connections between them;

* Significant transfer of fields, field types, key fields of each table (table schemas), establishment of links between tables through external keys;

* installed indexing for fields in tables;

* development of lists (vocabularies) for fields with pepper plants
danimi;

* establishment of integrity boundaries for tables and connections;

* normalization of the table, correction of the flow of the table and connections. Database design is based on physical and logical levels. Design is physically implemented using a DBMS and is most often automated.

A more logical design lies in the designated number and structure of the table, the development of queries to the database, important documents, the creation of forms for entering and editing data from the database, etc.

One of the most important tasks of logical database design is data structuring. The following approaches to the design of data structures are considered:

* combining information about objects-entities within one table (one relation) with an advanced decomposition into a number of mutual tables based on the procedure for normalizing the values;

* Formulating knowledge about the system (the types of output data and interconnections) was possible before processing the data, using an additional CA5E system to create a ready-made database schema or to point to a ready-made application information system;

* development of system analysis and development of structural models.

5. The intended principle of SQL work

SQL (often referred to as “Sequel”, shortened name from Structured Query Language) symbolizes the Structuring of Language Queries.

SQL is a tool used for processing and reading data stored in a computer database. This is how it makes it possible to effectively create relational data bases and work with them.

The world of databases is becoming increasingly unified, which has necessitated the creation of a standard language that can function across many different types of computer environments. The standard language allows users to know one set of commands that can be used to create, retrieve, change, and transmit information independently of how they are running on a personal computer, an intermediate workstation ii, or on the universal EOM. In an increasingly and increasingly interconnected computer world, koristuvach, with such mine, has a great advantage in the vicoristic and external information in a number of ways in an additional great number of ways.

As the name suggests, SQL is a program that is used to organize the interaction between a client and a database. In fact, SQL only works with relational type databases.

6. Information model

During the creation of the information model, the subject area of ​​the given database “Initial plans, disciplines directly PMI, which are being studied” was analyzed. There were 4 objects visible: Initial plan, Discipline, Student, Worksheet, as well as two additional tables that create connections between students and disciplines, as well as between contributions and disciplines. Object Initial plan may attributes: Creation, Number initial plan. The object of the discipline has the following attributes: Name of the discipline, Code of the discipline, Number of the initial plan, Number of years of lectures, Number of years of practice, Number of years in laboratory work, Whole year, Number of years per week, Form of education news from discipline, Semester of Vivcheniya. The object of the document has attributes: Number of the locker book, PIB. The first object of the Wikladach contains attributes: PIB, Personnel number, Department, Posada, Telephone. Objects Initial plan and Discipline are related to 1:n, objects Discipline and Student are related to settings 1:n, and objects Discipline and Vykladach are related to settings 1:n.

When describing the information model, we used ER-diagrams:

Malyunok 1

7. Logical model

The logical model describes the concepts of the subject area, their interconnections, and the relationship between them and the overlay of the subject area.

A logical data model is a cob of a future data base. This will apply to the terms of information units, rather than being tied to a specific DBMS. Moreover, the logical data model is necessarily expressed in terms of the relational data model itself.

To create a logical model, the skin object was assigned a table with a different set of fields. Since the Objects of the Discipline and the Vykladach are connected 1: n, then an additional table appears to represent the connection between the objects of the Discipline and the Vykladach: Vykladya.

We already have 4 objects and will now have 4 tables for their data, the Initial Plan object is less informational, since the work of the database works with only one initial plan:

If there is a 1:n relationship between the two objects, then we need to provide another table to feed the connections between these tables. This will be the Viklada table (Disciplina-Prepodavatel) and the Vivcha table (Disciplina-Student).

The submitted database can be entered in up to 5 normal forms, because It goes up to the 3rd normal form and the first key is simple. The logical scheme is implemented in Microsoft Access.

Malyunok 2

8. Table structure

The output database consists of 5 tables (the Initial plans table is not included, since only one initial plan is selected).

Decryption of fields:

v Disciplina.db

Ш Nazv - name of the discipline, field type: String;

Ш Kod – unique discipline code: LongInt;

Semestr - the semester in which it is included: String;

Ш KolLeKCh - number of lectures in this discipline: LongInt;

Ш KolPraktCh - number of practices in this discipline: LongInt;

KolLabRabCh - number of lectures in this discipline: LongInt;

Ш VsegoCh - number of years: LongInt;

NomerYP - number of the initial plan in which the discipline is located: LongInt.

v Student.db

Ш NomerStudBileta – student ticket number: LongInt;

Ш FIO – student's nickname: ShortInt;

v Prepodaet.db (Disciplina-Prepodavatel)

TabNomerPrepod - personnel number of the tabulation, which belongs to the sub-discipline: LongInt;

Ш FIO-PIB statement, which contributes to the sub-discipline: String.

v Prepod.db

Ш FIO - PIB bank account: String;

Ш TabelNomerPrepodavatelya - unique personnel number of the bank account: LongInt;

Ш Kafedra – the department for which it operates: String;

Ш Dolshnost - Posada vikladacha: String;

Ш Telefon-contact phone number of the account: String.

v Izuchaet.db(Disciplina-Student)

Ш KodDiscip-discipline code: LongInt;

NomerStudBileta - student ticket number of the student who is studying the discipline: LongInt;

Ш FIO- PIB of the student who is in the major discipline: String;

Ш Rating - the student’s rating in the discipline that is studied: LongInt;.

9. Design of SQL queries

1. Formulate a list of activities and events for each semester.

select Nazv,FormaReport

where Semester=:s and

(Disciplina.FormaOtchet="Zalik" or Disciplina.FormaOtchet="Isspit");

2. Form an examination sheet/basic accessory/from a skin object.

Main information:

select Prepodaet.FIO,

Disciplina.ObsheeKolChVNed,Disciplina.Semestr,Izuchaet.FIO,Izuchaet.

Ocenka,Disciplina.Nazv

from Disciplina, Prepodaet, Izuchaet

where Disciplina.KodDiscip=Prepodaet.KodDiscip

and (Disciplina.FormaOtchet="Is asleep" or Disciplina.FormaOtchet="Zalik")

Additional information (for students who are 2):

select Disciplina.Nazv,Prepodaet.FIO,

Disciplina.ObsheeKolChVNed,Izuchaet.FIO,Disciplina.Semestr,Izuchaet.Ocenka

from Izuchaet, Disciplina, Prepodaet

where Izuchaet.Evaluation="2"

and Disciplina.KodDiscip=Izuchaet.KodDiscip

and Disciplina.KodDiscip=Prepodaet.KodDiscip

and (Disciplina.FormaOtchet="Is asleep" or Disciplina.FormaOtchet="Zalik");

Update Discipline

set ObsheeKolChVNed=VsegoCh/17;

4. Prepare a tab for the student’s diploma:

select Disciplina.Nazv, Izuchaet.Ocenka, Izuchaet.FIO

from Izuchaet, Disciplina

where Disciplina.KodDiscip=Izuchaet.KodDiscip

and Disciplina.FormaOtchet="Is asleep"

Select AVG(Evaluation) as SrBall

Order by SrBall desc;

5. View the list of groups in order of the middle ball:

Select FIO, AVG(Evaluation) as SrBall

Order by SrBall desc;

10. Structure and functions of the system

The course work consists of one project “Project1” and 13 modules.

1. Unit1 - the form is saved here, as it is title page. Components that are being reviewed are: Memo, Button.

2. Unit2 - here the form is saved, which is the front side of the database. Here the components come together: Button, Memo.

3. Unit3 - here the form is saved to place all database tables in the tab view. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

4. Unit4 - here the form is saved and the data is displayed. Here the components come together: Memo, Button.

5. Unit5 - the form is saved here and the additional examination report is displayed. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

6. Unit6 – here the form is saved, on which the list of tests and spills is displayed. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

7. Unit7 - the form is saved here and the main exam information is displayed. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

8. Unit8 - the form is saved here and the list of groups is displayed in order of occurrence. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

9. Unit9 - the form is saved here and the diploma insert is displayed. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

10. Unit10 – the form is saved here, on which the form from the completed electronic form is displayed. Here are the components that are vicorized: Memo, Button, TabSheet, Table, DBGrid, DBNavigator, Label, Query.

11. Unit11 - here the form is saved and the menu is displayed. Here the components come together: Memo, Button, Label.

12. Unit12 – here the form is saved, on which the result of the electronic examination report is displayed. Here the components are vicorized: Memo and Button, RVProject, RVQueryConnnection and Query.

13. Unit13 - here the form is saved, where the completed insert in the diploma is displayed. Here the components are vicorized: Memo and Button, RVProject, RVQueryConnnection and Query.

11. Pos_bnik koristuvach

1. Let's launch the project. Before us is the title page of the coursework

Malyunok 3

Here we can immediately go to the database, or we can marvel at the data and return to this form. Select “Show the area”

2. We will see a window with information about completing the coursework.

Malyunok 4

3. Turn back by pressing the back button and start the robot by pressing the button of the front window “Continue”

Malyunok 5

4. Having read the information on this page, press the “Login” button

Malyunok 6

We are presented with a window where we can place all the information that is in the database on tabs. Here we can look at the list of disciplines, the initial group, contributions, what other students are studying and what subject they are completing.

5. From this window we can also go to the questions. We press on the second button.

Malyunok 7

Here we can select any entry simply by pressing the button below. Also here we can go to the table and go to forming the electronic version of the exam sheet.

6. Click on the button “Review the list of activities and events for each semester”

Malyunok 8

Here you need to enter the semester number and click the button below, then at the end of the table a list of studies and classes for the semester you entered will appear. From this sheet we can turn to the capitals.

7. Click on the button “Go to the main exam report”

Here you need to select the name of the discipline from the list, then enter that name at the end under the list that appears, and click on the “Confirm” button. This will show the total number of years in the given discipline, as well as display the list of students who are studying this discipline and their grade for this discipline. Respect! The evaluation field is filled in on the table form in the middle of the Student-Discipline tab. Also on this basis you can formulate an additional examination report. For students who have a grade of 2. From this sheet we can turn to the capitals.

Malyunok 9

8. Click on the button “Go to the additional exam report”

Malyunok 10

Here we can help students who have a grade of 2 from this or any other discipline. From this sheet we can turn to the capitals.

9. Click on the button “Form a tab for a diploma”

Malyunok 11

Here you need to enter the graduate’s PIB by selecting the eligible student from the list that appears. Then press the key. And then you will be asked to fill up the “Discipline” section with a list of disciplines taught for 5 years of study, and also show your final grades. At what point can you look at each other? electronic version insert by pressing the button “Version for your friend”. After viewing this version, you just need to close the window that is open on the red cross at the top right corner of the screen.

Malyunok 12

10. Click on the button “Look through the list of groups in order of changing the middle score”

Malyunok 13

Here we have a list of groups that are suitable for each student, the average score, changes in the order of change. From this sheet we can turn to the capitals.

Malyunok 14

Select from the drop-down list a discipline that is useful to us, for example, economics, and enter its name at the end of the list that appears. Next, press the quit button and the appropriate name for quitting this discipline.

Malyunok 16

Here we will name the discipline we have established, and the presentation of this discipline. And also a list of students who studied this discipline. To exit the call, simply press the cross at the top right corner of the screen. We turn to the front sheet. From this sheet we can turn to the capitals.

12. Creation table

To create a table, use the Database Desktop utilities. You can launch it - Start/Programs/Borland Delphi 7/Database Desktop. It is necessary to set up the working directory of the utility. Select the File/Working Directory command and set your working directory. To create a table, select the File/New/Table command. Then you need to select the table type. The PARADOX 7 type can be used as the shortest file server table.

1. Creating the YchebPlan table (Initial plan):

Malyunok 17

5. Creation of the Disciplina table:

Malyunok 18

6. Creating the Student table:

Malyunok 19

7. Creation of the Prepodaet table (Discipline-Vykladach):

Malyunok 20

5. Creating a Prepod table:

Malyunok 21

8. Creation of the Izuchaet table (Discipline-Student):

Malyunok 22

13. Creation of programs in Delphi

To create a new application, you need to select New/Application from the File menu. The form and module appear (the project is called), now you can place the necessary components on the form. If necessary, you can create another form (and more than one), for which you need to select the New/Form item in the File menu.

1. Table. Reserved with tribute. Reimagined data.

In order to display a table on a form, you need to place the following components on it:

· Table (on the BDE tab) - In the Object Inspector on the “Parameters” tab, under the Tablename option, select the required table.

Malyunok 23

· DBGrid (on the DataControls tab) - necessary to display the table on the form, in the Object Inspector as a DataSource, specify the required data.

Malyunok 24

· DBNavigator (on the DataControls tab) - necessary navigation through table records. The Object Inspector, as a DataSource, displays the same data as the DBGrid. The navigator functions are available by pressing on its buttons during the program's operating time. Component contains 10 buttons.

Malyunok 25

· DataSource (Data Access tab) – an intermediate level component for accessing data. Serve as an intermediary between DBMS tables and on-screen controls (DBGrid, DBNavigator).

Malyunok 26

14. Creating a field with information (Memo) and buttons

The form contains the Memo component, which is located in the Standard tab.

Malyunok 27

In the Object Inspector, on the “Parameters” tab, as Lines, enter the text required for display

Malyunok 28

Creation of buttons.

To correctly close the form, it contains the Button component, which is located on the Standard tab.

Malyunok 29

In order for the button to work, you need to enter the following in the OnClick Observer:

procedure TForm1.N5Click(Sender: TObject);

begin

Form2.Show;

Form1.Close;

end;

15. Creation of signatures for the table

To sign the table in the robot, select the Lable component and expand it to the Standard tab. In the Object Inspector, as a Caption, you just need to write text.

Malyunok 30

16. Create a list of what comes up

To select a command from an explicit list, a ComboBox component is used (the list that is selected). This treasure can be created in this manner

In the Inspector of Objects in the Items Authority, you must write:

Malyunok 31

16. Creation of the stars

It is created behind the additional QReports tool, which you need to connect first: Component->install packages->add open the bin folder, select the dclqrt70.bpl file, click OK and the tab with QReport components will appear. Components I have chosen:

Table 2

17. Program listing

Description of the project

program Project1;

uses

Forms

Unit1 to "Unit1.pas" (Form1),

Unit2 to "Unit2.pas" (Form2),

Unit3 to "Unit3.pas" (Form3),

Unit4 to "Unit4.pas" (Form4),

Unit5 to "Unit5.pas" (Form5),

Unit6 to "Unit6.pas" (Form6),

Unit7 to "Unit7.pas" (Form7),

Unit8 in "Unit8.pas" (Form8),

Unit9 to "Unit9.pas" (Form9),

Unit10 in "Unit10.pas" (Form10),

Unit11 to "Unit11.pas" (Form11),

Unit12 to "Unit12.pas" (Form12),

Unit13 to "Unit13.pas" (Form13),

Unit14 in "Unit14.pas" (Form14);

($R *.res)

begin

Application.Initialize;

Application.CreateForm(TForm1, Form1);

Application.CreateForm(TForm2, Form2);

Application.CreateForm(TForm3, Form3);

Application.CreateForm(TForm4, Form4);

Application.CreateForm(TForm5, Form5);

Application.CreateForm(TForm6, Form6);

Application.CreateForm(TForm7, Form7);

Application.CreateForm(TForm8, Form8);

Application.CreateForm(TForm9, Form9);

Application.CreateForm(TForm10, Form10);

Application.CreateForm(TForm11, Form11);

Application.CreateForm(TForm12, Form12);

Application.CreateForm(TForm13, Form13);

Application.CreateForm(TForm14, Form14);

Application.Run;

end.

Unit1 module description

unit Unit1;

interface

uses

Dialogs, StdCtrls;

type

TForm1 = class(TForm)

Memo1: TMemo;

Button1: TButton;

Button2: TButton;

Button3: TButton;

private

(Private declarations)

public

(Public declarations)

end;

var

Form1: TForm1;

implementation

uses Unit2, Unit4, Unit6, Unit7, Unit5, Unit8, Unit9, Unit10;

($R *.dfm)

procedure TForm1.Button3Click(Sender: TObject);

begin

Form2.show;

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

Form1.Close;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

Form4.show;

end;

end.

Description of the Unit2 module

unit Unit2;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

type

TForm2 = class(TForm)

Memo1: TMemo;

GroupBox1: TGroupBox;

Button1: TButton;

Button2: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form2: TForm2;

implementation

uses Unit3;

($R *.dfm)

procedure TForm2.Button1Click(Sender: TObject);

begin

Form3.show;

Form2.Close;

end;

procedure TForm2.Button2Click(Sender: TObject);

begin

Form2.Close;

end;

Unit3 module description

unit Unit3;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ComCtrls, ExtCtrls, DBCtrls, Grids, DBGrids, DB, DBTables,

StdCtrls, QuickRpt, QRCtrls;

type

TForm3 = class(TForm)

PageControl1: TPageControl;

TabSheet1: TTabSheet;

TabSheet2: TTabSheet;

TabSheet3: TTabSheet;

TabSheet4: TTabSheet;

TabSheet5: TTabSheet;

TabSheet6: TTabSheet;

DataSource1: TDataSource;

DataSource2: TDataSource;

DataSource3: TDataSource;

DataSource4: TDataSource;

Table1: TTable;

Table2: TTable;

Table3: TTable;

Table4: TTable;

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DBGrid2: TDBGrid;

DBNavigator2: TDBNavigator;

DBGrid3: TDBGrid;

DBNavigator3: TDBNavigator;

DBGrid4: TDBGrid;

DBNavigator4: TDBNavigator;

DBGrid5: TDBGrid;

DBNavigator5: TDBNavigator;

DBGrid6: TDBGrid;

DBNavigator6: TDBNavigator;

Button1: TButton;

DataSource5: TDataSource;

DataSource6: TDataSource;

Table5:TTable;

Table6: TTable;

Query1: TQuery;

Button2: TButton;

Label1: TLabel;

Memo1: TMemo;

Label3: TLabel;

Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form3: TForm3;

implementation

uses Unit5, Unit11;

($R *.dfm)

procedure TForm3.Button1Click(Sender: TObject);

begin

Form11.show;

Form3.close;

end;

procedure TForm3.Button2Click(Sender: TObject);

begin

Query1.ExecSQL;

Form3.Refresh;

end;

procedure TForm3.Button3Click(Sender: TObject);

begin

Form3.close;

end;

Description of the Unit4 module

unit Unit4;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

type

TForm4 = class(TForm)

Memo1: TMemo;

Button1: TButton;

procedure Button1Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form4: TForm4;

implementation

uses Unit1;

($R *.dfm)

procedure TForm4.Button1Click(Sender: TObject);

begin

Form1.show;

end;

Description of the Unit 5 module

unit Unit5;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, DB, DBTables, Grids, DBGrids, StdCtrls, Mask, DBCtrls, ExtCtrls;

type

TForm5 = class(TForm)

DataSource1: TDataSource;

DBGrid1: TDBGrid;

Query1: TQuery;

DBEdit1:TDBEdit;

DBEdit2:TDBEdit;

DBEdit3:TDBEdit;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

DBNavigator1: TDBNavigator;

Button1: TButton;

procedure ComboBox1Change(Sender: TObject);

procedure Edit1Change(Sender: TObject);

procedure Button1Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form5: TForm5;

implementation

uses Unit11;

($R *.dfm)

procedure TForm5.ComboBox1Change(Sender: TObject);

begin

Query1.Active:=true;

end;

procedure TForm5.Edit1Change(Sender: TObject);

begin

Query1.Open;

end;

procedure TForm5.Button1Click(Sender: TObject);

begin

Form11.show;

Form5.Close;

end;

Description of the Unit 6 module

unit Unit6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, DB, DBTables, Grids, DBGrids, StdCtrls, ExtCtrls, DBCtrls;

type

TForm6 = class(TForm)

Button1: TButton;

Edit1: TEdit;

DataSource1: TDataSource;

DBGrid1: TDBGrid;

Query1: TQuery;

Label1: TLabel;

DBNavigator1: TDBNavigator;

Label2: TLabel;

Memo1: TMemo;

Button2: TButton;

Label3: TLabel;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form6: TForm6;

implementation

uses Unit11;

($R *.dfm)

procedure TForm6.Button1Click(Sender: TObject);

begin

Query1.Close;

if not Query1.Prepared then

Query1.Prepare;

if length (edit1.text)<>0 then

else

begin

Query1.Params.Value:=0;

end;

Query1.Open;

end;

procedure TForm6.Button2Click(Sender: TObject);

begin

Form11.show;

Form6.Close;

end;

Description of the Unit 7 module

unit Unit7;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Grids, DBGrids, DBTables, DB, Mask, DBCtrls, ExtCtrls,

QRCtrls, QuickRpt;

type

TForm7 = class(TForm)

Label1: TLabel;

Label2: TLabel;

DataSource1: TDataSource;

Query1: TQuery;

Edit2: TEdit;

Button1: TButton;

DBEdit1:TDBEdit;

DBEdit2:TDBEdit;

Label3: TLabel;

DBGrid1: TDBGrid;

Label4: TLabel;

Label5: TLabel;

DBNavigator1: TDBNavigator;

Button2: TButton;

Label6: TLabel;

Label7: TLabel;

Memo1: TMemo;

ComboBox1: TComboBox;

Label8: TLabel;

Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form7: TForm7;

implementation

uses Unit5, Unit11;

($R *.dfm)

procedure TForm7.Button1Click(Sender: TObject);

begin

Query1.Close;

if not Query1.Prepared then

Query1.Prepare;

if length(edit2.text)<>0 then

Query1.Params.Value:=edit2.Text

else

begin

Query1.Params.Value:=0;

edit2.Text:="Enter a name!";

end;

Query1.Open;

end;

procedure TForm7.Button2Click(Sender: TObject);

begin

Form5.show;

Form7.close;

end;

procedure TForm7.Button3Click(Sender: TObject);

begin

Form11.show;

Form7.close;

end;

Description of the Unit 8 module

unit Unit8;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

type

TForm8 = class(TForm)

Label4: TLabel;

DataSource1: TDataSource;

Query1: TQuery;

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

Button1: TButton;

Memo1: TMemo;

procedure Button1Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form8: TForm8;

implementation

uses Unit11;

($R *.dfm)

procedure TForm8.Button1Click(Sender: TObject);

begin

Form11.show;

Form8.close;

end;

Description of the Unit 9 module

unit Unit9;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Grids, DBGrids, DB, DBTables, StdCtrls, Mask, DBCtrls, ExtCtrls;

type

TForm9 = class(TForm)

Edit1: TEdit;

Query1: TQuery;

DataSource1: TDataSource;

DBGrid1: TDBGrid;

Button1: TButton;

Query2: TQuery;

DataSource2: TDataSource;

Button2: TButton;

DBEdit1:TDBEdit;

DBNavigator1: TDBNavigator;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Name: TComboBox;

Button3: TButton;

Memo1: TMemo;

Label4: TLabel;

Button4: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form9: TForm9;

implementation

uses Unit11, Unit13;

($R *.dfm)

procedure TForm9.Button1Click(Sender: TObject);

begin

Query1.Close;

if not Query1.Prepared then

Query1.Prepare;

if length (edit1.text)<>0 then

Query1.Params.Value:=edit1.Text

else

begin

Query1.Params.Value:=0;

edit1.Text:="Enter the name of the graduate!";

end;

Query1.Open;

end;

procedure TForm9.Button2Click(Sender: TObject);

begin

Query2.Close;

if not Query2.Prepared then

Query2.Prepare;

if length (edit1.text)<>0 then

Query2.Params.Value:=edit1.Text

else

begin

Query2.Params.Value:=0;

edit1.Text:="Enter semester number!";

end;

Query2.Open;

end;

procedure TForm9.Button3Click(Sender: TObject);

begin

Form11.show;

Form9.close;

end;

procedure TForm9.Button4Click(Sender: TObject);

begin

Form13.QuickRep1.Preview;

end;

Description of the Unit 10 module

unit Unit10;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls, QuickRpt, StdCtrls, DB, DBTables, Mask, DBCtrls,

Grids, DBGrids;

type

TForm10 = class(TForm)

Button1: TButton;

Query1: TQuery;

DataSource1: TDataSource;

DBEdit1:TDBEdit;

DBEdit2:TDBEdit;

Label1: TLabel;

Label2: TLabel;

Edit1: TEdit;

Button2: TButton;

Label3: TLabel;

ComboBox1: TComboBox;

Label4: TLabel;

Label5: TLabel;

Memo1: TMemo;

Label6: TLabel;

Label7: TLabel;

Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form10: TForm10;

implementation

uses Unit3, Unit7, Unit12, Unit11;

($R *.dfm)

procedure TForm10.Button1Click(Sender: TObject);

begin

Form12.QuickRep1.Preview;

end;

procedure TForm10.Button2Click(Sender: TObject);

begin

Query1.Close;

if not Query1.Prepared then

Query1.Prepare;

if length (edit1.text)<>0 then

Query1.Params.Value:=edit1.Text

else

begin

Query1.Params.Value:=0;

edit1.Text:="Enter a name!";

end;

Query1.Open;

end;

procedure TForm10.Button3Click(Sender: TObject);

begin

Form11.show;

end;

Description of the Unit 11 module

unit Unit11;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

type

TForm11 = class(TForm)

Button1: TButton;

Button2: TButton;

Button3: TButton;

Button4: TButton;

Button5: TButton;

Button6: TButton;

Memo1: TMemo;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Button7: ​​TButton;

Label4: TLabel;

Label5: TLabel;

procedure Button2Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button5Click(Sender: TObject);

procedure Button6Click(Sender: TObject);

procedure Button7Click(Sender: TObject);

private

(Private declarations)

public

(Public declarations)

end;

var

Form11: TForm11;

implementation

Similar documents

    Creation of tables and design of database management systems. Infological design. Relational diagram of the database Applied significance of systems: information about postal customers and the goods they supply. A statement about the availability of goods at the store.

    course work, add 01.12.2008

    Expanding the database with information about suppliers, products with an indicator of product types using the MySQL database management system using additional SQL queries. Development of an information model of subject knowledge. Table structure, data base fields.

    robot control, add 04/13/2012

    The process of designing a database, developing its logical structure is similar to the information model of the subject area. Work with the program Access DBMS, the power of the table and its fields, the creation of inter-table connections; Infological design.

    course work, add 12/17/2009

    Basic concepts of databases and database management systems. Types of tributes to be paid Microsoft base Access. Classification of the DBMS and its main characteristics. Post-production database. Trends in the world of current information systems.

    course work, add 01/28/2014

    Features of the development of the information model and the creation of the structure relational basis tributes Fundamentals of database design. Expand tables, forms, queries to display information about a specific model. Working with databases and their objects.

    course work, add 05.11.2011

    Further investigation of the characteristics and functional capabilities of the Microsoft Office Access database management system. Values ​​of the main classes of objects. Development of the database "Dilovodstvo". Creation of a table, forms, queries, sounds and data schemes.

    abstract, addition 12/05/2014

    The trend is the development of kernel systems using databases. Hierarchical hemlock models DBMS. Main benefits to a distributed data base. Processing of divisions of inputs, interoperability. Technology of data replication and rich architecture.

    abstract, addition 11/29/2010

    Theoretical facts and basic concepts of databases. Database management systems: warehouse, structure, security, operating modes, objects. Working with OpenOffice.Org BASE databases: created table, links, queries for additional query master.

    course work, add 04/28/2011

    Design of a database system for receiving, processing and processing applications to the development of information technologies; development of informational and datalogical models, implementation of the physical model. Creation of programs for visualization of robots with a database.

    diploma work, add 01/25/2013

    The vision of information objects and their information model. The structure of the relational data base is logical. Expanding the table in the database management system data Access. Creation of queries, forms and answers in the Access DBMS. Rozrobka program koristuvach.

DEVELOPMENT OF APPLICATION FOR WORKING WITH DATABASES

Rosa Gainanova

literature from the field of outdoor lighting

Kazan National Research Technological University

Russia, Kazan

ABSTRACT

The statistics examine methods for accessing databases and program interfaces that define these access methods. The integration of the Visual C# program with the Microsoft SQL Server 2012 DBMS server is considered. The development of the “Travel Agency” information system is considered as an example.

ABSTRACT

The materials follow the methods of access to the software features and software features used in these research methods. You appreciate the integration of Visual C# applications with Microsoft SQL Server 2012 database server. As the "Tourist Agency" develops, the information system is important.

Key words: database, SQL Server, program, developers, control element, power supply.

Keywords: Database, SQL Server, application, users, control element, query.

An information system is an interconnected set of methods, methods and personnel that are used to save, process and provide information in order to achieve the goal. The information system that is being decomposed will be based on client-server technology. In such systems, information is stored on the server, and the information system interface is stored on client computers, through which another information system allows access to the data.

When developing an information system, two main tasks must be addressed:

  • creation of a database intended for storing information;
  • task of developing a graphical interface for client programs.

The “Travel Agency” database is created on Microsoft SQL Server 2012. The database stores information about the clients of this travel agency (tourists), about the tours they have booked, registration and payment for travel packages. At the database design stage, the tables “Tourists”, “Tours”, “Tours”, “Seasons”, “Payment” are created. Links are established between tables.

The staff of the travel agency consists of the travel agency's clerk, sales managers, accountant, cashier and travel agency's sales staff. One of the office servers is designated as the system administrator. We only keep records of bank accounts. In addition to the five main tables, the table “Correspondents” is created to contain information about the DBs. This table is linked to other tables. The structure of this table: koristuvach code, nickname, posad, login and password. Changes to this table can only be made by the system administrator.

The SQL Server security system will be based on two concepts: authentication and authorization. System administrator, which indicates the security of SQL Server, creates a separate login object for each client. This object contains the name of the SQL Server account account, its password, outside the name and other attributes designated for access to SQL Server databases. By connecting to SQL Server, the user denies access to the databases in which his cloud record is registered. To register an account record with a specific database, the system administrator creates a database account in a new name and associates it with the previous account record. The system administrator gives users new importance to the song. The sales manager can make changes to the “Tourists” table, “Trips” and change the “Number of places” column in the “Tours” table after selling the final tour. Travel agency travel agents can make changes to the “Seasons” and “Tours” tables. Accountant and cashier – up to the “Payment” table.

This can again be done in the middle of SQL Server Management Studio, opening the windows of the authorities of the official accountant. This can be updated using additional GRANT instructions. Give more attention to the manager. This instruction gives the right to the manager to review and change the “Tourists” table, insert new rows and delete old data.

USE Travel Agency

GRANT SELECT, UPDATE, INSERT, DELETE

ON Tourists

A similar instruction is created before working with the “Trips” table. To give the manager the right to change only one column of the “Tours” table, after the name of the table in the arms, indicate the name of the column of the Tours that is being changed (Number of_locations). Given the operations SELECT, UPDATE.

The Data Control Language (DCL) has the following instructions: COMMIT, ROLLBACK, GRANT, REVOKE. All of these instructions are based on the protection of the data base for quick and easy care. Databases are processed themselves as soon as changes are made to them. For the purpose of protecting the SQL database, an interchange operation is performed. If they can change it, it will only happen between transactions. If you try several servers and simultaneously vikor the same database table, a situation of competitive access is created. Problems associated with one-hour access arise immediately simple additions, if the program is installed and launched on a large number of computer systems, which in some cases do not provide instant access management. There is no conflict between transactions, as they are concluded sequentially.

One of the main tools for maintaining the integrity of the database is a transaction. A transaction encapsulates all SQL statements that can be inserted into the database. An SQL transaction ends with one of two statements: COMMIT (complete) or ROLLBACK (release). If a transaction ends with a ROLLBACK instruction, then this instruction is touched and the database is rotated to the output state. A primary transaction can be completed in one of two modes: READ-WRITE (read-write) or READ-ONLY (read-only). For a transaction, you can set one of the following isolation levels: SERIAIZABLE (consistently executed), REPEATABLE READ (read that is repeated), READ UNCOMMITED (read unconfirmed data). The characteristics are READ-WRITE and SERIAIZABLE. The characteristics of the SQL transaction that operates should be suitable for most clients.

The program is created in the middle of Visual Studio 2012 using a subset of the C# programming language. Bathroom design software product begins with the development of the user interface.

The main program can easily select the main functions of the robot with an addendum (Figure 1). For these operations, a menu is displayed. The menu consists of the following items: “Tables”, “Request”, “Call”. From these points, remove sub-points. Skin function will be affected by the eyelid. The MenuStrip element is installed on the main window of the program, and menu options are formed. The form window contains a PictureBox element. A drawing will be drawn into the area of ​​the element. The little one is responsible for occupying the entire area. The SizeMode power sets the image scaling. For this purpose, from the list that is opened, StretchImage is selected, the little one is scaled so that it occupies the entire surface of the object.

To display the list of travel agents who have the right to trade with the “Travel Agency” database, a comboBox control element is installed. The comboBox element is bound to the data element. The window opens " ZomboBoxZavdannya”, in which the order “Vikoristovat elements of linking to data” is installed, in which this order of statements is established, the parameters of data linking are revealed. The comboBox element is attached to the “Members” table, and “Name” is selected from the “Member Type” row. To enter the login, a textbox1 element is installed to enter the password textBox2. For the elements textBox1 and textBox2, the power of UsesSystemPasworChar is set to true, indicating that the text in the text box must be displayed as password characters for typing. Two command buttons are installed: “Leave” and “Change account”.

When you bind the comboBox element to the “Correspondents” table, the form code displays the Form1_Load item.

private void Form1_Load(object sender, EventArgs e)

this.koristuvachiTableAdapter1.Fill(this.travel agencyDataSet10.koristuvachi);

Launching program menu inaccessible. To log in to the system, you need to enter information about the account provider and click the “Log In” button. When the form is selected, the name of the merchants, which is located in the table "Corrists", is included in the comboBox1 control element. This booklet adds rows to disable inaccessible menus, the “Change Account” button, and in the comboBox1 element there is a non-selection element:

menuStrip1.Enabled = false; comboBox1.SelectedIndex = -1;

button2.Enabled = false;

Figure 1. View of the main window of the program

When you press the “Leave” button, it is checked to see who is in the “Correspondents” table, the customer with this name, and whether the login and password have been entered correctly. The Form Class Description area describes the parameters that are passed to the sql command. There are three parameters: the nickname of the koristuvach, your login and password.

private string parfam, parpasw, parlog;

The space of names has a row:

using System.Data.SqlClient;

// Observer of the moment of pressing the “Leave” button

string sql = "";

string connstr = @ "Data Source= B302CN-8 \TEST_SQL;Initial Catalog=Travel Agency;Integrated Security=True";

SqlDataReader cmReader;

parfam = comboBox1.Text; parlog=textBox1.Text;

SqlConnection conn=new SqlConnection(connstr);

sql = "SELECT Nickname, Login, Password FROM Koristuvachi" +

WHERE (Nickname = @fam) and (Password [email protected])";

SqlCommand cmdkod = new SqlCommand(sql, conn);

cmdkod.Parameters.Add(new SqlParameter("@fam", SqlDbType.NChar, 25));

cmdkod.Parameters["@fam"].Value = parfam;

cmdkod.Parameters.Add(new SqlParameter("@pasw", SqlDbType.NChar, 10));

cmdkod.Parameters["@pasw"].Value = parpasw;

cmdkod.Parameters.Add(new SqlParameter("@log", SqlDbType.NChar, 15));

cmdkod.Parameters["@log"].Value = parlog;

if (!cmReader.Read())

MessageBox.Show("Invalid password!");

cmReader.Close(); conn.Close();

menuStrip1.Enabled = true; comboBox1.SelectedIndex = -1;

button1.Enabled = false; button2.Enabled = true;

textBox1.Text = ""; textBox1.Enabled = false;

textBox2.Text = ""; textBox2.Enabled = false;

comboBox1.Enabled = false;

cmReader.Close();

private void button2_Click(object sender, EventArgs e)

menuStrip1.Enabled = false; comboBox1.Enabled = true;

textBox1.Enabled = true; textBox2.Enabled = true;

button1.Enabled = true; button2.Enabled = false;

Description of the work of the collector by pressing the "Leave" button.

Row connstr to match the row of connection. The text of the formed query is written to the sql row, starting from the select statement, after which the fields that are selected from the table are entered after the word from.

The processor creates a new instance of the SqlConnection object, which will provide connections to the SQL server. The SqlCommand object will place a command with three parameters to search in the “Kristuvach” table for a merchant with the given nickname, login and password. The button1_Click detector opens the SqlConnection. Next, the analyzer writes the SQL command, which is saved in the cmdkod object.

cmReader = cmdkod.ExecuteReader();

As a result, calling the ExecuteReader method creates an object of the SqlDataReader class, which allows you to sequentially read all the rows of the SQL command. To select a vikoryst, the SqlDataReader method is used. Read. If the table “Koristuvach” does not contain the same record with the given name, login and password, then the cmReader.Read() method is set to false. This means that an incorrect login or password has been entered. In the window that displays a notification about invalid data entered, the cmReader and SqlConnection objects are closed. If the data about the accountant is entered correctly, the menu and the “Change accountant” button become available. The "Leave" button becomes unavailable. The elements textBox1 and textBox2 are cleared and become inaccessible. The comboBox1 element also becomes inaccessible (Figure 2)

Figure 2. View of the main window after logging in

The table and results of the search queries are displayed on the elements of the DataGridView. The main significance of these elements is their connection with the tables of external data files, first before the database tables. For ease of review and entry of new entries in the “Seasons”, “Tours” and “Trips”, “Payment” tables are displayed two in one window. The skin element of the DataGridView is connected to the travel agency database table. In this window, the “Tourists” table is selected (Fig. 3). After completing the connection (pressing the Finish button), the DataSet, BindingSource and TableAdapter components appear on the form. These components are not visual, so they are displayed on the additional panel. DataSet is a specialized object to contain a database image. To enable this interaction between the DataSet and the data itself, an object of type TableAdapter is created. The very name of this object - adapter, transformer - indicates its nature. TableAdapter combines Fill and Update methods, which create direct and reverse data transfer between the DataSet and the SQL server table that is stored in the database. The Fiil method populates the DataSet with data from the SQL server, and the Update method updates the SQL server database with data from the local DataSet. The BindingSource component makes it easy to bind controls to the data form. The main power of the BindingSource component is the power of the Data Source, which points to a body of data.

After completing the connection to the data table, the Form2_Load subscript appears in the form code.

private void Form2_Load(object sender, EventArgs e)

this.touristsTableAdapter.Fill(this.travel agencyDataSet9.tourists);

When the form is selected, the data that is located in the "Tourists" table is displayed on the DataGridView element on the form window Form2. You can make changes to the table and add new entries. After making changes, click the “Save Tourists” button. A summary of the pressure on the “Save Tourists” button:

private void button1_Click(object sender, EventArgs e)

seasonsTableAdapter.Update(travel agencyDataSet9);

MessageBox.Show("Saving data");

Malyunok 3. View of the window with the “Tourists” table

The skin will be displayed on Wish you a good day. In the Form1 window, in the “Request” menu, a new item is added from the “Request” menu. Since the query does not have any parameters, to display the results of the query, a DataGridView element is installed on the form window and is connected to a similar procedure and function of the database.

This article provides several methods for developing add-ons that work with databases, methods for organizing access to work with a shared-stakes system, and methods for integrating Visual C# programs with a Microsoft SQL Server 2012 DBMS server. You can create Visual C# programming from SQL using other languages Powerful programs with a wide range of options. The main power of SQL lies in the analysis of data. No matter how many rows the table has, they can be added using a single SELECT statement. At the same time, the main shortcoming of the SQL language is the shortcomings in the customer interface. With the help of procedural methods, you can create manual interfaces for entering and reviewing data. The most advanced way of combining SQL with procedural language is called SQL literalism. The SQL statement is inserted at the required place in the procedural program. Information is transferred between a program written procedurally and SQL code. Why are the basic changes being used? Before SQL recognizes the changes, they must be voted on. Please consider the area from the description of the form class to the description of the program code. In the program code, a new instance of the SqlConnection object will provide connections to the SQL server. The SqlCommand object will provide visualization of the issued SQL command.

List of references:

  1. Allen Taylor. SQL for dummies, 8th edition: Trans. from English - M.: TOV “I.D. Williams”, 2014. – 416 p.
  2. Gainanova R.Sh. Development of programs for working with MS SQL Server 2012 databases // Fundamental and applied sciences today: Proceedings of the XI International Practical Conference (10-11 quarter 2017 Noth Charleston, USA), volume 3 – p. 34-41.
  3. Frolov A.V., Frolov G.V. Visual design of C# programs. - M.: KUDRITS-OBRAZ, 2003, - 512 p.

We can create a simple database addition that displays information from the “Tourists” table on a screen form and is linked to an exact record of the “Tourists” table and a record of the “Tourist Information” table from the Microsoft Access database.

For this reason, let’s create an empty Windows program. External appearance of the middle

rozrobki induced baby 39.

Rice. 39. Empty supplement

On the picture 39 you can see a group of components “Data”, which contains components for accessing and manipulating data.

The binding of database data to the form is done by the Binding Source component. Let's transfer yoga to the form. After placing it on the form, the center of the structure takes on an approaching appearance (Fig. 40).

Rice. 40. Binding Source component on the form

The component is not visual, so it is displayed on the additional panel. The main power of the component is the power of the DataSource, which points to a body of data. For the industrialists, power is empty, so it is necessary to formulate its meaning. When choosing a power, the power window appears (Fig. 41).

Rice. 41. List of dzherel tributes

At this moment, the list is empty, you need to create a new data file by selecting the “Add Project Data Source” command to create a new data box and connect to it. A dialogue appears (Fig. 42).

Rice. 42. List of dzherel tributes

This dialogue leads to the next choice of data:

Database - database;

Service – Service, this is the actual service that provides data. Most often it is a Web service;

Object - Object for selecting an object that generates data and objects for working with them.

You must select the “Database” item. The window for selecting a connection with data appears (Fig. 43).

Rice. 43. Select data connection

The purpose of this dialogue is to create a connection sequence, which will describe the connection parameters for the ADO mechanism, such as the type of database, location, names of contributors, security features, etc.

The dialogue list contains all the creations that have already been made. If there is no necessary connection in the list, select the “New connection” button. Press the button until the next dialog appears (Fig. 44).

In this dialog, you select the type of data file (in this section of Microsoft Access), the name of the database (in this section, the location of the database file), the username and password that are used to connect to the database. The “Advanced” button allows you to set a large number of parameters that affect various parts of the ADO mechanism. Click on the "Test Connection" button to check whether the parameters have been entered correctly and whether the connection is successful.

Rice. 44. Creation of a new union

The last part of the dialogue is to select these tables and other database objects for this data set. You can choose the baby 45.

Rice. 45. Select necessary table

In this window the tables “Tourists” and “Information about tourists” are selected. Fragments of other objects, including the table, have been created in the database, and little 45 is displayed in the table. Tsomu's creation of the dzherela danikh is completed. After clicking the “Finish” button, the DataSet component appears on the form using the BindingSource component.

Now the data that is connected must be displayed on the form. The easiest way to display data is to select the DataGridView component from the Data component group. The component is visual and looks like this on the form (Fig. 46).

Rice. 46. ​​DataGridView Component

It is immediately important to configure the component, which means its ability to edit data: “Enable Adding”, “Enable Editing”, “Enable Deleting”; Possibility of changing the order of columns: "Enable Column Reordering"); as well as the possibility of being secured in a container.

In order for the component to display data, you must select a data item from the list that appears. Select the list that appears until the next dialogue appears (Fig. 47).

Rice. 47. Select data for DataGridView

In this vipadka we selected the “Tourists” table. This selection changes the screen shape in this way (Fig. 48).

Rice. 48. The DataGridView component displays the table structure

You can see that there is another BindingSource component and a TableAdapter component that works with the Tourism table. Please note that in design-time the data extraction processes from the table are not displayed.

Now you need to display the data from the linked table “Tourist Information”. For this purpose, another DataGridView component is placed on the form and, as a data area, is selected next (Fig. 49).

Rice. 49. Select data from another DataGridView

Here, as a source of data, it is not the “Tourist Information” table itself, but the Binding Source between the “Tourism” and “Tourist Information” tables. Such a choice is guaranteed to be selected from the “Information about tourists” table except those rows that are associated with the flow row in the “Tourists” table. Also, such a choice guarantees the correctness of updating and editing of associated data. The work of the extracted program shows baby 50.

Rice. 50. Additional data base for robots

Navigating through data using the arrow keys is not manual. To make it easier to navigate through data, there is a BindingNavigator component. Let's place it in the form (Fig. 51).

Rice. 51. BindingNavigator component on the form

This component allows you to navigate between table records, add and delete table rows. Possibility and external look The component can be customized, since it is part of the ToolStripContainer menu.

The authority that designates the table that is being navigated is the authority of the BindingSource. We establish the meaning of the power of the equal “touristsBindingSource”. The robot component looks like this (Fig. 52).

Rice. 52. Robot's BindingNavigator component

Editing data in the middle of the DataGridView component with specific adjustments is possible, but not manually or rationally. Zokrema, it is important to check the entered dose value. Therefore, for the “Tourists” table, a screen form is created that allows you to display data in TextBox components and edit them. For this purpose, a container of the Panel type is placed on the form, and on this form there are three TextBox components (Fig. 53).

Rice. 53. Screen panel for editing entries in the “Tourists” table

Now you need to bind the TextBox components to the relevant fields of the Tourism table. For this purpose, the power of the DataBindings - Advanced group is shown on image 54.

Rice. 54. Power "DataBindings - Advanced"

Selecting this power will lead to the appearance of the dialogue shown on the little 55. This dialogue allows you to not only link the data, but also set the stage within which the data is updated, as well as the formatting of the data before it is displayed.

For the top TextBox component in the Binding list, select the data field “tourismBmdmgSource” and the field “Name”. For the middle and bottom components of the TextBox, select the same data body and the “Name” and “By Father” fields, as appropriate.

The expansion of the robot’s appurtenance appears to be the next step (Fig. 56).

Rice. 55. Dialogue window for "DataBindings - Advanced"

Rice. 56. Linking data to visual components

However, if changes are made, all new data will be lost from the form. The data base does not save data, and when you call again, the programs will, of course, be different. This means that the data is captured in a DataSet object, which is a copy of the table in memory. All items are included in this copy. To make changes appear in the database, you need to add the Update method to the TableAdapter class. Thus, for a program that is being expanded, it is necessary to place the “Update” button and write the current program code into the Click file:

touristsTableAdapterUpdate(bDTur_firmDataSet); information_about_touristsTableAdapter.Update(bDTur_firmDataSet);

This code updates the information in the “Tourists” and “Tourist Information” tables that are stored in the data. Please note that Danish method This option allows you to change the entire row of the table, as well as a group of rows.