AccesSoft - Articles - Work with databases in MS Access
Main | Articles | Links | Map
MS Access
Development cycles
Concept of the table
Properties of the table
Creation of the table
Linkage of tables
The scheme of data
Inquiries
Forms
Reports
Macros
Modules
External data
Network work
The client a server
Protection of data

Creation of tables

As already it was marked earlier, process of development of a database in MS Access begins with the task of the description of structures of tables. We shall consider this process in more detail.

So, for the beginning it is necessary for us to create the description of the table of the Paper.

Press the button To create and choose in the dialogue window which has appeared following a mode the Designer. The window intended for input of the description of structure of the created table opens. It is represented on

At creation of the databases intended for the decision of financial and economic problems, process of the description of attributes of fields in the created table gets special value.

Directly process of the description of attributes of a field begins with assignment to it of a name. It is desirable, that this name was, on the one hand, informative, and with another - brief, that provides doubtless convenience at the further manipulations with it. Further it is necessary to define type of a field, that, obviously, it should be done, proceeding from the maintenance of those data which will be stored in it

Creation of the description of structure of the table of the Paper

Let's pay attention to type the Counter, appropriated I weed (a code of a paper). It means, that will independently place in this field some numerical value for each again created record of the table, providing thus its uniqueness.

The choice of type of data in Access simultaneously defines a set of additional attributes of a corresponding field. In particular, field has type Date and as it is shown on fig. can to have additional attributes

  • The format of a field defining conditions of a conclusion of data from it weeding (by default)
  • The mask of input defining conditions of data input in a floor
  • The signature - contains the expanded heading
  • Value by default - allows to specify the value, automatically appropriated I weed at creation of new record. In our case by default current date returned by built in function Date () will be set
  • The condition on value - defines requirements to the data entered in a floor. For example, for performance of the requirement that date of issue preceded current, it is necessary to set expression <=Date ()
  • The message on a mistake(an error) - defines the text of the message which will be deduced in case of infringement set above a condition
  • The obligatory field - specifies, demands or not a field of obligatory input of value
  • the field - defines the index created on the given field. The index accelerates performance of inquiries in which are used fields, and operations of sorting and a grouping

Being based on experience of designing of various bases, it is necessary to notice, that it is not necessary to neglect opportunities of management of data who open additional attributes of fields. Their competent and thought over use allows to organize centralized both an effective control behind a correctness and integrity of data

At the closing stage of process of designing of structure of the table there is a task of keys and indexes. In the first case it is enough to allocate lines which should make key expression, and click the mouse under the pictogram the Key on the panel of tools. In the table of the Paper the role of the unique key identifier is carried out with field.

Also at creation of the table it is meaningful to think over in advance possible orderings which can be necessary at work with data containing in it. The task of indexes with corresponding key expressions can essentially accelerate in the further process of work (especially with greater data files). In particular, at work with data from the table of the Paper rather possibly, that we should deduce them in alphabetic order under names, and also sorted in decreasing order dates. Process of the task of corresponding indexes is shown on fig

Effective method of the decision of problems of the control of a correctness of entrance data is restriction of set of admissible values of a field by some list. We shall consider it in more detail on an example of field (type of a paper) which, shall admit, in considered trading system can be either the action, or the bond. It is easy to notice, that reasonable the Action will appropriate to type a code 1, and to type the Bond - a code 2. It will allow to save essentially a place due to reduction of volume information (especially at a plenty of records). However from the point of view of perception of the entered information the user it is much more convenient to deal with the intelligent text, than to remember, what codes correspond to it.

Means of the decision of this problem in Access is the task the list of values for a field. For this purpose it is necessary to choose Substitution in a window of Property of a field, further for property Type of an element of management to set value the List. On fig. it is shown how to describe other properties of an element of management the List, to organize filling field with demanded values.

After creation of the description of structure of the table it is possible to pass in a mode of direct input in it data. As it was already spoken, the important advantage of interface SUBD Access is the thought over flexible system of transition from a mode of the Designer to a mode of data input in the table (the Mode of the table). Such transition can be carried out, having clicked the mouse under the pictogram the Kind located on the panel of tools, or having chosen function of the menu the Kind> the Mode of the table.

On fig. the window of a mode of direct data input in the table of the Paper is shown

It would be desirable to pay attention once again of the reader that the choice of type of a paper is carried out from in advance predetermined list.

It is obvious, that those actions which have been in detail described for the table of the Paper, it is necessary to do and for other information files: Agents, Portfolios, Applications. As a result we shall receive system of tables of database TfadeTest. We shall emphasize, system as data being them closely and are substantially connected among themselves. Really, the data who are being a floor the Code of the agent of the table Portfolios, should be coordinated as and to the size with the data who are being the same floor of the table of the Paper. Moreover, the logic of a considered(an examined) problem demands, that, working with the information concerning a portfolio, we could address simultaneously to the data describing the current agent, etc.

The author: Y.N.Antonov Оптимизация приложений Is added: 18.06.2008

Main | Articles | Links | Map

Copyright 2007 - 2008 AccesSoft. All Rights Reserved