
- •Context
- •Introduction
- •1 Creating and working with a database in ms access 2003
- •1.1 Introduction to Databases
- •1.2 Planning a Database
- •1.3 Starting Access and Opening a Database
- •1.4 Self-control test
- •2 Creating a table in ms access 2003
- •2.1 Theoretical material
- •2.2 Example of tables creation for database “Product realization of Holding company “Group nord”
- •2.3. Self-control test
- •3 Creating queries in ms access 2003
- •3.1 Theoretical material
- •3.2 Example of queries creation for database “Product realization of Holding company “Group nord”
- •3.3. Self-control test
- •4 Creating forms in ms access 2003
- •4.1 Theoretical material
- •4.2 Example of forms creation for database “Product realization of Holding company “Group nord”
- •4.3. Self-control test
- •5 Creating reports in ms access 2003
- •5.1 Theoretical material
- •5.2 Example of reports creation for database “Product realization of Holding company “Group nord”
- •5.3. Self-control test
- •Individual tasks
- •Variant 1
- •Information about passengers
- •Variant 2
- •Variant 3
- •Variant 4
- •Variant 5
- •Variant 6
- •Variant 7
- •Variant 8
- •Variant 9
- •Variant 10
- •Variant 11
- •Vehicles
- •Variant 12
- •Variant 13
- •Variant 14
- •Information about printing-house
- •Variant 15
- •Variant 16
- •Literature
Міністерство освіти і науки, молоді та спорту України
Донецький національний університет економіки і торгівлі
імені Михайла Туган-Барановського
Кафедра інформаційних систем і технологій управління
Ю.І. Ільєнко
Створення баз даних у середовищі MS Access 2003
Методичні вказівки і індивідуальні завдання
для проведення лабораторних і самостійних робіт
студентами напряму підготовки 6.030503 “Міжнародна економіка”
денної форми навчання англійською мовою
Затверджено на засіданні кафедри інформаційних систем і технологій управління
Протокол № 13
Від 18.02.2013 р.
Схвалено навчально-методичною радою ДонНУЕТ
Протокол № __
Від __ _______ 2013 р.
ДонНУЕТ
Донецьк
2013
УДК 004.65(076.5)
ББК 32973.26-018.2a73
І 45
Рецензенти:
М.В. Роттер - канд. техн. наук, доц.,
О.В. Кислицина - канд. екон. наук, доц.
Ільєнко Ю.І.
І45 Створення баз даних у середовищі MS Access 2003: метод. вказ. і індивід. завд. для проведення лаб. і самост. робіт студ. напр. підгот. 6.030503 “Міжнародна економіка” ден. форми навчання англійською мовою / Ю.І. Ільєнко; М-во освіти і науки України, Донец. нац. ун-т економіки і торгівлі ім. М. Туган-Барановського, каф. інформ. систем і технологій упр.;– Донецк: [ДонНУЕТ], 2013. – 96 с.
Методичні вказівки і індивідуальні завдання призначені для проведення лабораторних занять та самостійної роботи з дисципліни «Інформатика» для студентів напряму підготовки 6.030503 “Міжнародна економіка” денної форм навчання англійською мовою.
Методична розробка містить теоретичний матеріал та методичні рекомендації для виконання практичних завдань за модулем «Створення баз даних у середовищі MS Access 2003» («Creating a database in MS Access 2003»).
За темами наведені індивідуальні завдання і приклади тестових завдань.
УДК 004.65(076.5)
ББК 32973.26-018.2a73
© Ільєнко Ю.І., 2013
© Донецький національний університет економіки і торгівлі імені Михайла Туган-Барановського, 2013
Context
INTRODUCTION 5
Ministry of Education, Science, Youth and Sports of Ukraine 5
Donetsk National University of Economics and Trade named after Mykhail Tugan-Baranovskiy 5
Homework title: 5
“Creating and working with a database in MS Access 2003” 5
Student: 5
__________________ 5
Course tutor: 5
__________________ 5
Donetsk 5
20__ 5
1.1 Introduction to Databases 6
1.2 Planning a Database 10
1.3 Starting Access and Opening a Database 12
1.4 Self-control test 16
2 CREATING A TABLE IN MS ACCESS 2003 18
2.1 Theoretical material 18
2.2 Example of tables creation for database “Product realization of Holding company “Group NORD” 26
2.3. Self-control test 31
3 CREATING QUERIES IN MS ACCESS 2003 32
3.1 Theoretical material 32
3.2 Example of queries creation for database “Product realization of Holding company “Group NORD” 38
3.3. Self-control test 44
4 CREATING FORMS IN MS ACCESS 2003 46
4.1 Theoretical material 46
4.2 Example of forms creation for database “Product realization of Holding company “Group NORD” 48
4.3. Self-control test 55
5 CREATING REPORTS IN MS ACCESS 2003 56
5.1 Theoretical material 56
5.2 Example of reports creation for database “Product realization of Holding company “Group NORD” 56
5.3. Self-control test 63
INDIVIDUAL TASKS 64
LITERATURE 96
Introduction
Microsoft Office 2003 is one of the most widely used office suites in the business world, and learning this popular program can be an excellent career move. There is always a need for experienced administrative assistants, managers and others with strong skills in database management. The modern information systems are characterized by the large volumes of information, their difficult organization, and also high level demands to speed and efficiency of these data processing. It becomes possible at the use of the special programmatic facilities - databases management systems (DBMS).
Databases management systems is the complex of program and language tools which are necessary for database creation, processing and supporting in the actual state.
The purpose of the «Creating and working with a database in MS Access 2003» module is to study of databases construction principles, mastering of the creation and editing rules of tables, queries, forms and reports in Access 2003. The task of module is reception of knowledge, abilities and skills from bases of construction of relational databases.
Student should follow the step-by-step tutorials to guides master the program faster and then do a task at home. Print reports of your home-works on an A4 paper. The title page should look like the one shown in figure 1.
Figure 1 – The title-page form
1 Creating and working with a database in ms access 2003
Purpose: To form theoretical knowledge about relational databases construction in the MS Access 2003 environment
1.1 Introduction to Databases
In its simplest form, a database is a collection of information about real object, process or event that is organized into a list and stored in a manner similar to a file cabinet. Whenever you make a list of information, such as names, addresses, products, or invoices, you are, in fact, creating a database. Technically speaking, you don't even have to use a database program to create a database. You can make a list of information in all kinds of programs, such as Microsoft Excel or Word.
A database program, however, is much more powerful than a simple list you keep on paper or in a Microsoft Word document. A database program lets you:
Store Information. A database stores lists of information that are related to a particular subject or purpose. It could be a list of home recipes, or business information, such as a list of hundreds of thousands of customers. A database also makes it easy to add, update, organize, and delete information.
Find Information. You can easily and instantly locate information stored in a database. For example, you can find all the customers with the last name "Johnson" or all the customers who live in Donetsk and are older than 65.
Analyze and Print Information. You can perform calculations on information in a database. For example, you could calculate what percent of your total sales comes from Donetsk region. You can also present information in a professional-looking printed report.
Manage Information. Databases make it easy to work with and manage huge amounts of information. For example, with a few keystrokes you can change the phone code for hundreds of customers from 0622 to a new 062.
Share Information. Most database programs (including Microsoft Access) allow more than one user to view and work with the same information at once.
There are four structural types of database management systems: hierarchical, network, relational, and flat-file.
The flat-file style of database are ideal for small amounts of data that needs to be human readable or edited by hand. For this purpose are usually used MS Excel.
Hierarchical and network databases are principally used on mainframe computers.
A relational database is a collection of data items organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables. Relational database tables link related tables using reference keys, such as primary, foreign and composite keys.
Table is a group of records that have a subject or a theme in common.
A relational database is a set of tables that have the following characteristics:
A table is made up of fields and rows.
A field (column) is a set of values of the same datatype; a character column, for example, contains character strings and an integer column contains integers.
A row is a sequence of values such that the nth value of the row corresponds to the nth column of the table.
Each row represents the sum of data for an entire record or a subcategory of a record, such as customer contact information that would include John Smith's address, telephone number and email address.
Each row is typically identified by a unique value known as its primary key.
Table structure
|
Field _1 |
Field _2 |
... |
Field _n |
|
Field_name_1 |
Field_name _2 |
... |
Field_name _n |
Record _1 |
Attribute 11 |
Attribute 12 |
... |
Attribute 1n |
Record _2 |
Attribute 11 |
Attribute 22 |
... |
Attribute 2n |
... |
... |
... |
... |
... |
Record _k |
Attribute k1 |
Attribute k2 |
... |
Attribute kn |
Figure 1.1 – Table structure of relational database
For the structuring of information, placing it in tables and manipulate data database management systems (DBMS) is used. The main functions of DBMS is definition of the databases structure, data processing and data management. Currently there are over 50 types of databases for personal computers. The most popular databases are: MS SQL Server, Oracle, Informix, Sybase, DB2, MS Access etc.
Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table). Both of these are worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored. Normalization basics:
the database table should not have duplicate fields;
the database table should have an unique identifier (primary key);
each primary key value should correspond to sufficient information about the type of entity or object (for example, information about a group or students);
changing values in the table fields should not affect the information in other fields (except for changes in key fields).
Determine the relations between tables
There are three types of relations: 1 to 1, 1 to Many and Many to Many.
In a one-to-one relationship, each row in one database table A is linked to one and only one other row in another table B. The number of rows in Table A must equal the number of rows in Table B.
In a one-to-many relationship, each row in the related to table can be related to many rows in the relating table. This effectively save storage as the related record does not need to be stored multiple times in the relating table.
In a many-to-many relationship, one or more rows in a table can be related to 0, 1 or many rows in another table.
In Access we use only two first relations. A many to many relation requires a compound or intermediary table, with at least the primary key of both tables to be included.
Keys
Each database table is consists of rows and columns. Some columns are special columns because they identify a particular record in a table. The special columns are called keys. The 2 most common keys are primary keys and foreign keys.
In a database table, the column that uniquely identifies each record in the table is called a primary key. It is almost always good design to define a primary key for all tables. In some cases, it is not possible to identify a column to be used as the primary key. In such cases, most designers create a dummy column which simply contains a running number to make each and every record in the table unique - for example, the AutoNumber data type in a Microsoft Access database.
Primary keys are also sometimes created from a combination of 2 or more columns. Such primary keys are called composite keys. Each column may not be unique by itself within the database table but when combined with the other column(s) in the composite key, the combination is unique.
When a database table is normalized to create an efficient and compact design, multiple tables are created that are linked together using foreign keys. Foreign keys are not necessarily unique in the table that stores them but they point to unique values in the referenced table.
To illustrate the concepts of the primary key and the foreign key, consider the sample table design below:
product table ------------------------------ product_id (primary key) description category_id (foreign key) category table ------------------------------- category_id (primary key) description |
Figure 1.2 – Primary and foreign keys
Notice that in both the product table and the category table, the values in the product_id column and the category_id are never repeated.
There tree types of Primary keys:
Single Field Keys. Whenever possible, the best choice for a primary key is a single column that uniquely identifies the item. Most objects have names, common abbreviations or some sort of code that identifies them. Employees have Employee ID's, parts on the assembly line have part numbers and states have two-letter abbreviations. These identifiers make the best primary keys.
Multi-Field Keys. Sometimes it takes more than one column to identify an event or item. An annual pay review is an event that occurs for each employee once a year. The employee ID cannot be used as a primary key because it occurs more than once in the table, but when combined with the year of the review, each becomes unique. When choosing multi-column keys, make sure the combined keys are always unique. Also, look long and hard for a different single column that will identify the row. A paycheck could be identified by employee and date, but the check number is always unique and makes a better primary key.
Auto-Number Keys. In some cases there is no unique identifier, so a computer-assigned key is the best choice. When tracking sales, a customer may make several purchases on the same day, possibly buying more of the same items. In this case, the table will contain the customer identifier, a date and several other items, but none uniquely identify this one purchase. Most database systems provide facilities to generate a sequential number that then can be used as the new primary key.
If it is hard to make chose – choose the third variant.
Databases usually consist of several parts. A Microsoft Access database may contain up to seven different database object types. The following table identifies the database objects you can use when creating a Microsoft Access database. Some objects you will use all the time (such as Tables), others you will hardly use (such as Modules). Table lists various database objects and describes their uses.
Table 1.1 - Database Objects and its description
Database Objects |
Description |
|
Tables store a database's data in rows (records) and columns (fields). For example, one table could store a list of customers and their addresses while another table could store the customers' orders. A database must always contain at least one table where it can store information all the other are optional. |
|
Queries ask a question of data stored in a table. For example, a query might only display customers who are from Texas. |
|
Forms are custom screens that provide an easy way to enter and view data in a table or query. |
|
Reports present data from a table or query in a printed format. |
|
A special type of Web page designed for viewing and working with Microsoft Access data from an intranet or over the Internet. |
|
Macros help you perform routine tasks by automating them into a single command. For example, you could create a macro that automatically opens and prints a report. |
|
Like , automate tasks but by using a built-in programming language called Visual Basic or VB. Modules are much more powerful and complex than macros. |