graduatiot theses - analysis and design of databases towards of efficient business processes en

93
University "St. Kliment Ohridski " Faculty of Economics - Prilep Grade of Economic Statistical & Cybernetic Subject: BUSINESS INFORMATICS ANALYSIS AND DESIGN OF DATABASES TOWARDS OF EFFICIENT BUSINESS PROCESSES GRADUATION THESES

Upload: vladimir-bojovski

Post on 16-Apr-2017

209 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

University "St. Kliment Ohridski "Faculty of Economics - Prilep

Grade of Economic Statistical & Cybernetic

Subject: BUSINESS INFORMATICS

ANALYSIS AND DESIGN OF DATABASES TOWARDS OF EFFICIENT

BUSINESS PROCESSESGRADUATION THESES

Mentor: Candidate:Prof. Dr. Kosta Sotiroski Vladimir Bojovski

Page 2: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

PRILEP, 2014

Content:DR@INA

CONTENT 2INTRODUCTION 31. DATABASE 8

1.1. Types database 81.1.1. Hierarchical database 91.1.2. Network database 111.1.3. Relational databases 131.1.4. Object oriented databases 171.1.5. Object relational database 18

1.2. Organization and data processing 202. ANALYSIS AND DESIGN OF DATABASES 23

2.1. Reproduction database 242.2. Architecture database 252.3. Design database 272.4. Data modeling 29

2.4.1. ER data model (ER diagram) 302.4.2. Method for creating relational database 36

3. Management System database (DBMS) 443.1. Microsoft Access 46

3.1.1. Creating a relational database in Microsoft® Accesstm 2013 46CONCLUSION 72REFERENCES 73

2

Page 3: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

INTRODUCTION

In tough economic times or sometimes for long periods when businesses are facing a shortage of funds, they seek ways all processes from their operations to make poefkasni. It happens in favorable economic times, when money is available and when companies are facing financial problems, in such conditions they seek ways to improve operations and increase production in order to improve products and services I hope that it will attract more users. All these tasks and activities carried out in business organizations, and aimed at producing a particular product or service that is intended for certain customers, are Business process. Any company or any business organization is a set of business processes that are executed through the most functional units of that business entity or business organization. As functional units that commonly occur in companies can be mentioned: accounting, marketing, production, human resources, research and development, and there may be others, depending on the size of the organization and the type of products and services offered it. Besides individual organizational units, some business processes can include external entities that are directly related to the business organization or its activities (partners, suppliers, customers, users). While the perpetrators of various business processes occurring employees from different levels of the organizational structure of the company, from executive employees who are directly involved in the production of goods and services, then the managers at various levels up to the top management.

All participants in business processes require different types of data and information on business operations of the company. Some participants need more general information, some require more data and information, some of the current work, some for the overall operation, but whatever the nature of the data and information they need to provide and to submit sodvetnite available to participants, and in order to give support to the adoption of relevant business decisions, choosing the right business decisions, taking the appropriate business actions, or more simply, the effective implementation of relevant business processes.

From previously stated, we can conclude that the data represent one of the most important resources of enterprises. Without possession of accurate, relevant and reliable data and accurate and timely information on the overall business of the company for the operations

3

Page 4: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

of competing companies, economic developments and conditions in the environment and global economic trends can not be taken relevant decisions and be made the right choice of solutions for successfully organizing and implementing business processes that can not ensure successful operation of the company.

Data in their original form are not always very useful and effective and not convenient tool that can contribute to adoption of the relevant solutions and business decisions, and thus help in the effective implementation of business processes. Data before being used by individual business functions, individual services, management bodies and managers of different levels in the company, they must be processed in order to bring in a form that will be appropriate to their needs.

Today all operations with the data processing and manipulation are completely automated, and especially in recent years, or more precisely a decade happens when one of the most important events in human history, known as the information revolution. Computers or computer systems and computer networks are becoming or already are part of the business activities of all business organizations, even the smallest. All that information technology, all computers and computer systems allow ease of solving business problems, increase productivity in business and enhancement of quality of products and services. Thus, data processing in business organizations already fully executed by computers. Multitude of operations which is performed upon data in computer systems, in order to produce information is called "cycle of data processing" and it consists of four components: input data, data storage, data processing and output of information . In the entire cycle of data processing, they have a significant role and end users of these data or users of information will be produced at the end of the treatment cycle. The end users are the ones who need to identify which data should be entered into the system, how to be organized, updated, stored, and how to access them.

When entering data into the system, they are marked with special features in order to facilitate their subsequent processing. Data processing may be carried out in the form of "batch processing" (gather larger quantities of data, so all are processed at once) or processing is carried out in real time. At the end of the cycle of data processing, a component of this last cycle is output to the display information. In the course of the three previously mentioned operations (input, processing and output), the data must be stored somewhere and storage must have some form of organization of data. When storing data can be used file pattern that represents the oldest form of data storage or database model.

When using the file systems appear rather problems of data duplication, this phenomenon of duplication of data is known as redundancy or redundant data or the same data may appear in multiple files. This in turn causes the duplication operations such as entry and maintenance data. Then, in a correction data in one file the same information in another file remains unchanged, causing inconsistent data, so in case of processing systems which are based on computer systems with limited memory resources, emerging problems with shortages memory because unnecessary duplication of data doubles the use of free memory space. For these reasons it is accessed to change such systems based on the use of files with a new form of storage and organization of data known as Database.

Database, according to generally accepted definition of several authors dealing with this issue, a "collection of related data". The database first appeared in the sixties of the last century and they were designed to solve the problems of traditional "automatic data

4

Page 5: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

processing", ie systems that were based on using files. Databases have many advantages over the file systems. The use of databases as a form of organizing and storing data provides: data consistency, data integrity, flexibility, independence and removing redundanosta data. The purpose of the use of databases is transforming data into useful information. As far as can be utilized database depends on how it is physically and logically structured. When we talk about the physical organization of the database, meaning the actual physical placement of the data. When we talk about logichkototo structuring based think of the conceptual aspect of organizing the various data models and relationships between them. From that point of view there are three basic models for logical structuring of databases: hierarchical, network and relational databases.

Without stake for the model database in question, the database is always a collection of interrelated data and the purpose of their use is always the same, that is: to provide effective relevant information needed in management and governance organizations or their business processes, and in order to achieve greater profits. In order database to be able to accomplish the goals for which it was created, it is in its construction, implementation or modification if it has already implemented the database, to be observed certain rules and procedures. In practice there are numerous examples of an erroneous procedure led to the implementation of new technology are not getting the expected business results. Precisely this indicates a need for applying special methodology for the planning, implementation and maintenance of databases, which is known as Analysis and design of databases. With this methodology, the procedure of implementing the database in a business organization period covering the lifetime of the database and from that point of view be divided into the following phases: needs analysis, data modeling, creation of physical and logical design database, implementing, testing and maintenance of the database. Only in this way designed and implemented database can contribute to the effective implementation of all business processes in the business organizations.

During the business operations of companies, databases constantly being updated with new data. As the number of activities carried out in the business processes so has the database. When the database becomes so large and complicated that simply no longer able to control the course and development of the data, it is necessary to move to a higher level of organization of the data that is needed is the introduction of a system to manage the database. Today, during the revolutionary development of information technology, databases are based on computer technology. Very often confused or equate the terms database and management system database although the two different concepts. The term "database" refers strictly to the collection of data, or software program that controls and manages the data and relationships between data and application programs, a "database management system" (DBMS, - "DataBase Management System ").

Database Management System shape the physical structure of the database in accordance with the required logical structure, carry out all operations with the data on behalf of the user, and also take care of security of data and automates all maintenance work around the base data. Data in the database are logically organized in accordance with a corresponding data. Data Model is a set of rules that determine how you look logical structure of the database, ie to determine the model of the database. Accepted and most widely used model of the database is relational model, which is based on the concept of two-dimensional tables. This model is a very flexible model of a database in which there is no hierarchy of logical

5

Page 6: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

organization of data, but the data is spread across multiple tables. The main advantage of this model is its simplicity. Relational databases management systems are supported by multiple software packages, which can be illustrated by the following: Microsoft Access, Oracle, Microsoft SQL Server, MySQL and others. Well-organized management system database will allow to provide software that will allow the user to easily communicate with the database. Easier communication with the database will mean getting more accurate, more timely and relevant information they need to participants in business processes, which in turn will mean efficient execution of business processes and achieve the objective of the business entity or company.

This paper shows the importance of databases in order to effectively execute business processes. First shown models of databases, order of the hierarchy of development, with special emphasis on the relational model as the most widely used model in practice. After showing the organization of the database, ie the organization and patterns of data in the database. Here it is shown the architecture and methodology of creating and maintaining the database in order for it to be convenient tool which will provide the necessary relevant data and information needed for successful organization and implementation of effective business processes. Finally, theoretically described a system for managing databases (Microsoft® Accesstm 2013), which is one of the most modern software solutions from the area in addition to this explanation, is a concrete example of a relational database in order descriptive to explain the benefits that are hiding in its use.

6

Page 7: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1. DATABASE

What is a database? Database is an organized collection of related data used in organizing daily business operations. Whether you are using paper or a computer software program, as long as data is collected in an organized manner and are stored in an organized form for a specific purpose, it is a database. The purpose of the use of databases is integrating individual data or transforming data or isolated facts into information. When the data will be stored in the database, it should be easy for them to extract information, using specific search criteria. How will it be easy search and retrieve information depends on the way the data in the database are stored and organized. And not only for search, but the base should be so organized, to be lightweight and input method, correction and deletion of data. How and how you can use the database depends on the model of its logical and physical organization. Data in the database are organized according to their model, in order to facilitate and make more efficient way of searching and data modification. Data Model is a set of rules that determine how a logical structure of the database. The model data is the basis for the conceptual development and implementation of the database.

1.1. Types of database

When he first appeared databases, they were designed to solve the problems of previous systems for data processing or systems that have been based on using files. Systems databases have many advantages compared to systems based on files before they are provided: data consistency, data integrity, reporting flexibility, independence between the data and the application programs, joint separation of data and information, protection and security data, the central data management and removal redundanosta data.

7

Page 8: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Depending on the model structure and data operations over the data and constraints differ following types of databases: hierarchical, network, relational, object-oriented and object-relational databases.

The process of developing systems for storing and processing data, exposure is shown in Figure 1.1.

2000

1990

1980

1970

1960

1950

Before 1950

File system Hierarchical databases

Network databases

Relational databases

Object-oriented

databases

Object-relational databases

Figure 1.1. Chronological development of databases

1.1.1. Hierarchical database

The hierarchical model is a model of the first database of the company IBM, represented in the first 1960. Hierarchical databases are generally very large bases with very large amount of data. Hierarkiskite databases are relatively easy to understand, because of the fact that every day, in many areas of society come across any hierarchy. If it comes to business, it is inevitable to mention: executives, managers, supervisors, senior workers, ie all participants in business processes and all hierarchically arranged according to the level of decision-making.

When talking about database hierarchy is basically a method of organizing data in levels or ranks, where each grade has an advantage over that below. The hierarchy can imagine the kind of tree, or rather inverted tree.

8

Page 9: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

A hierarchy arrangement of certain structures which are called "fields" in which specific data are stored, and these fields are associated with lines or "branches". These lines represent branches or connection or connection to the next higher level or rank accommodating more complex information. The field at the highest level is called the "root" of the tree hierarchy or main field in the database. The fields in the hierarchical database are interconnected in relation "parent-child" where the "parent" is just above the "child". Relations between parents fields and children fields establishes links which are called "pointers". Figure 1.2. It is of the hierarchical tree database designed store.

Figure 1.2. Hierarchical database.

In our example represented in Figure 1.2., The "Store" is the root of the tree, a field is generally in the database. Each area except the main box is connected up with a single field "parent", and each field is "parent" can be linked down multiple fields "children." In our case, the "Buyer" is the parent of the "Drinks," and as the "child" is always one level directly below his field "parent", the "drinks" a child of the "buyer".

In the hierarchical model database, parent-child relationship provides a systematic approach to data. To accede to a field, you need to start searching from the initial field (root or main field), to proceed to the appropriate field of child next level, and so on, until you reach the required field. From this it can conclude that the problem with this system is that the user must know the structure of the trunk to be able to find any information. Search will be facilitated if requested data is located in the main field, which will field its parent in this case is not at all necessary to know the structure of the stem.

The model of hierarchical database has certain disadvantages arising primarily from the strict rules of relationships. For example, it can be added in the recording field, while the

9

Shop

Buyer Seller

Drinks Food Permanent SeasonalOther grocery

Alcohol Juices

Page 10: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

child is related to the field parent. Thus, in our example, it can be added to drinks not bought a single buyer. Also hierarchical model database, there redundanost data, which occurs because the hierarchical database only works with one versus many relationships, but not very much opposed. In the above example, if one Drink is bought more Buyers will occur repetition of data because the data for the same Drink will be involved in more Buyers. In many cases the need arises for a field-child to be associated with multiple fields parents. For example, the nature of the relationship between the fields Buyer and Drink is very much opposed. This means that one Drink is buid by more Buyers, but one Buyer purchases more Drinks. Another problem with the hierarchical database can occur if a field is deleted parent. In this case deleted all its children fields or deletes entire tree under the wiped area.

The main advantages of the hierarchical model of the database consist of the following: working with large-scale database, a tested technology that has been used for many years, ease of use and understanding of the hierarchy or tree structure, and the speed of the system.

1.1.1. Network databases

Network model database is a continuation or extension of the hierarchical model. This model providing multiple parent-child relationships between data fields in order to solve the problem of duplication of data which is one of the biggest problems of the hierarchical model.

One of the shortcomings of the hierarchical model of the database was that a field-child can have one and only one parent, and as a result in the creation of more complex relationships appears duplication of fields or tables with data, ie data redundacija . For example, if we implement a record of products in a store, you'll need at least three parent-child for the same type of products, as shown in Figure 1.3.

Figure 1.3. Database which required multiple parent-child relationships.

10

Buyer

Products

Seller Supplier

Page 11: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

In this example, the need to keep records for three different products from three different aspects, the records of the products in terms of purchase in order to get stops on what products they buy most, recording the products in terms of vendors in order to obtain information on the performance of vendors or products that most sell and records with respect to suppliers of products in order to have information which the supplier what products delivered.

If, in this example, the organization of the data we use the hierarchical model database, then you will need to do three areas "Products", one for each of the fields parent for each product. Such duplicated fields occupy additional space of memory and slow down the process of processing and search. In the said example, the three relations to the right products, every new registered product must be entered in all three fields parent. Conversely, if we use this model to a database that allows every field-child to have more than one parent, every new product can be entered only once in the corresponding field and thereby solve the problem of redundanost data. From this it can be concluded that the network model database, as the previous model has a hierarchical organization of fields, except that every field-child may have more than one field-parent. This relation is described as a relation "more toward more" and link the fields is accomplished through relationships that are called pointers (pointers).

To enable fields, children have more than one parent, and thus solve the problem of duplication of data, network model database uses the concept of representation of the relations in the form of sets. Using the network model database, the database was presented in Figure 1.3., We can present the following picture 1.4.

Figure 1.4. Network model database

Although network model database represented a significant improvement over the hierarchical model, it was far from perfect. This model database was cumbersome and very complicated to implement and maintain, and it meant that they could only operate and manage

11

Buyer1

Supplier2

Supplier1

Seller2

Seller1

Buyer2

Drinks1

Drinks2

Food 1

Food 2

Hygiene1

Hygiene2

Multiple products

Page 12: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

IT professional. Major shortcoming of the network model is the need to define in advance all the links and data fields.

The main advantage of this type of database is considered the speed, ie the short time that is needed to insert and delete data, primarily due to the elimination of duplication of data fields.

1.1.1. Relational databases

Relational model database is the most popular model-based napodatoci used today. This model represents a significant improvement on previous models of databases and foremost, in terms of simplifying the organization of data, search data, as well as adding and deleting data from the database.

Relational model database was developed in the eighties of the last century by EF Codd, an employee in the company IBM, and in order to solve the problems of hitherto existing models. Relational model was built on mathematical concepts and its foundation is the concept of a table.The basic unit of data storage in relaciskata database table is a set of related data. Each table consists of rows known as entities and columns known as attributes. They entered the ranks individual data and are also called records. The columns containing values or properties for all rows, and are called fields (eng. Fields). Tables can be linked to other tables, columns by common values that are called keys. In the relational model database, allowed three types of relationships or connections between the tables as follows: one to one, one to many and many to many. In this model the database, a table can require the existence of any record based on the existence of such a record in another table. Some tables may require one or more entries that correspond to one or more records in another table. The following picture 1.5. an illustration of a relational database in a store consisting of multiple tables.

12

Orders

Suppliers StockProducts

Sellers Buyers

Page 13: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 1.5. Relational model database.

As can be seen from the picture, the relational model database no main table (root), although relations between the tables have a parent-child table, each parent can have multiple tables children, and each child can table have multiple parent tables.

Each table in relaciskata database is marked by name. Name of the table used by the system management database to find the exact physical location of the table in the warehouse or in the memory, because we are talking about databases based on computer technology. Unlike previous models of databases to which the user can access data and perform any operations on them must know how the data is organized in the database, ie to know the structure of the database, this model can user to use the table needs to know only her name and no need to worry about how data is organized and where it is stored. In this context, it should answer the question: how user data located in relaciskata database, if you do not know the structure of the base, or if there is no monitoring system, as a system of indicators in the hierarchical model database ?

In the relational model database, manipulation of data is performed based on the values of the data itself. So, if the user wants to access to a record or row in a table, it should be made by comparing the value of the data within a column of that row with some search criteria. Detailed explanation of the above may be given by the following example shows a picture 1.6., Showing the relational database for employees in a company and their monthly income.

Table: EmployeesName Surname ID number Address CityPetar

Mirjana...

John

McDonaldDimitrovska

...Smith

01019724700010202973475002

...0303974470003

Goce Delcev 200Jane Sandanski 101

...Macedonia 1903

TetovoPrilep

...Skopje

key field

Table: SalariesID number Month Turnover Work hours Salary

01019724700010202972475002

...0303974470003

6/147/14

...8/14

130000270000

...23000

162190...

180

1200016000

...15000

Figure 1.6. Relational database.

13

Page 14: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

In the example we can notice that both tables have a common field, it is the "ID number". This common field is a key field but is used to connect the data from both tables. For example, if the company wants to send the calculations for payment of salaries to home addresses of employees, first read the whole entry (name, surname, ID number, address, city) from the table "Employees" and then read by ID number required entry in the table "Salaries", which have the same identification number (which would mean that the same applies for the employee). Lookup record in the table "Salaries" read data Month Turnover, hours and wages, which are required to fill out the form for payment of salary which should be sent to the home addresses of employees.

This methodology accession makes relational data model much better than previous models databases. Relational model database is a very simple design, retrieval and maintenance and allows connection of records in a way that is not predefined, which is perhaps the biggest reason for the popularity is still on relational systems databases.

The main benefits of relational model database can be listed as follows:

• Fast access to data,• the base structure is easy to change,• The data is logically organized, so users will need to know the structure of the database, ie there is no need to know exactly where the data is located.• Easy to achieve data integrity.• Easy to set complex search criteria data.

As disadvantages can be stated as follows:• Because of the large amount of data, the database can be composed of a number of interrelated tables, which consequently can cause delayed based search and access to data. Slow search and long access time can contribute to inefficient processing.• Another drawback is the mandatory application of the principles of quality the design of the database, in order to achieve data integrity.• Users must have a good knowledge of the relationships between tables.

From all said above it can be concluded that the relational model database is a very flexible type of database that is characterized by great simplicity in handling the data (add, change and delete data).

1.1.1. Object oriented databases

The last few years, the use of programming languages such as C ++, Java and Visual Basic, an object-oriented programming has become quite popular. Object-oriented programming languages allow the programmer to work with objects when creating applications that can work with relational databases.

14

Page 15: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Object-oriented models of databases based on objects that represent segments that contain data and programming code that describes the data elements. The following figure 1.7. It shows the pattern of an object-oriented database.

Figure 1.7. Object-oriented database

As you can see in the figure, object-oriented databases have a hierarchical structure. Each hierarchical level object-oriented database consists of classes of objects. Classes represent the equivalent of tables in relational databases. Class facilities a template, which defines the attributes that should be included in a certain type of object, so the picture 1.7., Fields current assets and receivables represent classes of objects. The last level in the hierarchy are individual objects. Each individual object is assigned an identifier that has the same role as the role of the primary key in relaciskkiot model database.

In object-oriented databases, in addition to simple data types such as standard text and numerical formats can be stored and processed and complex data types such as graphs, maps, images or sound.

As a major lack of object-oriented databases is slow work, because in practice often combined with relational databases.

15

Resources

Fixed assets

Mirjana

Working capital

Cash Order Stock

Matthew

Other

Page 16: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1.1.1. Object relational databases

Object-Relational Database (ORD) is a Database Management System (DBMS) which is composed of relational database Relational DataBase Management System (RDBMS) and Object-Oriented Database (OODBMS - Object Oriented DataBase Management System). ORD supports components of any model of object-oriented model to the database in its schemes and inquiring used language such as structures and classes.

Although there was a rough correlation between object-oriented and relational models of databases, object-relational model was developed to link relational model of database objects-oriented style of programming. Object-relational model should represent the best sides of both aspects (relational and object-oriented). In other words, object-relational model database is said to be a mediator between relational and object-oriented databases because it contains features of both models. In object-relational model, the basic approach is based on Relational Databases (RDB), since the data is stored in traditional databases and are managed and pristapuvani using written questionnaires inquiring language like SQL. ORD also shows object-oriented features in that database are considered a store of objects that are running software that is written in an object-oriented programming language. The main purpose of ORD is to bridge the gap between the conceptual modeling techniques of data relational and object-oriented databases. It also aims to connect relational database and object-oriented modeling techniques typically used in programming languages such as Java, C # and C ++.

Figure 1.8 shows an example of implementation of objetno-relational concept in management system relational databases. The given example refers to a database of records of customers and products in a store. In the example, created two user-defined tables "customer" and "product". Each table has columns containing specific data on the column in the base table "shop", thus providing a 3D effect for the data. Thus, the column "buy_info" the basic table "shop" is associated with the table "buyer". Table "buyer" is divided into specific categories, or fields "name", "surname" and "PIN".

The main benefits of object-relational model database is that relaciskata database gets 3D architecture.

As a major lack of object-relational model database is that the user must understand the two concepts, and object-oriented and relational.

16

Page 17: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 1.8. Object-relational database.

1.1.1.1. Organization and Processing Data

The data represent one of the most important resources for enterprises. The existence of relevant data does not mean that they are very useful and that they can receive the necessary relevant information. Companies must have prepared easy access to data, and end users need to know how data is organized and stored and how to access them.Organization of data means their furnishing. Organization of data in files is a way of organizing that data are physically stored in memory units. The organization of data files can be of three types: sequential, direct and index-sequential.The set of operations that are performed on the data in computer systems, in order to produce information, called cycle of data processing. The cycle of processing data comprising the four operations on the data:

17

SHOP

BUY_INFO BUYERSEL_ИНФО PRODUCTPROD_ИНФО SELLER

PRODUCT

TYPE VARCHARBREND VARCHARQUANTITY VARCHAR

BUYER

NAME VARCHARSURENAME VARCHARPIN VARCHAR

Page 18: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

• Collection and acceptance of data or input data.• Store the data or memory storage units.• Processing of the data or their updates.• Viewing data or output information.

Data Entry. When entering data, the input data are accepted by the system and are transformed into a form that is readable for computers. To facilitate subsequent processing, data entry is accompanied by the following preparations:Classification - are appointed codes identification data.(Example: codes of the products in stores, codes of accounts in the accounting plan).Verification - This operation provides accuracy of the entered data, ie checking of data in order to prevent mistakes when entering them.Transfer - data immediately after acceptance, are transferred from one to another location for further processing (eg: point-of-sale terminals).With the development of computer technology, almost without exception all systems processing data based on computer systems. The data are accepted by the original documents on which is located the initial recording data to be imported. The original documents are entered into the system by scanning or keyboard. With the development of e-banking, incoming data can be obtained directly in digital form and can be accepted by the system for processing the company's data, which significantly reduces its costs.Data storage. For more efficient processing of the data, they must be organized so that it can easily and effectively access them. The following will explain the basic concepts that are closely connected to the organization of the data:Data is formalized sign display of facts, terms and regulations, suitable for communication, interpretation and processing. Data can be in any form that is physically recorded any event, monitoring or fact or form which can transmit information. The data can be displayed in the form of values, numbers, signs or symbols that give some information and are classified in predefined rules.An entity is any simple object of consideration and is of interest to the company and which are collected, stored and processed data as could extract information. Entities usually displayed in the form of tables. Example of entity products, customers, vendors, etc.Each entity has attributes or characteristics that describe, but should be stored. For example, the attributes of the entity products are the cost of the products, etc. The type of product.In order to be processed, and they can produce the necessary information, in systems where the data is stored and kept them organize themselves into groups or categories. Each successive group is more complicated than the previous.Sign. The sign is a letter, number or special character such as punctuation marks or sign $.Field. The field contains many associated characters. For example, the ID card the person's name is a field, another field last name, street name, etc. third field.Save. The record is a collection of related fields. For example, what is written on the ID card of a person is a record.File. The file is a collection of related records. For example, all data from all ID cards of one city may form a file.

18

Page 19: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Database. Database is a collection of files so organized and connected to contain minimal redundacija data and allow users access to data with minimal restrictions. For example, data from identity cards and other relevant data may be placed in a more logically related files that make up a database.Data Processing. For data processing means continuing processing the changes and updates the stored data. Mostly in the process the data are adding new records, deleting already stored data, various changes in existing records, then various calculations, comparisons, filtering data, and downloading and storing data for further processing and display. Data processing can be performed in two ways: the first way is batch processing, and the second way is processing in real time. With batch processing, data is collected over a certain period of time (hours, days or weeks) and then processed all at once, such as batch or batch. Processing real-time data is processed at a time when changes occur and the data. Using modern methods of electronic operation exclusively involves the use of processing in real time.Output information. The last step in the processing of the data is displaying output information. Output information can be displayed in various forms of reports. The form of such reports depends on the purpose of the reports themselves and the users that are intended, for example, within companies, to produce reports intended for the management and the goal that would have been used can be adopted various decisions on business operations.

19

Page 20: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

2. ANALYSIS AND DESIGN OF DATABASES

Procedure or methodology for the establishment, operation and maintenance of the database is called Analysis and Design of database. The development of the systems is based on the analysis of the database. Analysis of the database directly affect the design or of what will be the database, ie whether and how it will be helpful. Analysis of the database can be divided into two parts. The first part is an analysis of the conceptual model, and the second is the analysis of the logical model.Analysis of the conceptual model. Conceptual model is abstraction and generalization of the real world. It provides a description of the data or the objects and their relationships with one another, thereby satisfying user needs for data and information. Powerful tool conceptual model ER model (eng. Entity-Relationship model). ER model is problem-oriented conceptual model, which uses a simple graphical way of explanation of the data from the real world. This explanation is much closer to the way people think, than to the way data is represented in the database and how to access them. ER model consists of various types of objects, or types of entities, values of the entities and relationships between entities. Model database based on the construction of ER diagram.Analysis of the logical model. Because conceptual model is an abstract expression of the needs of users, it may not be supported by any specific management system database (DBMS). In order to be able to establish an appropriate system, the conceptual model should be transformed into a logical model, and this would finished designing the logical structure based on podaatoci. Design or design of the logical structure of the database is divided into two steps. The first step is the transformation of ER diagram ER model. The second step is optimizing the ER model. Throughout the process, there are the following specific steps: the entity turns on or spreadsheet data. The properties of the entity attributes of the table, ie the field properties in the table's primary key relationship. The diagram of the logical model, which is the analysis of tables and fields is based on the ER diagram. After making the decision which fields and tables we need, you can create a model database.Design database. When you have a model of the database, you can move to design or design of the database. According to different models, you can create various databases, and begins the selected fields and tables.

20

Page 21: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1.2. Database life cycle

The introduction of the database in a company or an institution is a complex task that requires teamwork of experts from various profiles and backgrounds. It is a project that can be divided into five phases, which actually represent the life cycle of the database. The phases of the life cycle database are:

• Analysis of needs.• Modelling data.• Implementation.• Testing and• Maintenance.

Needs analysis. At this stage study of information flows in the company, determines the data to be stored and the links between them. Needs that should satisfy the database are determined chatting as with suppliers of data and the users of these data or information.With the needs analysis should also include analysis of operations (transactions) performed over data because it could have an impact on the final form and content of the database.The result of the analysis of needs is a document which is called specification needs. The specification needs to contain the necessary data to be processed, the nature of relationships and the software platform for the implementation of the database.Data modeling. The global pattern diagram of a conceptual data model that shows all the data and their relationships, construct or develop using the ER diagram. Constructed data model must ultimately be transformed into a normalized relations or tables. With ER diagram analyze and model data required. The necessary operations are performed on the data are expressed in natural language, understood by users.When there is a larger project if more people are involved in needs analysis, appear multiple views of data. In order to eliminate inconsistencies and redundacijata data model, these views need to be streamlined and thus to unite in a global view.Functional Dependencies (eng. FDs - Functional dependencies) are obtained from the diagram conceptual data model and analysis of needs, from the specification needs. Specific relational tables that are related to all functional dependencies are normalized (ie, the tables are split into smaller tables), using standard techniques. Finally, redundanosta data in certain normalized tables are analyzed for further elimination, with certain restrictions that will ensure data integrity.The physical design of the database include the choice of the access method, division and grouping of data. Data integrity is ensured with normalization of specific tables created when the conceptual data model is transformed into relational model. The purpose of the physical design is to optimize performance as much as possible.Implementation. Based on schemes and sub-schemes, as well as using the system management database, the database physically realize the computer unit. In DBMS-by usually are parameters that can influence the physical organization of the database. The parameters

21

Page 22: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

are adjusted so as to ensure efficient operation of the most important transactions. At this stage develop a set of programs that implement individual operations that meet the needs of various applications or users. Initially, the top base is filled with data.Testing. Users of earlier test work on the base and check that meets all needs. This phase seeks to detect errors that could occur in previous stages of development of the database. Errors in earlier phases have serious consequences, so it would be good such vulnerabilities to discover before implementation. Therefore, in recent years, before the implementation phase, develop prototypes of self-reliance of data and they are shown to users.Maintenance. This phase takes place at a time when the base is already in use. This phase consists of the following: repair of errors that were not detected in the testing phase, introduction of changes due to the new needs of users, tuning the parameters in the system management database to improve performance. The maintenance required to constantly monitor the operation of the database, but it does not follow bother users.

1.2. Database Architecture

Architecture of database is a collection of specifications, rules and processes that require such data will be stored in the database and what will be the approach of the components of the system to the data. The architecture includes types of data relationships and naming conventions. The architecture of the database describes the organization of all objects in the database and how they operate together. It also affects the integrity or completeness, reliability and performance of the database and includes what determines the nature of the data, or data structures over the data. The architecture of the database consists of three levels, namely:

• Physical Layer• Global logical level• Local logical level.

The following figure 2.1. It provides a graphical display of the three levels of architecture of the database.

22

Page 23: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 2.1. Architecture database

Global logical level. Global logical level refers to the logical structure of the entire database. It is a level that sees the designer based or administrator. The record of the logical schema definition is called (eng. Schema). The scheme is a text or a diagram defines the logical structure of the database, ie name and define all data types and relationships between these types, and in accordance with the rules of the specified model. The scheme also introduces restrictions that ensure data integrity.Local logical level. Local logical level refers to logical display that part of the database used by an individual application. It is a level that see the user and application developer. The record of a local definition is called logical view (eng. View) or sub-scheme. It is a text or a diagram designating and defining all local data types and relationships between these types and again in accordance with the rules of the used model. Also, the look is done copying (eng. Mapping), with one of the global information and communications are performed locally.Physical level. Physical level refers to the physical display and arrangement of data memory units. This level only see system programmers who develop management system database

23

Local logical level

Global logical level

--------------------

Fisical level

Files Files

Schedule storage

Schema

Application program 1

Application program 3

Application program 2

View 1 View 3View 2

Page 24: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

(DBMS). The mere physical level can be further divided into multiple sublevels of abstraction from concrete blocks and cylinder drive, to abstract concepts such as files and records that we encounter in classic programming languages. Schedule storage described as elements of the logical definition of the database are translated to physical devices.Establishing a database needs to be set only scheme and views. Then the system management database automatically generates the required layout of storage and physical base, the administrator can only partially affect the physical construction setup of certain parameters accessible.Programs and users directly accessing the physical database, but receive or store data by means of management system database (DBMS-enabled). The communication program or user in DBMS-by accomplished local logical level.

1.2. Database design

For any thing from any area of everyday life, something to start doing, create first necessary to make certain design and layout, and an example of preparation of food is needed prescription for building a house requires a project or design as the house will look so.When creating the database also it needs to organize the data and to determine objectives. The objectives of designing or creating are as follows:

• Eliminate unnecessary extra data.• To enable fast retrieval of individual data.• To allow easy maintenance of the database.

Key activities during the creation of the database are as follows:

• modeling applications.• Define the data necessary for applications• Organizing data in tables.• Establish relationships between tables, the requirements for indexing and evaluation of data, and the drafting and recording of all the questionnaires concerning applications.

Modeling applications for proceedings in which define the tasks to perform application. It would be well-defined tasks to specificarame in a document that will help us to be focused on the task of our program. Under the normalization of data means eliminating unnecessary data. The result of the normalization of the data is any data in the database can only occur once. If the data appear multiple times, then lost memory space and if there are some changes, we will have new information to put into the fields to which it relates. But if you make multiple tables where each data appears only once, in the event of any change new information will enroll only once. Another way to normalize data to a form etc. table "child." Child table is a table that all entries share a common information is stored in another table. The table search is another way to accommodate information in order to prevent the occurrence of unnecessary information and increasing the accuracy of input data. When we

24

Page 25: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

normalize the data, interrelated information you place in several tables. However, when we want to access data and want to see the information from all the tables together to achieve that we have to create sets of records that unite the interrelated information from several tables. This set of records is formed by using commands written in a programming language (eg. SQL, ODBC, OLE DB, ADO) which is supported by the management system database, where we provide the desired fields, and location fields relationships between tables and these orders can accommodate such questionnaires in the database.Well-designed database enables: minimal time finding records, data storage in the most efficient way, so that the database does not become too great, the simplest update data, and the inclusion of new features that may be requested by program .

1.2.1.2. Data modeling

The most important part of any business process is keeping records data. In today's developed information society, most of the computing power is dedicated to the maintenance and use of databases. Various types of databases can be found in almost any business. All kinds of data, from email and contact information, to the financial data and sales data is stored in some kind of database.

Data Model is an abstract view of the data. Data Model describes the data or sets of data and links between them. In other words, the model of data is conceptual presentation of the structure of the data in the database. The structure of the data consists of objects, relationships between objects, as well as rules that govern the operations performed on objects. Data Model is directed primarily to what information is required and how they are organized, rather than what operations are performed on the data. The model data does not represent data in the way shown in the database, but shows the way that end users see in real life.

Data modeling is the process that begins by analyzing and identifying the needs of users for information and ending with the establishment of an appropriate database. Depending on the needs that arise during the construction of the database, three different types of data models: conceptual, logical and physical data model. The description of objects and their relationships are called conceptual description of data. In line with the conceptual description should determine and deployment of data files and tables, such a description is called a logical description of the data. The last step is determining the physical placement of the data memory unit and how they can be accessed. Such a description is called physical inventory data.

The purpose of the model data is to provide all the facilities in the database to be fully and accurately presented. Since the model data used easily understandable symbols, it can be examined and tested by the end users. Data Model should also be sufficiently detailed so that it can be used by programmers as a blueprint when building the physical structure of the database.

There are two main methodologies used to create the data model: ER model (eng. Entity-Relationship model) and Objekten model (eng. Object Model). ER model is the preferred method of construction of the reference data to the relational database.

25

Page 26: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1.2.1. E-R data model (E-R diagram)

ER model defines conceptual view of the database and it is used in the phase of conceptual modeling data in designing database. ER data model is completely independent of management system database, the hardware configuration, as well as application programs. ER model is a graphical model that real or imagined world showing the relationship between the three basic elements, ie three classes of objects:

• Entities (eng. Entities)• Attributes (eng. Atributes) and• Relations or Communications (eng. Relations)

In the conception of the ER model as a graphical tool used diagrams, and one of the most ER diagram (eng. Entity-Relationship Diagram). ER diagram specializes diagram used to describe the relationships between the entities in the database. Figure 2.2. It provides a graphical display of the ER diagram.

Figure 2.2. Graphic display of ER diagram.

26

Entity

Attribute Attribute

Entity

Attribute

Relation

Attribute

Attribute

Entity

Relation

Attribute

Page 27: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Entities. An entity is something that we want to collect data and information, something that is able to exist and to be identified. An entity can be an object, event or occurrence. The simplest way is said entity can be defined. Examples of entities are: employee, department, student, house, location, a game, etc. holiday. In the ER model entity is represented by a rectangle, and the name of the entity is usually a noun and it is written in the rectangle, as shown in the following figure 2.3.

Figure 2.3. View the entity "employee" in an E-R model

The system may define two kinds of entities "strong" and "weak" entities. Although the role model of entities have "strong" objects in the system may appear and "weak" entity or entities that depend on another strong entity. For example, the entity "work experience" is a weak entity whose existence is directly dependent on the entity "employee" which is a strong entity. Weak entity is represented by a rectangle with double lines as shown in Figure 2.4.

Figure 2.4. Displaying weak entity "work experience" in an ER model.

Attributes. The attributes represent the characteristics of the entities that provide a detailed description of them. Any individual calling entity or attribute in relation is called an attribute value. There are two types of attributes:

• Identifiers and• Descriptors

Identifier (Key) is an attribute that is used to uniquely determine the appearance of the entity, or to identify the entity.

Descriptor attribute is used to specify characteristics of individual multiple calls the entity.

The identifiers and descriptors may comprise or be represented by a single attribute or multiple attributes. Identifier or key attributes represent a more complex key.

In ER diagram attributes are represented by an ellipse, and the name of the attribute is recorded inside the ellipse. The attributes associated with the entity line that characterize.

27

Work experience

Employee

Page 28: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 2.5. It is a graphic representation of the attributes associated with the appropriate entity.

Figure 2.5. Display attribute "name" which is characteristic of the entity "employee"

Key attributes or identifiers in the ER diagram are represented by underlined text. The following figure 2.6. It is presented entity "employee" with an attribute identifier or a key and two attributes descriptors.

Figure 2.6. Attribute "PIN" is a key (ID), and the other two attributes "Name"and "occupation" are descriptors.

Relation. The relationship is a relationship between two or more entities and as such it only depends on the relationship of the entities. Relations are explained in terms of: level, linkage and. In ER diagram relations are displayed with a diamond, the name of the relation is written in rhombus or by rhombus and usually the name is a verb that denotes some action between related entities.Graphic display of relationship between two entities is given in the following figure 2.7.

Figure 2.7. Displaying relationship "works in" inter-entity "Employee" and "Department".

28

employee name

Employee name

PIN

occupation

Employee Department

"Work in"

Page 29: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Degree of relationship represents the number of entities have been placed in mutual connection or participating in the relationship. Depending on the level, the relationship may be: binary, elongated unit, n-Arna and recursive.The binary relation is a relation of the second degree and it connects two entities. This is commonly represented about in the real world and often represented about one in ER model and modeling many systems use this type of relationship. The relationship presented in Figure 2.7. It is a binary relation.Ternarnata relation is a relation of the third degree and that a link between the three entities. This type of relationship is required when the binary relations are not enough to accurately describe the relationship. Ternarnata relation graphically in an ER model with diamond connected with lines three entities. Figure 2.8. gives a graphic account of the elongated unit in relation ER diagram.

Figure 2.8. Displaying elongated unit relation that connects three entities in the ER diagram.

General form of relationship than any degree n is called n-Arna relation to such relation participate n entities.Recursive relation is a relation that connects a single entity alone. This relation is called recursive because the entity is associated with another call him. Figure 2.9. gives a graphic account of the elongated unit in relation ER diagram.

Figure 2.9. Display recursive relation where separate employee is connected to another employee by the management.

29

“sales“Seller Product

Customer

Employee

submissive

controler

manage

Page 30: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

The connection of the relationship represents the number of possible appearances of entities in relation he number of possible calls still yelling and cardinality of the relationship. Kardinalnosta values "one" or "many". There are three types of cardinality in binary relations, namely: 1: 1, 1: N, M: N.The next three pictures 2.10 2.11 and 2.12 shows the three types of cardinality of relationships between entities.

Figure 2:10. Display cardinality of type 1: 1.

Figure 2:11. Display cardinality of type 1: M.

Figure 2:12. Display cardinality of type M: N.

In the case of cardinality 1: 1 (Figure 2.10), the entity "Department" is operated by just one employee and each employee manages exactly one department. Therefore, the minimum and maximum cardinality of the relation "is managed by" is exactly one of the two entities "Employee" and "Department".In the case of cardinality 1: M (Figure 2.11), the entity "Department" is associated with many "Employees", because the country of the entity "employee" is a maximum cardinality (many) as an unknown value M and the minimum cardinality is one. On the entity "Department", minimum and maximum cardinality one, because each employee works just in one department.

30

"It is managed by"

Department Employee1 1

“have“

Department Employee1 М

“work on“

Employee ProjectМ N

Page 31: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

In the case of cardinality M: N (photo 2.12), an individual employee can work on many projects and each project can have many employees. It is seen that the maximum cardinality of the entities "employee" and "project" in both directions is M (or N, or a lot), and the minimum cardinality of the two countries is defined to be 1 (one).The existence of the entity relationship is defined as Mandator (required) or optional, and thus the relationship is mandatory or optional. The relationship is mandatory (compulsory) if the entity at one end must be about the entity on the other end, otherwise the relationship is optional (optional). The next two pictures 2:13 and 2:14, graphic presents mandatory and optional relationship.

Figure 2.13. Display of optional (optional) relationship.

Figure 2:14. Displaying mandatory (compulsory) relationship.

In the example in Figure 2.13, the entity "employee" may or does not have to be operated by a department, making thus the relation entity with the entity Department Employee optional. The opcionality is defined by the zero line connection between the entity and relationship, the minimum cardinality of zero.In the example in Figure 2.14 the relation "is taken from" inter-entity "Office" and "employee" means that the Office can store from zero to maximum M employees, but certain employees must be placed in exactly one office, it is mandatornost (mandatory) and therefore the partnership is mandatory.

31

"It is managed by"

Department Employee1 1

"It is taken from"

1 МOffice Employee

0

Page 32: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1.2.1. Method for creating a relational database

The procedure for creating the relational database starts with the construction of the model ER. The construction of the ER model is an iterative process, so it is advisable to make a few versions, so their adaptation and amendment to come to that version is the best, while starting from the fact that there is no perfect solution, but most solutions are elected best .

The process of construction of a model comprising the steps of:

1. Identify the entities - are making a list of all types of entities that are of interest in the system. In this step it would be best to bring many entities, and later to reject unnecessary.

2. Remove duplicate entities.3. Identify the attributes of each entity.4. Celebration of the primary keys that identify entities or their calls.5. Defining relations.6. Describe the cardinality and the optionality of relations.7. Remove the redundant relations.

After constructing the ER model, after the second phase of the process of creating relational database, translating ER model in the relational schema. Translating ER model in relational scheme includes:

• Translating entities.• Translating weak entities.• Translating the binary relationship between the entities.

Translating entities. For each entity of the ER model to create a relation (table) that contains all the attributes of the entity. That is, the entity attributes in the table appear as columns, and each individual call the entity appears as a number or recording. When translating the entity relationship (table), the name of the entity becomes the name of the table and one of the key attributes or attribute identifier becomes the primary key of the relation. The following figure 2.15 an overview of the general appearance of the relation (table) and a written text in the table.

TABLE_NAME (primary key, attribute2, attribute3 ... external key)TABLE_NAME

primary key attribute2 attribute3 external key

Figure 2:15. A general view of the relation (table).

32

Page 33: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

From the previous example:- Ime_na_tabela, a name the entity that is translated in the table, so the table has the same name.- Primary key is the primary attribute of the entity in the table becomes the primary key.- Atribut1 and atribut2, are two attributes of the entity.- External key attribute is the primary key in another table and external key is required for each table. The plate can have multiple external keys, that may have an external key of each table which is connected.

Translating weak entities. When translating weak entities, the primary key of the strong entity adds the primary key of a weak entity and thus creates a complex primary key. In this case, the strong and weak entity must be related to the relationship 1: M. The following figure 2.16 is an example of connecting strong and weak in relation to the entity 1: M is a textual and tabular presentation of the translation of weak entity and creating a complex primary key.

COMPANY (CRN, num_employees)EMPLOYEES (PIN, CRN, name, position, experience)

COMPANY CRN num_employees

ВРАБОТЕНИPIN CRN name position experience

Figure 2:16. Connecting the strong and weak in relation to the entity 1: M. Textual and tabular presentation of the translation of weak entity and creating a complex primary key.

33

1 М

“have“

COMPANY EMPLOYEES

CRN

num_employees experienceposition

namePIN

Page 34: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Rules for translating binary relationships between the entities. The process of translating the links in the relational model depends on the degree of relation of kardinalnosta and opcionalnosta the route.Relations 1: 1. Before we enter into translating this relationship, you first need to know its opcionalnost. There are three possibilities that the relationship may have:

• To be mandatory at both ends.• To be mandatory at one end, and the optional other end.• To be optional on both ends.

Mandatory at both ends. If the relationship is mandatory on both ends, it is possible the two entities to be merged into one or stay apart.If both ends merge into one, then:

- The result of such a merger is that all attributes of the weaker entity become attributes of a stronger entity.- The key of the weak entity becomes normal attribute.- If there are attributes that are repeated, then the duplicates are removed.- The primary key of the new entity are obtained by merging the two entities and in fact the same primary key of a stronger entity.

EMPLOYEES (pass_employee, name, contract_num, start, position, salary)

Figure 2.17. Relation 1: 1, which is mandatory at both ends.

If both ends remain separate, then they will be connected to an external key, or that we have such a case, then:

34

position“have“

1 1EMPLOYEE CONTRACT

pass_employee

name salary

startContract_num

Page 35: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

- Both entities represent the two entities in the real world.- Entities are many relationships with other entities.- The primary key from one entity becomes an external key in the other.- In each entity no external key.- Both entities are converted into special relations (tables).

If in this case we use the example of Figure 2:17., This route will be able to present the following:

Employees (pass_employee, name)CONTRACT (contract_num, start, position, salary, pass_employee)

and vice versa:

Employees (pass_employee, name, contract_num)CONTRACT (contract_num, start, position, salary)

Mandatory at one end, optional on the other end. Figure 2:18 is presented as between 1: 1 which is mandatory at one end, and optional on the other, where each employee can have more than one contract, and it makes the relation optional on one end.

Figure 2:18. Relation 1: 1, which is one end of the mandatory and optional on the other end.

If the relationship is mandatory on one end, and the optional other end, then:

- Both entities remain separated and converted into special relations or tables.- The primary key of the entity by Mandator is added as an external key entity of optional side.

35

“have“

1 10

CONTRACT

position

EMPLOYEE

pass_employee

name salary

startContract_num

Page 36: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

If in this case we use the example of Figure 2:18., This route will be able to present the following:

Employees (pass_employee, name)CONTRACT (contract_num, start, position, salary, pass_employee)

Optional both ends. Figure 2:19 is presented as a relation of 1: 1 which is optional both ends.

Figure 2:19. Relation 1: 1, which is optional both ends.

If the relation is optional on both ends, then:

- Both entities remain separated and can not be merged into one, and it can not have the same primary key.

- Entities are many relationships with other entities.- The primary key from one entity becomes an external key in the other.- In each entity no external key.- Both entities are converted into special relations (tables).

If in this case we use the example of Figure 2.19., This route will be able to present the following:

Employees (pass_employee, name)CONTRACT (contract_num, start, position, salary, pass_employee)

and vice versa:

Employees (pass_employee, name, contract_num)CONTRACT (contract_num, start, position, salary)

36

CONTRACT

position

EMPLOYEE

pass_employee

name salary

startcontract_num

“have“

1 100

Page 37: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Relations 1: M. When translating a 1: M relationship, the primary key of the relation of one side is inserted in the side M (much) as the external key. Example:

Figure 2:20. Display between 1: M.

After translation, will be the following relations or tables:

DIRECTION (pass_direction, direction_name)STUDENT (index_num, name, birth_date, pass_direction)

If the entity is contained in several 1: M relationships, then apply the same rule when adding the primary key as a foreign key from one side of the relationship in the side M (many) in any relationship.

Relations M: N. If there are M: N relations in the ER model, they are translated as follows:- It creates a new relation that contains the primary key on both sides of the relationship.- They form a complex primary key primary key.- If the relationship between the entity contains attributes, then they become attributes of the new relationship.

Figure 2:21. Displaying relationship M: N.

37

1 М"Subscribed"

STUDENT

name

DIRECTION

direction_name birth_date

index_numpass_direction

"Sell"

pass_product

SELLER

name

PRODUCT

product_name address

pass_sellersale_num

amountprice

М N

Page 38: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

After translation, will be the following relations or tables:

PRODUCT (pass_product, product_name, price)SELLER (pass_seller, name, address)SALE (pass_seller, pass_product, sale_num, amount)

Last stage in creating relational database is converting relational scheme physical signs into a new relational database.

2. DATABASE MANAGEMENT SYSTEM (DBMS)

Management system database or briefly DBMS (Ang. Database Management System), a technology that enables easy and efficient access to all users to the database. DBMS serves as a communication link, ie as interface between users and the database. DBMS also provides software tools needed to create, use, accessing and updating the database, manages and input - output operations, and care and confidentiality of data. DBMS provides independent data, which means that application programs can be changed without affecting the stored data. Management System database, stores the data in a way that allows them easier to search, processing and assistance in obtaining information.Typically, the data was organized into files. DBMS is a brand new concept that was introduced in order to fix all the flaws of the previous way of managing data organized in files.Modern systems for data management have the following characteristics:

• Objects of the real world. Modern DBMS are very realistic and using objects from the real world when designing their architecture.• Tables based on relationships. DBMS allow objects and relationships between them to be presented in tabular form.

38

Page 39: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

• Minor redundanost. DBMS respect the rules of normalization, which allows splitting the table when in one of its attributes has duplication of values. The normalization allows the entire database can contain as little as possible duplicate data.• Consistency. Consistency is a condition when any relationship (table) in the database permanent.• Query language. DBMS is equipped with a question (query) language, which makes the system more efficient search and data processing. Users thus can use many different options to filter the data - this is not possible in systems for organizing data files.• Multi and simultaneous access. DBMS environment supports multiple users and allows parallel access and manipulation of data.• Multiple views. This means that the DBMS offers multiple views for different users. For example: a user who is in the sales department will have a different view of the database user who works in manufacturing. It allows users to access the database only within their needs.• Security. DBMS offers many different forms of security, enabling multiple users to have a different look with different features.

Management systems databases used by different users for different purposes. Some of them we can describe as follows:• Administrators. This group of users who maintain DMBS and are responsible for managing the database. They are responsible for monitoring how the use of the database and by whom it is used. Create access users and put restrictions reliability.• Designers. That group of people working on designing a database or some parts. They observe what data will be placed in the base and in what format. They define and design all objects, relations, constraints and views.• End users. This group includes people who actually use the benefits of the system database. End users can be observers of market movements or market prices, but may be professional and business analysts.

Management systems relational databases can be divided into two main categories according to whether a basis for or a file server. DBMS based file stored in a file (for example: Microsoft Access), easily distributed, but do not have too many good performance. On the other hand based on the DBMS server (for example: Microsoft SQL server) have improved performance, can support multiple simultaneous users, but more complicated maintenance and distribution. If the decision to create a database can select any of these management systems:

• Microsoft® Accesstm• Microsoft SQL server• MySQL• Oracle

39

Page 40: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1.3. Microsoft® Accessтм 2013

Microsoft® Accesstm a management system relational database (eng. RDBMS - Relational Database Management System), developed by the company Microsoft as part of the Microsoft® Officetm package. All standards applicable to Microsoft® Windows and other programs from Microsoft® Officetm package valid for Microsoft® Accesstm (fully standardized user interface, standardized Assistant (Help), and unified procedures and functions, eg search function in Microsoft® Accesstm just like in Word and Excel).Microsoft® Accesstm is intended primarily for creating relatively small databases with relatively small amounts of data, for example for running various personal records such as address books, record books, movies, records of workbooks for business records Small and medium-sized companies, etc.Microsoft® Accesstm provides complete management relaciskata database and the integrity and reliability of the base level of the computer unit located, which prevents incomplete update and delete.In Microsoft® Accesstm included is input and output data from other formats, or in other applications, such as: Excel, dBase, Fox Pro, SQL Server, Oracle, HTML format, text formats etc.

1.3.1. Creating relational database in Microsoft® Accesstm 2013

Database created in Microsoft® Accesstm is structured such that it is composed of objects such as tables, forms, queries and reports. The next display (Figure 3.1.) Description of the type of the objects of which is made up a database created in Microsoft® Accesstm ..

Unlike many other applications where all objects are saved in separate files in Microsoft® Accesstm overall database is saved as a file format or extension .mdb. Thus Microsoft® Accesstm functions as a big warehouse.

Core structures for construction of database tables, where the initially entered data. For each type of information to create a separate table. For example: if you make a record of the stock of products, it is necessary to create three separate tables, and table suppliers, customers, and the table for the current stock. In this case the table stock will contain data for customers and suppliers and thus it shares the same information with the other two tables, which suggests that they are related.

Object DescriptionTables Represent the place where entered and stored data. Each table consists

of columns (fields) and rows (records).Queries Queries allow setting specific criteria (questions) to perform

organizing, combining and filtering data to obtain only the desired

40

Page 41: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

information.Forms The forms used for review, input and change data out of the table,

delivering the interaction between users and tables.Reports Allow printing of information obtained from the tables and

questionnaires in an appropriate form.Pages Web pages that are linked to the database.

Macros Serve automated execution of a series of orders.Modules Serve for setting procedures and functions set and written by the user.

The program code in the module is written in Visual Basic.

Figure 3.1. Basic facilities Microsoft® Accesstm relational database.

Creation of a database.This work will encompass the latest version of Microsoft® Access tm; that is Microsoft® Accesstm 2013thBefore we started creating the database, we must start the Microsoft® Accesstm. Startup is done via the desktop icon (which is a shortcut for activating the program) if it previously created or commonly from the Start menu on Windows operating system, or with the command Start> All Programs> Microsoft Office 2013> Access 2013thAfter starting the Microsoft® Accesstm opens a window that is shown in Figure 3.2. through which we should start by creating a new database (or open an existing database if you already have created).

Figure 3.2. Initial startup window of Microsoft® Accesstm 2013th

Creating a new database is done by selecting Blank desktop database. Doing so opens a new dialog box (Figure 3.3), which in the File name box should specify the name of the database that you want to create, and through the small icon that has the appearance of a folder we choose the location where you want it to be recorded.

41

Page 42: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.3. Window to create a new database in Microsoft® Accesstm 2013th

After entering the name of the new database and the venue where it will be saved, click the icon Create, which is displayed a new empty database is ready for data storage. In this window are performed most of the operations with the objects of the database. The following figure is presented the initial window of the new database:

Figure 3.4. Initial window created a new database.Buttons to manipulate the window located on the right-hand side serve to maximize,

minimize and close the window. Title bar contain information about the self-reliance of the data and the location where it is recorded.

The upper side of the window is bar orders, which is replacing the old range Menu and toolbar that were used in Microsoft Office programs up to version 2003, for which there are various functions organized in pads (eng. Tabs):

42

Page 43: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

• FILE - are used to perform basic operations on the base (recording, open an existing database or create a new database)• HOME - includes tools for word processing, sorting, copying orders, odsechuvanje and adhesion.• CREATE - used for making objects - tables, queries, forms and reports.• EXTERNAL DATA - sodrshi tools to control the data entered.• DATABASE TOOLS - contains tools for editing and repairing base, tools to show relationships and dependent objects, Visual Basic editor ...When you open an item in the base open additional pads, image 3.4. showing the new pad Tools tables (Table tools), which appeared after creating table. In the bar of each card are features of the card organized into logical groups.Toolbar for quick access (Quick Access Toolbar), which serves for quick access to frequently used tools.The lev by the window is a vertical range of showing all facilities at base:

• Tables (Tables).• Questionnaires (Queries).• Forms (Forms).• Reports (Reports).

Tables. Table is an object that forms the basis of the database. The tables in the database are used to store data. All other objects in the database can only manipulate data, but not to store. The database in Microsoft® Accesstm can contain hundreds of tables, and the number of entries that can be placed in all charts is not limited by anything except the free space on the memory unit.

Table after its shape resembles a network and is made up of columns and rows. The columns in the table contain fields and rows records. Fields are categories such as price, phone number, user code, which is entered information. Records all information fields which relate to a single entity, such as an employee, department, service etc. The intersection between column and row is a cell (eng. Cell).

The process of creating the table comprises several stages, and begins with the creation of the structure of the table. First, it is necessary to make a list of data fields. Each field in the table must have a name, which should be easily remembered and based on it to recognize the purpose of the field. Despite the name, every field should be of a certain type, and type of the field depends on the type of data that will be stored in the column.Then, you need to link data in a logical whole, and thus incurred tables. Tables mutually povrazuvaat order data from one table to be available in another table. Such a connection is made with the connections or relationships that are established between tables that share the same values. The Microsoft® Accesstm 2013 has two methods of creating the tables:

• Table Design - Used Design View option to format the table, that of making the structure of the table.• Table (Create) - Used for creating tables directly entering data on initial opening of the new table.

43

Page 44: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

When creating a new table in Microsoft® Accesstm, commonly used method Design View.When creating a new database in Microsoft® Accesstm 2013 program opens an empty table for entering data. To access the Design View, in order to structure the table you need to click on the icon View insole Home, and then choose the option Design View. If you still want to create a new additional table, you need to click on Create and insert the option Table Design (picture 3.6.).

Figure 3.6. Icon to activate the Design View option.

Create a table using the Table Design. By selecting Table Design option initially it appears it is called Design View. Design View window allows you to enter the names of the fields, define the type of data for each field and the allocation of additional optional description of each field, and define the specific svojtva fields. Design View window is shown in Figure 3.7.

Figure 3.7. Design View window.

The window is divided into two parts: the upper part shall contain the names of the fields (Field Name), the type of data (Data Type) and a detailed description that is not mandatory (Description - optional), and the bottom define specific fields svojstava (Field Properties).Field Name - This is the name of the field and presents its content as "Name", "Address", "Position" and so on. The name can not be longer than 64 characters and may include a space.Data Type - this is the type of value that should be entered in the field. In the dropdown field Data Type and are able to choose from the following options:

44

Page 45: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

• Short Text - Text data type that allows for any combination of letters and numbers, and can contain up to 255karakteri on record.• Long Text - This field is the replacement for the field Memo from previous versions of Microsoft® Accesstm, and it is a text type that can contain up to 65,536 characters.• Number - The field with this kind of data can contain only numbers.• Date / Time - This field with this type can include the date, time or a combination of both.• Currency - contains numeric data in currency format.• AutoNumber - This type of field when creating a new entry automatically generates a new unique order number for the new record. This property allows to select one of two possibilities: Increment and Random. Increment inkrementiranje done automatically, ie an increase of 1 per each new number for each new input record. Random option selects random numbers.• Yes / No - Used for entering logical data type corresponding to the True / False, On / Off and to select any one of two possible values.• OLE Object - OLE (Object Linking and Embedding) object is sound, image or other type of object such as a Word document that was created in another program, and can be built into the table using the OLE technology.• Hyperlink - This is the type of connection that leads to the Internet entity, the e-mail or to another location in the database.• Lookup Wizard ... - This field displays the values that records be selected, and such values are contained in another table or query, or directly imported.

Description - This column is fed more extensive description of the field, that is its purpose. The text entered is limited to 255 characters including spaces.Field properties - In this part of the Design View window enter specific properties or characteristics of each field. Field properties, allows for greater control of the data entered into the fields of the table. The most important properties of commonly used fields are:

• Field size - Specifies limiting the size of the field in terms of the number of characters that can be entered.• Format - Determines the form or format in which data will be displayed.• Input mask - It is a template for entering all types of text data type and data type date / time.• Caption - Represents label (label) in the field, which is displayed on forms and reports.• Required - Specifies whether input data in a field is mandatory or not.• Indexed - Specifies the index of the field that indicates whether the field is indexed or not.

Format is a feature in the field determines the medium will be shown the data entered in a particular field. The format depends on the previously selected type of field:

Text types of fields (Text & Memo data types)@ Compulsory text character or space.& Optional text character or space.< Turning in small capital letters. (lowercase)> Turning lowercase great. (UPPERCASE)

45

Page 46: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Numeric types of fields (Numeric & Currency data types)

. (point) It represents a thousand separator.

, (comma) It represents separator hundreds.0 (zero) Placeholder for a digit or blank if displayed 0th.

# Placeholder for a digit or blank if not shown anything.

% The value is multiplied by 100 and added a single%.

Input Mask property determines the rules for data entry in the field, that is a template for entering all types of text data type and data type date / time. This property facilitates the correct and safe data entry in the field.To create a front mask (Input Mask), use the following characters:

Input mask (Input Mask)0 Required is a number from 0-9. Signs "+" and "-" are not required.9 Optional are a number or space. Signs "+" and "-" are not allowed.# Number and spacing are optional. Spaces are displayed as blanks, but are

removed when recording the data entered. Signs "+" and "-" are not allowed.L Letter from A-Z is optional.? Letters from A-Z is optional.A Required is a letter or number.a Optional is a letter or number.& Compulsory any sign or space.C Optionally any sign or space.. Tag decimal place., Thousand separator.

:;-/ Separators for date and time.< All characters that follow are converted into small (lowercase).> All characters that follow are converted to large (uppercase).! Signs are written fill the mask from left to right. The sign! can be inserted

anywhere in the input mask.\ The sign that follows shows how the sign.

After creating a table in Design View, the award named fields and define specific properties before you jump straight to the recording of the table, it is necessary to define the primary key (eng. Primary Key).

A primary key is a field (or fields) that uniquely identifies each record in the table. The primary key is used to establish a connection between tables, which enables combining and retrieve data from them. A primary key is essential for efficient operation of the database.

46

Page 47: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

To create a primary key, you need to first open the table in Desig View, to create a field that is predefined to be the primary key, then that field is selected by clicking the Primary key option located in the toolbar, before the selected field appears with a key icon indicating that this field is the primary key of the table.Before switching to fill the table with data, it's the same shot.Relations between tables (Tables Relationship).Establishing the relationship tables relate to one another, which allows you to combine data stored in each.

One of the two ways of establishing relations in Microsoft® Accesstm 2013 is by selecting the Relationship Database Tools insert.But to make the relation:

- Two tables must have one common field.- The field in one table should be marked as the primary key.- The appropriate field in the second table that corresponds to the field in the first is known as an external key.

The connection is made simply by "drag & drop" with the mouse, or by clicking and dragging the field from one table to the appropriate field in the other table and dropping the second field., With a dialog window Edit Relationship which is shown in Figure 3.8 where are presented and created relationships between multiple tables.

Figure 3.9. Window to edit relations.

47

Page 48: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Referential integrity (Referential Integrity).For ensuring consistency of relationships between tables, Microsoft® Accesstm 2013 uses referential integrity (eng. Referential Integrity), which is a system of rules. This type provides integrity can not be entered in the field record an external key in a table if he is no entry in the field is a primary key in another table that is in relation to the external key table. Referential integrity is provided through the mechanism for establishing relationships between the tables.

In the dialog box Edit Relationship (picture 3.10) is the option Referental Integrity, within which there are two possibilities:

• Cascade Update Related Fields.• Cascade Delete Related Records.

Figure 3.10. Dialog box Edit Relationship.

48

Page 49: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

The first opportunity Cascade Update Related Fields provides every amendment to records in the primary key to be made and in the related tables where the primary key that appears as an external key.

The second possibility Cascade Delete Related Records provided in case of any deletion of records in the field is the primary key in one table, automatic deletion will be conducted in all entries in all related tables where the primary key that appears as an external key. This option is usually not recommended, since its use could be lost necessary data.

To make the deletion of a relationship, it needs only to position the mouse on the line that connects the tables, just click on the right mouse button and select Delete option and immediately the option Yes to confirm the deletion.

Questionnaires. Selection of data from one or more tables used questionnaires (Queries). By setting the appropriate conditions, the set of data tables can be distinguished only those data that meet the set conditions. The questionnaire may be simply a matter of data found in a table, and can be a complex issue which concerns data disseminated in more tables. As a result it gets table which lists only the rows and columns are given in the questionnaire.

Questionnaires can be made in two ways, namely by using the wizard or in design mode, ie:

• Query Wizard• Query Design

Microsoft® Accesstm 2013 has many wizards with which can quickly and simply create an object database. However, due to the inflexibility of wizards, their solutions do not meet the requirements of users, and therefore in such cases to use design mode to create facilities, which comprise questionnaires.There are several types of survey, as follows:

• Select.• Parameter.• Crosstab.• Action.

Select the questionnaire is the preferred type of questionnaire. This type of questionnaire takes data from one or more tables and displays the results in a new table, while you can do and grouping records, calculating sums, counting as for other calculations.

49

Page 50: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

To create a Select query using the wizard in Microsoft® Accesstm 2013 in insert is selected Create Query Wizard, with a dialog window New Query, where after selecting the first option is getting a new dialog box for creating questionnaires Simple Query Wizard .In this dialog box select the tables that contain the required fields.Just below the menu choice of tables, is a list of available fields for each selected table. Press ">", ">>", "<" and "<<" are selected only those fields of each table that are required in the questionnaire.In the next step by clicking the command "Next" appears new dialog window which gives the possibility to choose one of two possible options, ie:

- Detail (detailed questionnaire)- Summary (summary questionnaire)

In the next step after selecting the command "Next" appears on the last dialog box, where you set the name of the questionnaire and it was recorded with very selecting the button "Finish".To create questionnaires in Design View, you need to choose the option Query Desig located in the insole Create, followed by a dialog window to create a new questionnaire (initial name of the new questionnaire is "query1"), together with the Show Table window (Figure 3.11), from which you can choose the required tables or queries. The selected tables and queries, as well as the relations that exist between those tables or questionnaires appear in query1 window. After that, the window Show Table should be closed and move to the next step.

Figure 3.11. Query1 window and Show Table to create questionnaires in Design View.

After closing the Show Tableprozorecot, it is at the bottom of the window of the new questionnaire in the fields Table and Field to select the required tables and fields. Sorting

50

Page 51: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

entries in ascending or descending order of a field is defined in the order named as Sort. Order Show the option to show or hide a particular field in a tabular presentation of the questionnaire. Criteria In order to define the criteria in the questionnaire, that the requirement to fulfill entries selected tables or queries. Positioned criterion serves to filter the records that will show only those records that fully meet that requirement. Figure 3.12 shows the example set criteria using the operator Like, requiring the questionnaire to show only the data for orders relating to supplier Vitaminka.

Figure 3.12. Set criteria in the questionnaire "Orders for suppliers", with which the display only orders submitted by the supplier Vitaminka.

The following table shows some symbols and operators that are used when creating criteria questionnaires.

Symbols and operators to define criteria in questionnaires and their meaning.* Denotes any number of characters.< Means "less than"

>= "Greater than or equal to"<> "Different from"

Between "Between"Is Null Located bills without value.

Is Not Null Located bills with value.Like "Starts with"And "AND"Or "Or"

51

Page 52: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

After selecting the tables and fields and setting the criteria, the questionnaire starts by selecting or Run button from the toolbar.

Forms. Forms (templates or patterns) are used as an alternative way to enter data in tables of the database. The forms allow easier input and change data, and serve to display entries in the tables that let you display all required fields from all related tables simultaneously. A form can be used as a control panel (eng. Switchboard), through which other open forms and reports. The forms are the basic elements of the so-called user interface. In Microsoft® Accesstm 2013 has several ways to create forms, but the most popular are the two ways that are used to create other objects of the database, using the wizard (Form Wizard) and design mode (Form Design). The wizard for creating forms useful method that allows to select which fields appear in the formulation. The idea is to create a simple user interface that will allow to indirectly access the tables in the database in order to be able to add new entries, and to delete or update an existing one.

The creation of form through the wizard, making thus the option is selected Form Wizard Create the insert, after which a dialog window Form Wizard (photo 3.13).

Figure 3.13. Form Wizard dialog box.

In the Form Wizard dialog box choose all tables or questionnaires, as well as fields of those tables that we want to be displayed on the form we create. Once selected the desired fields by selecting the button "Next". In the following steps appear for selecting options related to the arrangement of fields in the form, and choose the style or design of the form.

The last step is given the name of the form, after which the form ready to use, or to enter or change information in the relevant tables.

52

Page 53: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.14. Appearance of the formulation.

Reports. Reports (Reports) are similar to the forms have similar properties and are used for displaying data. The reports represent a specialized form of displaying the data in tables and questionnaires, which is suited for printing. Tables and questionnaires are a source of data for reports, and not necessarily in a report to display all fields from the tables or questionnaires.

The content of the report determines the user is intended for the report. Entries in the reports can be grouped on several levels, which can include different functions for calculation, as the sum, average, minimum, maximum, etc..

Similar to the preparation of the forms and preparation of reports has several methods, which are usually used:

• Report Wizard (making using the wizard)• Report Design (design methods of production)

To create a report using the wizard, simple insert the Create option is selected, a button Report Wizard, which appears in Report Wizard dialog box (Figure 3.15), which was given the opportunity to select tables or questionnaires containing the required fields . After selecting the tables, ie questionnaires and required fields, then choose a button Next, which opens the second step (Figure 3.16) to create izveshtjot, which makes grouping of entries depending on the relationships between tables. Selecting the Next button to go to the next step, where it is made sorting and adding summary information (Figure 3.17).

53

Page 54: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.15. View Report Wizard dialog box.

Figure 3.16. Grouping of records in the report.

54

Page 55: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.17. Sorting entries in the report.

After choosing the Next button to go to the next steps in the creation of the report: defining the style of the layout of the fields and the appearance of the report. In the latest move was the appointment of the report, this part may choose one of the given two opportunities that would be activated by choice button Finish, or if after the completion of the design and selection of the Finish button to open the report in the form of review or open in the form of modification, which finishes creating the report (Fig 3.18).

Figure 3.18. Last step appointment and complete the report.

55

Page 56: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Example first.Procedure for creating a database for tracking and inventory narchki products company conceived, with all necessary facilities. The name of the database is "control orders"

1. Identification of the entities.

SUPPLIERS - The company has registered suppliers who consistently  delivered products.STAFF - The company has some employees who are responsible for making    orders the necessary products.PRODUCTS - Kompanijta supplies various products for sale.CATEGORIES - products which the company operates are divided into different    categories.ORDERS - Orders should be recorded, as according to the supplier, and     according to the amount and the employee makes.

2. Determination of the key attributes for each entity

Suppliers - Supplier Code, Name of supplier, contact person, Address, City, Country, Telephone Number, Fax Number.Staff - Employee Code, Name, Surname, position, e-mail address          phone work.PRODUCTS - Code Product, Product, Product Description, Serial    number, price, discount.CATEGORIES - Code Category, Category.ORDERS - Code Order, order date, delivery date.

3. Set the final relational schema.

Suppliers - ShifraDobavuvach, NazivDobavuvach, Contact Name, Address, City, Drshava, Telefonbroj, FaksBroj.Staff - ShifraVraboten, name, surname, position, e-mail_adresa,          Tel_rabota.Products - Product code, ImeProizvod, OpisProizvod,    ShifraKategorija, Serial, Price, Discount.Categories - Code category ImeKategorija.Orders - ShifraNarachka, ShifraDobavuvach, ShifraVraboten, DatumNarachka,    DatumPriem, ShifraProizvod.Track orders - ShifraPriem, DatumPriem, ShifraProizvod,ShifraNarachka, Price, KolichinaNarachka, PrimenaKolichina, ProdadenaKolichina.

56

Page 57: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

4. Turning relaciskata scheme in tables of the database.

Suppliers table:ShifraDobavuvach, Data Type = AutoNumber,NazivDobavuvach, Data Type = Text, Field Size = 50Contact Name, Data Type = Text, Field Size = 50Address, Data Type = Text, Field Size = 255City, Data Type = Text, Field Size = 50State, Data Type = Text, Field Size = 50Telefonbroj, Data Type = Text, Field Size = 30Input Mask =! \ (999 ")" 00 \ -000 \ -000FaksBroj. Data Type = Text, Field Size = 30Input Mask =! \ (999 ")" 00 \ -000 \ -000

Table Employees:ShifraVraboten, Data Type = AutoNumber,Name, Last Name, Data Type = Text, Field Size = 50Position, Data Type = Text, Field Size = 50e-mail_adresa, Data Type = Text, Field Size = 50Tel_rabota. Data Type = Text, Field Size = 30Input Mask =! \ (999 ")" 00 \ -000 \ -000

Products table:Identification of Product, Data Type = AutoNumber,ImeProizvod, Data Type = Text, Field Size = 50OpisProizvod, Data Type = Text, Field Size = 255ShifraKategorija, Data Type = Number,Serial, Data Type = Text, Field Size = 50Price, Data Type = Currency,Discount. Data Type = Yes / No

Table Categories:Code category, Data Type = AutoNumber,ImeKategorija. Data Type = Text, Field Size = 50

Orders table:ShifraNarachka, Data Type = AutoNumber,ShifraDobavuvach, Data Type = Number,ShifraVraboten, Data Type = Number,DatumNarachka, Data Type = Date / Time,Input Mask = 99.99.00; 0DatumPriem, Data Type = Date / Time,Input Mask = 99.99.00; 0ShifraProizvod. Data Type = Number

57

Page 58: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Table Tracking orders:ShifraPriem, Data Type = AutoNumber,DatumPriem, Data Type = Date / TimeInput Mask = 99.99.00; 0ShifraProizvod, Data Type = Number,ShifraNarachka, Data Type = Number,Price, Data Type = Currency,KolichinaNarachka, Data Type = Number,PrimenaKolichina, Data Type = Number,ProdadenaKolichina. Data Type = Number,

5. Set up the relations between the tables in the database.

Set relationships between tables in the database "Control orders" are shown in Figure 3.18.

Figure 3.19. Relations between tables in the database "control orders"

1. Create forms for entering data in the tables.

58

Page 59: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Forms are created using the wizard for creating forms (FormWizard). The created forms for tables: Suppliers, Employees, Categories, Products, Orders.At this stage and created two potformi that include additional calculations, that is created potforma Orders which calculated the total amount in cash for the entire quantity of each product ordered and potforma products which are imported and data on the quantity of sold products . The image is represented as 3.20 orders and the image is represented as 3.21 Products.

Figure 3.20. View form "Orders"

59

Page 60: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.21. View form "Products.

1. Creating a questionnaire.

At this stage, three questionnaires used as a way for their design creation. The questionnaires were made which conducts a search of orders according to several criteria.

Made questionnaire which display orders based on employees who have made, while having the opportunity to put an additional condition which can be inspected orders each employee separately.

The second questionnaire shows that our suppliers submitted orders, which also may need criteria to display the submitted orders on specific suppliers.

The third questionnaire showing all orders in the order of their creation, and shows the name and products in quantities of purchased products, the quantities of received products, commodity prices, and sold products, which can fully monitor made any order.

Photo 3.22 and 3.23, shows the questionnaire "Orders by employees" in design mode and in tabular form without designated special criteria.

60

Page 61: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

Figure 3.22. View questionnaire "Orders by employees" in Desing View.

Figure 3.23. View questionnaire "Orders by employees" in tabular form.

61

Page 62: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

1. Creating reports.

In the database "control orders" created two reports, one of which shows the quantities and prices of products ordered. While the other displays and sales volumes, and remaining stock.

3.24 The next picture shows the appearance of the report "Review of orders on prices and quantities."

Figure 3.24. View report "Review of orders on prices and quantities. 

62

Page 63: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

3.25 The next picture shows the appearance of the report "Details of orders and stocks of the products."

Figure 3.25. View report "Details of orders and stocks of products.

By creating reports completed by the creation of the database "control orders". By getting the correct data in the reports and surveys confirming the effective functioning of the database.

63

Page 64: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

CONCLUSION

Business processes are the real reason for the existence of databases. The importance of databases is that greatly facilitate the organization of the data needed for daily business operations. Databases provide access and visibility to information that is contained in one place, making it work make it simpler and better.

Relational databases constitute the most frequently used technology that improves business processes to their maximum efficiency, primarily by automating. The lack of efficient retrieval of information redundanost data and data security is a major problem that is commonly found in such automated processes. Marketers are powerful technologies for working with databases, and the main players in this market are Oracle and Microsoft (SQL server and MS Access) that provide advanced services. For safe and maximum use of these products to work with databases, careful implementation of the design of databases. For good design is based on each database to achieve the same careful analysis of business goals and needs for creating databases.

In practice the database are coming to confirm the previously mentioned opinion about the importance of design and analysis based on real needs for its establishment and maintenance, therefore the last chapter of this paper was created a database for a fictional company. To obtain accurate information and review reports, in the given example it was necessary to do a good analysis of the database will contain and what will be required to show, and it was necessary to make an appropriate design of the database .

64

Page 65: Graduatiot theses - Analysis and Design of Databases towards of efficient business processes  EN

REFERENCES:

[1] Prof. Dr. Kosta Sotiroski, MD. Ilija Hristoski, "Business Informatics", Faculty of Economics - Prilep, Prilep 2010

[2] Harmon P., "Business Process Change Secon edition", Morgan Kaufmamm in print of Elsevier Inc., Burlington, 2007

[3] Hajo A. Reijers, "Design And Control Of Workflow Processes", Springer-Verlag Berlin Heidelberg, NewYork, 2003

[4] Dr. Saso Josimovski, "Information Technologies", Faculty of Economics - Skpoje, Skopje 2011

[5] M. Varga, "Baze podataka - Konceptualno, logičko i fizičko modeliranje podataka", DRIP, Zagreb 1994

[6] Robert Manger, "Baze Podataka", Sveučilište u Zagrebu, Zagreb, 2008[7] David M. Kroenke, David J. Auer., "Database concepts" - 6th ed., Prentice Hall, New

Jersey, 2013[8] Peter Rob, Carlos Coronel, "Database Systems: Design, Implementation, and

Management, Seventh Edition", Thomson Learning, Inc., Boston, 2007[9] Hector Garcia-Molina, Jeffrey D. Ullman, Jennifer Widom, "Databese systems

The Complete Book Second Edition ", Pearson Prentice Hall, New Jersey, 2009[10] Avi Silberschatz, Henry F. Korth, S. Sudarshan, "Database System Concepts, Fourth

Edition", McGraw-Hill, NewYork, 2001[11] Toby J. Teorey, Sam S. Lightstone, Thomas P. Nadeau, "Database Modeling and Design:

Logical Design Fourth Edition", Morgan Kaufmamm in print of Elsevier Inc., San Francisco, 2006

[12] Slavomir Vukmirovic, "Modeliranje i analiza podataka u poslovanju", Ekonomski fakultet Sveucilišta u Rijeci, 2013

[13] Gavin Powell, "Beginning Database Design", Wiley Publishing, Inc., Indianapolis, 2006[14] Ryan K. Stephens, Ronald R. Plew, "Database Design", Sams Publishing, Indianapolis,

2001[15] Steven Roman, "Access Database Design & Programming, 3rd Edition", O'Reilly &

Associates Inc., Sebastopol, 2002[16] Teresa Hennig, Rob Cooper, Geoffrey Griffith, Jerry Dennison, "Microsoft Access 2010

Programmer's Reference", Wiley Publishing, Inc., Indianapolis, 2010[17] Joyce Cox, Joan Lambert, "Microsoft Access 2013 Step by Step", Microsoft Press,

Washington, 2013[18] Raghu Ramakrishnan, Johannes Gehrke, "Database Management System 3rd Edition",

McGraw-Hill, NewYork, 2002

65