• No results found

A Simulator for Analyzing Temporal Database Systems

N/A
N/A
Protected

Academic year: 2020

Share "A Simulator for Analyzing Temporal Database Systems"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

163

A Simulator for Analyzing Temporal Database Systems

Upasana Bhagat¹, Dr. P.K.Suri²

¹Student, Department of Computer Science and Applications Kurukshetra University, Kurukshetra, Haryana-(INDIA) ²DEAN(Research & Development)Professor & Chairman(CSE/IT/DCSA) Haryana College Of Technology & Management

Kaithal, Haryana-(INDIA)

Abstract -A temporal database is a database that deals with the aspect of ‘Time’, which is an important real-world phenomenon. A wide range of real-world database applications use time-dimensions to represent their varying data. Banking activities are related to Temporal databases as it deals with the transaction time and valid time. This paper describing the designing of a simulator of a single service counter of bank and obtain different statistics like average queue length of customer, average waiting time of customer, utilization of server etc. and then compare the results obtained from computer simulation, to the results obtained by analytical method.

Keywords - Transactions, Simulation, Time, Queuing, Services

I. INTRODUCTION

The use of Temporal databases has grown exponentially these years. Banking activities are an example of advanced application of this temporal database, as it deals with the valid time and transaction time. In the year 1969, the first rollback database was proposed. The 3- dimensional view of an historical database was first proposed by Frederick Brooks, where the first academic treatment of time is given in database. The evolution of modern computers and high level simulation languages enables the application of modelling and simulation for solving database problems in several domains. Time is multidimensional[1]. The Transaction time of a fact is basically the time when the fact is current as stored in database and the valid time of a fact represents time when the fact is true in the modeled reality. While valid time may be bounded or unbounded, transaction time is bounded in both the ends[2]. Banking activities are using major applications of Information Technology. The overall objective of simulating temporal database system is to seek the underlying relationships between the database entities and time in some valid interval.

Extensive research has focused on developing models to analyze and understand the behaviour of different

applications of temporal database system. The

application includes the personnel management, ticketing counters, reservation counters, banks, call center databases. All these applications strictly deals with time attribute. For some applications, executing transactions that maintain external consistency takes precedence over having serializable transactions or satisfying the database‟s integrity constraints all the time [3].

Christian S. Jensen and David B. Lamet [4] provide the full solution to the problem of correctly supporting transaction timestamping of databases with a realistic setting where user specified transactions are allowed and concurrency control and recovery are accomplished using two-phase locking and logs. Johann Christoph Freytag [5]explains the query optimization ,that is an important issue in today‟s database management system. His demonstrated analysis leads to a simple operational model for query optimization that incorporates the modularity and flexibility necessary to implement an extensible query optimizer as required for the new generation of DBMSs. The result of this paper will help to extend the existing optimization techniques to the demanding requirements of new application areas such as expert systems and deductive database system.

Di Pippo and Wolfe[6], propose a real-time object-oriented database that supports a rich variety of data semantics and temporal consistency constraints and a range of transaction correctness criteria that relax serializability .

Abdelhak Boubetra [7], proposed guidelines and notations for design approach of a database management system for simulation based on temporal aspects are presented. the concept to include the history behaviour of the simulated system and then focus on the performance and design of the historical view.

Vasumathi.A, Dhanavanthan.P [8], proposed a service that can be provided by an ATM of the bank in order to have short or negligible queue length considering the customer satisfaction. The overall objective of the paper was to reduce the waiting time of customers and the total cost related to new ATM installation. Avigdor Gal Opher Etzion [9] explained a parallel execution model of temporal databases for the update processes . He described the temporal parallelism and temporal independence. The effect of temporal agents on parallelism is discussed as well as different transaction modes. Several simulation results that present the benefits of parallel execution model are introduced.

(2)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

164

II. ANALYTICAL STUDY OF TEMPORAL DATABASE

SYSTEM

Analytical study consider various cases for evaluating the system with the help of equations given by queuing theory in queuing analysis by Wallace J.Hopp [10]. According to Bank‟s norms, the standard time for the execution of some of the service transactions are as follows:

1. Payment of cheque : 10-15 minutes

2. Updation of Passbook : 8-10 minutes

3. Issue of Demand Draf : 15-20 minutes

Suppose for the purpose of discussion that the Bank manager has timed transactions in the past and has found that the average time for the execution of a transaction is 15 minutes. Updates in database are may be considered combinations of deletions and insertions[11]. The service time for every customer is not required to be exactly 15 minutes. We would expect some customers those require short service times, while other customers require lengthy service time to handle. Furthermore, since customers make independent decisions on when to come in, we would hardly expect the uniform spacing of transactions.

The single service counter of bank is analyzed in morning shift and evening shift separately. Different statistics (utilization of system, average queue length) are obtained and then compared.

For example, lets consider the case when 20 customers arrive and all for payment of cheque. Since, it takes 10-15 minutes for this transaction.

According to equations given in queuing analysis[11], following results are obtained:

Avg service time τ(tau)= 300/20 =15 minutes Service rate μ(mu)= 1/τ= 0.06

Arrival rate λ(lamda) =20 customers in 4 hours Utilization of system(ρ) =λ/μ=0.08/0.06=1.33

Since ρ≥1, the queue length will grow without bound and hence the system will not be stable[11]. So, for the stability of system, the bank must set up multiple counters( two or more) for these services.

Now lets consider the scenario of valid time i.e the days of submission of fee at the bank extension counter. These days, the arrival of students is very very large as compare to the arrival of daily routine customers. A set of days are specified for the depositing of fee. Each class contains around 25 to 30 students. If the case is considered the deposit of fee is done after every 3 months within a valid time of 10 days(4 hours each day) i.e with valid time range (0,240) and each student gets a transaction number after successful completion of the fee. The timings of fees submission in those ten days would be from 10.00A.M to 2.00P.M. Fee cannot be deposited after the 2.00P.M. The transaction time of depositing of

FIGURE 1:BANK EXTENSION COUNTER WITH DEDICATED COUNTER FOR STUDENTS AND FACULTY OF CAMPUS fee is 8 to 10 minutes and if we have atmost 30 students

for depositing fee the all can be attended in approx. four hours without causing excessive delay to the students. But this is not the case every time, because there are some conditions like student come in queue without the proper entries in the fee form then he should leave the queue for filling it again and sometime server take more

time for updation of transaction for some internal issue or there can be any other issue that can occur because of which the service time can be reduced below 8 minutes or can be extended beyond 8 minutes. Similarly system is analyzed for different services with different inputs and results are obtained based on those scenarios.

Arrive

Dedicated service counter for Students

faculty Service counter

Departure

Next customer arrival

(3)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

165

After analyzing the results, it is, therefore proposed to have a dedicated counter for the students and faculty to be set up in the bank extension counter. So, that the students and faculty can straightway join the queue of dedicated counter and get the service without waiting for so long in the general customer queue. The representation of proposed model is given in Figure 1. In the proposed model, the general daily customers are treated differently from students & faculty of the campus. The dedicated counter is modeled to provide service to students & faculty members of the campus. These member will straightway join the queue served by dedicated counter and wait for its turn whereas the general customers will join their own queue of the normal service counter. If in case there is a long queue in front of normal counter and the dedicated counter is idle for that time, then the customers of normal service counter can proceed to dedicated counter for the services. After completing the transactions, customers (general, students, faculty) will dispose from the system.

III. SIMULATOR FOR ANALYZING TEMPORAL

DATABASE SYSTEMS

The technique of simulation has long been used by the analysts and researchers in the field of sciences and engineering practices and it promises to become an important tool for tackling the complicated problems of managerial decision making.

Simulation is actually imitation or copying the reality.

The mathematical simulation equations can be

represented by computer simulation. Generally, the main objective of the simulation is to minimize the problem of decision making and hence helps in reaching solution with at most accuracy.

[image:3.595.70.541.477.610.2]

The research has been done through observing the customers arrival time, waiting time in the queue, different behavior of customers in the queue like balking, reneging and service time. Generally arrivals do not occur at fixed regular interval of times but tend to be clustered for a duration of a week. The poisson distribution involves the probability of occurrence of an arrival are random and independent of all other operating conditions. Based on arrival, service patterns generated, various results can be computed from this like, utilization of server, average queue length of customers in the queue and in the system and average idle time of server. The simulation process will generate the arrival and service patterns randomly as we observe in daily life using poisson distribution.

FIGURE 2: REPRESENTATION OF EVENTS IN SIMULATING SINGLE SERVICE COUNTER OF BANK

The Figure 2, represents the events in simulation of single service counter of bank. The new customer will proceed and wait in the queue for service. After completing the transaction, the customer will dispose from the system.

An algorithm is developed which can describe the stepwise procedure of developing the simulator of single service counter. Algorithm to simulate the single service counter of bank is as follows:

Terms and Notations used in Algoritm:

at[K]: Inter-arrival time of customers cat[K]: Cumulative arrival time cdt[K]: Cumulative departure time st[K]: Service time of kth customer wt[K]: Waiting time of kth customer idt : Idle time of server

ql: Queue length of customers Customer

queue

Arrival Service

counter Departure

Next customer arrival

Wait for service

(4)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

166

nat: Next arrival time ndt: Next departure time N: Total number of customers Algorithm: Sim_serv_counter

1. Read the total no. of customers N.

2. Set k to 1

Repeat while(K<=N)

[Generate inter-arrival time and service time using poisson distribution]

a) Compute

prob=pow(2.718282,-lemda)*pow(lemda,x)/fact

b) Compute cumprob=cumprob+prob

c) x=x+1

d) fact=fact*x

Increment K by 1 End Loop

3. Initialize at[K],cat[K], idt[K] of first customer to 0.

4. Repeat while(K<=N)

a) Compute cat[K]=cat[K-1]+at[K]

Increment K by 1 End Loop

5. Repeat while(I<=N && J<N)

a) Compute diff=nat-ndt

b) if(diff<0)

Compute nat=cat[I+1] Compute ql[I]=I-J Increment I by 1 End Loop c) else if(diff==0)

Compute queue length ql[I]=ql[I-1] Compute next arrival time nat=cat[I+1]

Compute cumulative departure time

cdt[I+1]=cdt[I]+st[I+1]

Compute next departure time ndt=cdt[J+1] Increment J by 1

Increment I by 1 End Loop d) else if(diff>0)

if(I-J>1)

Compute cdt[J+1]=cdt[J]+st[J+1] Increment J by 1

End Loop else

Compute idt[I]=diff Compute ndt=cdt[J+1] Increment J by 1 Increment I by 1

End Loop 6. Repeat while(J<N)

if (I>N)

Compute cdt[J+1]=cdt[J]+st[J+1] Increment J by 1

End Loop

7. Repeat while(K<=N)

if(J>=N)

Compute waiting time wt[K]=cdt[K]-st[K]-cat[K]

Increment K by 1 End Loop

8. Calculate Average queue length of customers

9. Calculate Average waiting time of customers in

the system

10. Calculate the total busy time of server 11. Calculate the utilization of server 12. Stop.

This algorithm can be implemented using

programming languages, and can be run for different values of lambda and for different number of customers. The implementations and results of the algorithm are given in next section, which can be executed any number of times for different inputs.

The simulation results has shown various statistics like utilization of server, average queue length etc. The implementation was carried out in high level language „C‟. The inter-arrival and service times are generated randomly using poisson distribution. Then computations are done for cumulative arrival time, cumulative departure time, waiting time and queue length. Above algorithm was run for, 20 customers with the value of lambda for interarrival time 12.5 and lambda for generating service time is 13.75. The statistics we get is, the server utilization that came out to 98% with the average queue length of 0.6 customers. The server is busy for 249 minutes with average waiting time of 3 minutes by the customers. Since the results of the computer program are dependent upon random number generator, the answer will vary each time the program is run. Furthermore if the time frame over which the program is run is shortened, then variation between run results will increase.

IV. COMPARISON OF ANALYTICAL AND SIMULATION

RESULTS

(5)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

167

However, simulation can be used to provide the better and clear understanding of starting assumptions and the meaning of the end result equations [12]. The results of analytical study and computer simulation results are summarized as follows in Tables I, II, III. Where, A.I= Average Inter-arrival Time of Customers S.I=Average Service Time of Customers

TABLE I

RESULT OF MORNING SHIFT(10:00A.M TO 2:00P.M)

TABLE II

RESULT OF EVENING SHIFT(3:00P.M TO 4:00P.M)

TABLE III

BUSY FEE SUBMISSION DAYS

VALID TIMINGS (10:00A.M TO 2:00P.M)

Here, summary of analytical method and simulation technique showed that the results obtained by both are almost identical but with lower difference of 0.05 and highest difference of 0.42 in case of utilization computation.

The utilization of server in morning hour varies from 0.72 to 1.09 in case of simulation technique, and from 0.80 to 1.33, in case of queuing theory. This result shows that the system is loaded with transactions with lead to lowest average queue length of 0.25 and this queue length grows without bound as the utilization becomes greater than or equal to 1. Evening hour is basically peak hour, as cleared from the results. The utilization of the system is over, i.e the system is unstable during evening hours, in current situation, as the utilization is coming out greater than one all the time, that are 1.74 and 2.21. Therefore, the queue length during this hour grows without bound, and customers have to wait for long time for the services. The utilization during the busy hours of fee submission is 91 to 1.13 percent during these hours , whereas the analytical results showed that the system become unstable during this time i.e the utilization is between 1 and 1.25 , with a long queue in front.

V. CONCLUSION

The main purpose of this study is to develop a simulator for the temporal database system and also to illustrate the differences and similarities between analytical solutions and computer simulation solutions. Though their results are almost identical still we figure out the small differences between the two methodologies.

Cases Simulation Results Analytical Results Utilization Queue

Length

Utilization Queue Length

20 Customers

A.I= 12.5 A.S= 13.7

0.98

( 98% Utilization)

0.60 1.14

(system unstable) Unbounded Queue length 20 Customers

A.I = 12.5 A.S = 15

1.09 (system unstable) Queue length Will grow without bound 1.33 (system unstable) Queue length will grow without bound 10 Customers A.I= 12.5 A.S = 10

0.72 (72% utilization)

0.25 0.80

(80% utilization)

3.2

Cases Simulation Results Analytical Results Utilization Queue

Length

Utilization Queue Length 8 Customers A.I=7.6 S.I=15 1.74 (system unstable ) Queue length Will grow without bound 2.16 (system unstable) Queue length Will grow without bound 10 Customers A.I=6.25 S.I=15 2.21 (system unstable) Queue length Will grow without bound 2.26 (system unstable) Queue length Will grow without bound

Cases Simulation Results Analytical Results Utilization Queue

Length

Utilization Queue Length 25 Students A.I=10 S.I=10 0.91 (91% utilization)

1.08 1

(6)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 7, July 2012)

168

The study considered various cases for evaluating the system under different conditions. After analyzing the arrival and service patterns of customers, system utilization and average queue lengths in the system, it is proposed to have a dedicated counter for the students and faculty of the campus. The results clearly demonstrate the exact impacts of setting a dedicated counter for students and faculty, and it will support bank management to make final decisions from customer service perspective.

Thus, it is concluded that simulation can be used when the analytical model is limited by approximations and complex equations. Simulation make possible to run a program using different values for various dimensions, with some approximations removed.

For future research, this study can be extended by considering the cost factors of counter setup to find the best service facility. This study can be used to evaluate other temporal database system applications like billing system, telecommunication system where transactions deal with valid time and transaction time.

REFERENCES

[1 ] R.T. Snodgrass and I.Ahn, September 1986, “Temporal

databases”, Computer, Vol.C-19, no. 9,pp.35-42.

[2 ] Gultekin Ozsoyoglu and Richard T. Snodgrass, August 1995

“Temporal and Real Time Databases: A survey” , IEEE Transactions on knowledge and data Eageo Engineering, Vol.7, No.4.

[3 ] K.J.Lin, Jan.1989, “Consistency issues in real-time database

systems”, Proc. 22nd Hawaii International Conference system

Sciences, Honolulu.

[4 ] Cristian. S. Jensen, David B.Lamet, 2001, “Transaction

Timestamping in temporal databases”, Proc. Of the 27th VLDB Conference, Rome, Italy, pp.441-450, 11-14.

[5 ] Johanin christoph Freytag, March,1989, “The Basic Principles of

Queery Optimization in relational database management system”, internal report .

[6 ] L.B.C.Di Pippo, V.F. Wolfe, Dec.1993, “Object based semantic

real-time concurrency control”, Proc. 14th IEEE Real-Time

Systems Symp.

[7 ] Abdelhak Boubetra,October.2007, “ Guidelines and Notations

towards a simulation Temporal Data Base Management System”,

IJCSES International Journal of Computer sciences and Engineering System, vol. 1, no.34.

[8 ] Vasumathi, A, Dhanavanthan.P, 2010 “Application of simulation

technique in Queuing model for ATM Facility”, International Journal of Applied Engineering research, Dindigul, vol 1, no.3. [9 ] Avigdor Gal, Opher Etzion, 1998, “A Parallel Execution Model

for updating temporal databases”.

[10 ] Wallace J.Hopp, “single server queuing models”

[11 ] James Clifford, Curtis Dyreson, Tomas Isakowitz, Christian

S.Jensen, Richard T. Snodgrass,June1997, “On the semantics of

“NOW” in Databases”, ACM Trans. Database Systems, Vol. 22, No. 2, Pages 171-214.

[12 ] John H.Reed, “Computer Simulation: A Tool to teach queuing theory” , experimental learning enters the eighties, vol. 7,1980. [13 ] Anu Maria,1997“Introduction to Modeling and simulation”, Proc.

Of 1997 winter simulation conference.

Figure

FIGURE 2: REPRESENTATION  OF  EVENTS  IN  SIMULATING  SINGLE  SERVICE  COUNTER  OF  BANK

References

Related documents

Xu Jie, Cong Lei and Li Yan, “ Fabrication and mechanical properties of short sisal fibre reinforced composites used for dental application ,” 18 th International Conference

The benefits of large sensor data processing based on convergent model of distrib- uted computing: decrease the load on the server cluster; reduction in the volume of traffic in

Furthermore, as the loss aversion of the attacker increases, while keeping likelihood insensitivity constant, the attacker chooses to employ a CW attack regardless of

Darüber hinaus wurde die Festphase von Carbonylfluorid durch R AMAN -Spektroskopie und in situ

Finally, HRM issues, even when strategic, are considered by top management to strategy implementation phase and not strategy formulation phase (Russ et al. , 1998) study

Experiments were designed with different ecological conditions like prey density, volume of water, container shape, presence of vegetation, predator density and time of

study abroad programs make a measurable impact in the academic, personal, social, and spiritual. dimensions of

As a teacher, implement- ing preventative interventions and techniques may help students manage their anxiety or learn positive skills to prevent anxiety.. where and