Active Database Dengan Store Procedure
Active Database Dengan Store Procedure
net/publication/326007738
CITATIONS READS
4 277
5 authors, including:
S.K. Lakshmanaprabu
Automotive Robotics India pvt Ltd
53 PUBLICATIONS 374 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Andino Maseleno on 27 June 2018.
Research paper
Abstract
Active database system is a database system which is capable of generating a certain action automatically if it detects an event that meets
certain conditions. The existence of Event Condition Action (ECA) rules and functional components such as triggers, stored procedures,
and stored functions that are owned by active database system make the database system has the ability to automatically monitor input
and output data. Separation of ECA rules components in the database with the application program will also facilitate the development of
information systems. This research applies active database system in academic information system, so that academic business rules can
be planted in database software and be able to produce the right solution automatically. The addition of active database system compo-
nents to the database software makes procedures such as subject distribution, study plans, academic leave, values, thesis defense and
other processes can be monitored by the system automatically. This can be done because between applications and databases use the
model driven approach parameters to communicate with each other. The results of this research prove that a database is not only has
function as a container of data, but can control the information system actively, this is caused by the logic of programs that are generally
planted in the application layer that can be moved and planted in the database software.
system (DBASE) to the new system (MS SQL Server 2000). Thus
the data can be integrated on one database system so as to facili-
tate the maintenance and management of data.
Efendi [3] conducted the research about Academic Information DBMS
Database
System in terms of Human and Computer Interaction aspects. This
research build the analysis on the questionnaire data collected
from the respondents which consist of lecturers, administrators,
CRUD (Create, Read,
colleges and students leaders. This research gives conclusion that Update, and Delete)
Operation
need to be pursued an Academic Information System which user
friendly and interesting so user do not feel saturated. This research
also gives recommendation to develop an application of web-
based academic information system. Fachrurrozi [4] examined the DBA TOOLS Application
using either trigger or active rule [13]. After a series of rules has study was a case example of the application of active database
been determined, an ADBMS monitors the relevant event and then system. The software used in making this program using MS.
notifies the component responsible for executing a rule. A condi- Visual Basic 6.0 and MS database management system. SQL
tion is evaluated, if met then ADBMS will execute an action [14]. Server 2000. Some rules were embedded in the database layer of
An Active Database Management System (ADBMS) is an event management systems that were implemented in the form of stored
driven system, where operations such as data changes produce procedures, stored functions and triggers that pass on databases
events that can be monitored by active rules [15]. Based on the and tables. In this section we will present some implementation
event, an ADBMS is categorized into 2 groups: simple and com- results from the rule-based academic information system using the
plex events [16]. Examples of simple events are basic database active database system, since the developed information system
operations such as INSERT, UPDATE, DELETE, and time was quite complex and involves the input/output form.
events. Complex events consist of one or more events associated
with logical operators. Examples of complex events like REPEAT, 5.1 Main Menu
SEQUENCE or NEGATION.
The main menu is the integration of all services within the rules-
4. Rule Based based academic information system. The concept built in the main
menu used the Multiple Document Interface (MDI) model with
the goal of more than one form that can be run simultaneously in
Methods and algorithms in the field of artificial intelligence (AI)
the main menu. At the top of the menu there is a pool down menu
is currently widely used in the field of software engineering and
that can be used to select a particular operation to be run. In the
development of information systems. Rule-based systems (RBSs)
middle there is a section used to display the form or report that is
made from research in the field of AI which in its development
being run. On the left side there is a sidebar menu for user infor-
can be implemented in information system specially in the data-
mation, while at the bottom there is a toolbar menu to tell the user
base field information system [17]. Another AI method that also
date and time information. The main system menu view is shown
used in the field of information systems is a study conducted by
in Figure 3.
Sharm [18] that used a neuro fuzzy system to measure the estima-
tion and reliability of component-based software systems
(CBSSs). In the field of software testing, AI methods are also used
such as the Fault Detection Technique using Learn To Rank
(LTR) [19]. While in the field of project management, research
conducted by Kermani [20] has implemented fuzzy logic to con-
trol the cost and time in project risk management.
There are two approaches in applying rule-based systems in the
database management system, ie deductive database systems and
active database systems. Rules in the active database management
system can be used as complement to the programming language
source code used in the application, and packaged in modules and
functions [21]. The rules play a dynamic role to handle various
events and conditions that occur during program execution.
Rules provide a formal way to represent recommendations, direc- Fig. 3: System Main Menu
tions, or strategies. Production rules are written in if-then (if-then)
form. The if-then rule connects the antecedents with the conse- 5.2 Course Distribution
quences it causes. A variety of if-then rule structures that connect
objects or attributes as follows: At the beginning of each semester, the courses offered are
IF premise THEN conclusion distributed with class, faculty, day, hour, and classroom. Subjects
IF input THEN output
IF condition THEN action that have been distributed as a reference by students to take the
IF antecedent THEN consequent study plan card. This lecture distribution menu has rules that are
IF data THEN results planted in the table of subject distribution in the form of triggers.
IF action THEN purpose
IF action THEN reaction Scripts that are planted in triggers follow rules that have been
represented using the rules of production (rule) as follows:
The premise refers to facts that must be true before certain conclu- R1: IF course is distributed
sions are obtained. Input refers to data that must be available be- THEN set the course
fore output can be obtained. Conditions that refer to the circum- AND specify academic year
stances that must apply before the action can be taken. Anteced-
AND specify academic semester
ents refer to situations that occur before the consequences can be
observed. Data refers to the information that should be available AND specify the class
so that a result can be obtained. Action refers to activities to be AND specify the course
performed before results can be expected. Action refers to activi- AND specify lecturer
ties that cause the effects of such actions to occur. Because it re- AND specify class quota
fers to certain circumstances that cause a certain effect. Symptoms AND define the day
refer to circumstances that cause certain damage or circumstances AND specify lecture sessions
that lead to the examination.
The display of the course distribution form can be seen as in
Figure 4.
5. Implementation
From the results of research that had been done, obtained an aca-
demic information system in which there was database software,
where the business rules were planted using the concept of active
database system. Academic information system created in this
98 International Journal of Engineering & Technology
Business process Rediscover the Simply change the appropri- No. Business Process Testing and Analysis
change program code in ate rules in the database the specified credits. In the trigger
the application, software. there is also a functionality to check
change the corre- the subject prerequisite data, if the
sponding rules and course is entered into credit while the
reinstall the appli- course has not been taken yet it will
cation. be given a warning by the active
Script Program The entire program Some of the program code is database that the course has a pre-
code is stored in stored in the database soft- requisite
the application. ware, so inside the applica- 3. Assessment Evalua- This evaluation is planted in the
tion the program code is tion trigger table credit and will be acti-
simpler. vated when a value of quality letter is
Service Complex and com- Limited to rules embedded inserted into the system. Active
plete in database software. database automatically generates
Programming All business rules Some of the rules embedded quality weights for each quality letter
language migra- are rewritten using in database software can still grade entered into the system accord-
tion a new program- be used using a new pro- ing to the weights specified in the
ming language. gramming language. rules.
Data processing Data processing Database software can per- 4. Study results evalua- The process of evaluating the results
depends entirely on form certain action. tion of this study is carried out by stored
the application. functions that are planted in an active
database. Stored function has been
The criteria used in this test is the testing of business rules that able to generate semester achieve-
have been planted in the academic information system using trig- ment index (IPS) and cumulative
gers, stored procedures and stored functions that become Active grade point (GPA) of each student.
The calling of this function is suffi-
Database System components, then tested using test data (academ- cient to include the specified parame-
ic data) related to the business rules. In Table 2 we can see some ters.
of the tests that have been done on the built system. 5. Repetition of Educa- To display the list of values by tak-
tional Activities ing the repeat course taken only the
Table 2: Result of Active Database testing and analysis best value, then used the view feature
No. Business Process Testing and Analysis to display the list of courses. With
1. Course distribution Including some data distribution of this view then the system can display
the course into the system, if there is the list of courses with the best value.
incomplete data at the time of filling, 6. Repetition of Educa- Filling data into educational leave
then the active database gives infor- tional Activities can be handled using triggers that are
mation to the application that the planted in the leave table. If the
information is filled incomplete and terms of the leave requirements such
the data entry process is canceled by as having passed the first two years
active database. of evaluation, the GPA is more than
2, and has accumulated at least 30
At the time the data is entered into credits which are not fulfilled by the
the database, then there is an active student data entered, the active data-
trigger and check whether the data base is able to monitor the data to be
must be entered incomplete. If the entered into the database.
data entered is complete and valid, A message is displayed in accord-
then the data will be recorded in the ance with data conditions that do not
database, otherwise the error mes- fulfil the specified rules.
sage is raised and the data recording 7. Rule parameters Some rules embedded in the database
process is canceled. The following change software have parameters that can be
figure provides information about changed. The value changes of the
data validation triggered by the trig- parameter can be performed from the
ger on the subject distribution application program and simultane-
process if at the time of data class ously affect the actions performed by
filling does not exist. the rules within the database soft-
2. Credit filling Credit filling process is made in two ware.
models, namely charging credit for
new students and charging credit for From some test results it can be seen that the academic infor-
old students. Charging credit for new mation system by using Active Database is able to monitor out
students using a stored procedure
and the entry of data in academic information systems, if the input
sp_kelaskan_mhs_baru. By using
stored procedure that has been suc- of the user who is initializing the system has not violated the rules.
cessfully done the process of place-
ment of new students in a particular 6.1 Driven Approach Parameter in Trigger
class, and making credit for the new Trigger is a program that is stored in the table and will be execut-
student automatically. ed when the process of manipulating data in the table, such as
addition, conversion and deletion of data. When a data set is en-
While the credit process of old stu-
tered into a record in a table, the active database system has a
dents has been able to check the
amount of credit taken in the relevant temporary table named INSERTED that will hold the data entered
semester based on the achievement into the table. All data entered into the table can be identified by
of the previous semester evaluation. <inserted> table name. <Column name>.
When credit data is recorded into the
database, a trigger will be activated, 6.2 Driven Approach Parameter in Stored Procedure
then check the number of credits Stored procedure is another feature provided by active database
entered and compared to credis that
system. Stored procedure can be directly called from the front-end
can be loaded, so credits entered into
credit (KRS system) do not exceed application, so to run a stored procedure, only applications that
support the use of stored procedures that can run it. In the academ-
100 International Journal of Engineering & Technology
ic information system there is a stored procedure to conduct stu- need to be input to use the function and what return value to know
dent evaluation of the achievement of the study during the first 2 with the data type.
years. The stored procedure script is stored in an active database For example, an application built using Borland Delphi to access
with the name sp_evaluasi_2tahun. With parameters in the form the active database has been created. Applications can use stored
of study program code and force. functions that are embedded in the academic information system
database. For example to get the number of GPA from a student
6.3 Driven Approach Parameter in Stored Function can use stored function that has been planted in active database.
The Delphi programmer simply knows the name of the function
Stored function serves to generate return values that can later be and parameters passed to the function and the return value gener-
used to process important information in the system. As with ated by the stored function, which can be modeled as follows:
stored procedures, stored functions can also have parameters that Dbo.getIPK(@npm varchar(20)) RETURNS deci-
mal(9,2)
must be filled when calling them, otherwise the stored function
can also return a value that can not be found in a stored procedure. From the information structure above, the Delphi programmer
With this stored function, the front-end application can call the simply create a connection to the database, then declare a record-
functions stored in the active database system without the need to set to perform a query to the database eg:
strSQL = "SELECT dbo.getIPK('" + npm.Text
re-create it. In the rules that are planted in the active database + "')"
system, there is a stored function to get the credit quota that can be Further query results can be used in applications created using
taken at the time of registering CREDIT based on the semester Borland Delphi. The important thing to keep in mind is that de-
achievement index (IPS). veloping a system requires a thorough understanding of the system
R8: IF the student takes the study plan
THEN to be developed.
IF IP ≥ 3,00 THEN takes credit as many as 21-24
IF IP ≥ 2,50 AND IP<2,99 THEN takes the maximum 6.5 Parameter Change Rules
credit as many as 18-21
IF IP ≥ 2,00 AND IP<2,49 THEN takes maximum Some rules embedded in the database software have value pa-
credit as many as 15-18
rameters used by the system. These parameters can be changed by
IF IP ≥ 1,50 AND IP<1,99 THEN takes maximum
credit as many as 12-115 the app users if there are any rule changes during system trips that
IF IP <1,50 THEN takes maximum credit as many require changing the parameter values in the rule. With the facility
as 12 of parameter changes this rule can also provide an understanding
At the time of filling the credits there is a calling stored function to the user associated with the rules that have been planted in the
based on R8 rules. The stored function is shown in the following database software.
script:
6.6 Advantages and Disadvantages of the System
ALTER FUNCTION getJatahCREDIT
( The system developed using this active database system has sev-
@vips AS decimal(9,2)
eral advantages among others :
)
RETURNS int 1. Some rules that are embedded in the active database system
AS can be changed and adjusted to the business rules applied
BEGIN without dissecting the program code in the application. This
RETURN CASE will also make writing the program code on the application
WHEN @vips>=3.00 AND @vips<=4.00 THEN 24 – side/front-end to be simpler.
maximum credit 2. If at any time the application on the front-end side will be
WHEN @vips>=2.50 AND @vips<=2.99 THEN 21 –
developed with other programming languages, then the rules
maximum credit
WHEN @vips>=2.00 AND @vips<=2.49 THEN 18 – that have been planted in the database software can be reused
maximum credit by the application.
WHEN @vips>=1.50 AND @vips<=1.99 THEN 15 – 3. In the use of active database system, the database not only acts
maximum credit as a container of data but also to apply reactive changes in da-
ELSE 12 ta on the database.
END
END In addition to the advantages possessed by the system developed,
this system also has disadvantages, namely:
The stored function will then be used to validate the number of 1. Implementation of active database system in this case take the
credits taken based on the previous semester achievement index. If case of academic information system based on this rule that
at any time the rule the maximum number of credits that the sys- have consequences to make programming in database side
tem will use change due to policy changes in its business rules become more complex.
then there is no need to re-open the front-end application script, 2. The development of the system is limited by following the
simply change the value stored in the stored function. business rules embedded in the database software.
ment tool can access the database, then the development tools can [21] Yadav, M.; Kumari, S. 2016. A Paradigm for Active Database
directly use the rules that are planted in the active database system. Management Systems. International Journal of Engineering and
The application environment serves as an input and output control Computer Science, vol.5, no.1, pp.15572-15577.
mechanism of data going in and out of the database, whereas pro-
gram logic and business rules are stored in the database software
to monitor the entire system and ensure that data processing runs
correctly.
References
[1] Vijayalakshmi, R., Duraipandian, N. 2014. Service Oriented Architec-
ture and Privacy Preserving Mashup of Healthcare Data. International
Journal of Engineering & Technology, vol.3, no.3, pp. 337-342.
[2] Kurdi, N.,K. 2005. Rancang Bangun Sistem Administrasi Akademik
(SIAKAD-2004) Berbasis Intranet Untuk Universitas Lampung. Tesis
Magister Ilmu Komputer. Yogyakarta: Universitas Gadjah Mada
[3] Efendi, R.M.M.H, 2007. Perancangan Sistem Informasi Akademik di
Fakultas Adab UIN Sunan Kalijaga Yogyakarta dengan Konsep
Human Computer Interaction. Tesis Magister Teknologi Informasi
UGM. Yogyakarta
[4] Fachrurrozi, M. 2008. Peningkatan Fungsionalitas Perangkat Lunak
Melalui Restrukturisasi Data (Studi Kasus : Sistem Informasi
Akademik Fakultas Ilmu Komputer Universitas Sriwijaya). Tesis
Magister Informatika ITB. Bandung
[5] PATON, N. W.; DÍAZ, O.; 1999. Active Database Systems. ACM
Computing Surveys, vol.31, no.1, pp.63-103.
[6] Lanova, W. 2009. Sistem Penjadwalan dengan Constraint
Menggunakan Active Database. Skripsi Departemen Teknik
Informatika IT. Telkom.
[7] Meybodi, M.R.; Rasoolzadegan, A. 2010. Rule Scheduling in Active
Database Using Learning Automata. International Journal of
Computer, Mathematical Sciences and Applications, vol.4, no.1-2,
pp.239-262.
[8] Gupta, S.R.; Ali, M.S. 2010. Performance Evaluation in Active Real-
Time Database System through Buffer Management. International
Journal of Computer Science and Application, pp.151-156.
[9] Guo, YZ. 2013. University Teaching Administration System based on
Active Database. Proceedings of the 2nd International Conference on
Computer Science and Electronics Engineering (ICCSEE 2013),
published by Atlantis Press, Paris, France.
[10] Ephzibah, E.P.; Sujatha, R. 2017. Big Data Management with Ma-
chine Learning Inscribed by Domain Knowledge for Health Care. In-
ternational Journal of Engineering & Technology, vol.6, no.4, pp. 98-
102.
[11] ACT-NET Consortium. 1996. The Active Database Management
System Manifesto: A Rulebase of ADBMS Features. ACM SIGMOD
Record, vol.25, no.3, p.40-49.
[12] Butleris, R; Kapocius, K. 2002. The Business Rules Repository For
Information Systems Design. ADBIS. Department of Information
Systems, Kaunas University of Technology, Lithuania.
[13] Rabuzin K, Malekovi M, Lovreni A. 2007. The Theory of Active
Databases vs. The SQL Standard. The Proceedings of 18 International
Conference on Information and Intelligent Systems; Varaždin, Croatia,
pp. 49-54.
[14] Klaus R. Dittrich; Stella Gatziu; Andreas Geppert. 1995. The active
database management system manifesto: A rulebase of ADBMS
features. RIDS '95 Proceedings of the Second International Workshop
on Rules in Database Systems, Pages 3-20
[15] F. Casati, S. Castano, and M. Fugini. 2001. Managing Workflow
Authorization Constraints through Active Database Technology.
Information Systems Frontiers, vol. 3, no. 3, pp 319–338.
[16] Rabuzin, K.; Maleković, M.; Bača, M. Active databases, business rules
and reactive agents - what is the connection? Journal of Information
and Organizational Sciences, vol.29, no.1, pp. 63-73.
[17] Kozak, J. 2011. Rules in Database Systems. WDS'11 Proceedings of
Contributed Papers, Part I, pp.131-136
[18] Sharm, R.K.; Ghandi, P. 2017. Estimate Reliability of Component
Based Software System Using Modified Neuro Fuzzy Model. Interna-
tional Journal of Engineering & Technology, v.6, n.2, pp. 45-49.
[19] Singh, J.; Sharma, S. 2018. Fault Detection Technique for Test Cases
in Software Engineering. International Journal of Engineering &
Technology, vol.7, no.1, pp. 53-56.
[20] Kermani, E.R.; Momeni, M. 2016. Simultaneous Management and
Control on Cost and Time in The Project Development Through
Fuzzy Logic to Risk Management. International Journal of Engineer-
ing & Technology, vol.5, no.4, pp. 135-138.