You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/323714070

The 3 steps of best data warehouse model design with leaning implementation
for sales transaction in franchise restaurant

Conference Paper · November 2017


DOI: 10.1109/CYBERNETICSCOM.2017.8311704

CITATION READS

1 302

3 authors:

Junaidi Junaidi Harco Leslie Hendric Spits Warnars


Raharja University Binus University
25 PUBLICATIONS   27 CITATIONS    222 PUBLICATIONS   736 CITATIONS   

SEE PROFILE SEE PROFILE

Yaya Heryadi
Binus University
71 PUBLICATIONS   255 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Executive Information Systems for Cabin Base Aircraft Maintenance at PT. GMF AeroAsia Tbk View project

Perfecting A Video Game with Game Metrics View project

All content following this page was uploaded by Harco Leslie Hendric Spits Warnars on 12 November 2020.

The user has requested enhancement of the downloaded file.


The 3 steps of best Data Warehouse model design
With Leaning Implementation For Sales Transaction in Franchise Restaurant

Mohammad Subekti Junaidi Harco Leslie Hendric Spits Warnars1,


Computer Science Department, School of Computer Yaya Heryadi2
School of Computer Science, Science Computer Science Department, BINUS Graduate
Bina Nusantara University STMIK Raharja Program – Doctor of Computer Science
Jakarta, Indonesia 11480 Banten, Indonesia 15117 Bina Nusantara University
Subekti@binus.ac.id junaidi@raharja.info Jakarta, Indonesia 11480
Spits.hendric@binus.ac.id 1,
yayaheryadi@binus.edu 2

Abstract—Doing Data Warehouse (DW) to your business or statement[2,3,6]. Thus, less of join tables in sql statement will
system is not only think about the trend only, but how to boost the sql query process and at the end will speed up
understand the DW knowledge itself and how to implement it. creating reports for supporting decision making.
DW as a real technology of Artificial Intelligent (AI) which show
up as how to think like a human, inevitably help the human Regarding with unnormalized database, then we recognized
particularly in making quick decision reports. Doing DW to your this is as data warehouse in form of database with schemas
systems should apply to the mother knowledge of AI which we such as star schema, snowflake schema or fact constellation
recognized as Software Engineering (SE) where we should apply schema and wrapped up as OLAP (Online Analytical
best software application in more importantly we should satisfy Processing)[7]. On other hand, we have OLTP (Online
the user. In order to make a good DW model design as user Transcational Processing) or sometime can be said as TPS
expectation then we should apply 3 steps such as collect all the (Transactional Processing Systems) as a system for dealing
needed reporting, order all the reports start from the most with day to day activity business and equipped with normalized
needed reports and mapping all the ordered reports into fact database as opposed of OLAP with unnormalized
constellation schema. In this paper the 3 steps to model DW database[10,11,12]. The unnormalized database in OLAP is
schema is applied in sale transaction in franchise restaurant as came from normalized database in OLTP with ETL (Extraction
an example data. Building franchise restaurant must supported Transformation and Loading) process[8,9].
by information technology such as Data Warehouse (DW) in
order to manage and control the business process, the branch, the Meanwhile, restaurant as easy convenient for generate
sale, the staff and so on. profit money income, inevitably the thing most people look for.
Human should and need to eat and can we imagine how human
Keywords—Star Schema; Snowflake; Fact Constellation; Data can life without eating? Indeed, restaurant business is an easy
Warehouse; OLAP peasy business, where if you have good recipe, and people like
it, then you can have their money with selling food to them.
I. INTRODUCTION Moreover, franchise restaurant is booming fast food chain
The Big Data rhetoric has drowned the glory of the data restaurant, where for those who want to raise the profit from
warehouse with big data rhetoric such as Velocity, Volume and food industry can easily to join with some term conditions and
Variety. Data Warehouse(DW) when was invented by father of investment. Franchise restaurant is an easy peasy business
DW Bill Inmon, strongly clear that DW is not hardware or where the investor do not need to create their own recipes or
software implementation but it’s a technology how to improve restaurant management, but only focus with how much money
your information system application. In term of V for Volume, what to invest[13].
DW has been recognized for handling huge or large volume of Along with the growing interest of the people to invest their
data and term of V for Variety, Bill Inmon had done the money in the franchise restaurant business, and the growing of
implementation of DW in unstructured data but lost the number option of franchise restaurant, it cannot be denied by
prestige with Big Data. Moreover, in term of V for Velocity, the increasing number of members of the investors and
there were some DW implementation using MapReduce or branches of franchise restaurants, then there will problems in
parallel computation (sometimes called distributed computing reporting process, particularly for quick decision making
or grid computing) and MapReduce is recognizes as parallel process. The more the number of branches of a managed
computation algorithm as well. franchise restaurant will make it more difficult to determine
Data Warehouse is not a hardware or a software, but it is strategic decisions related to branch development and
intelligent technology where how we create best performance competition among franchised restaurants. As franchise
database environment for making fast response reports in branches grow more and more, managers will find it difficult to
decision making system[1,4]. Best performance database manage where the amount of data gets bigger and complex
environment for creating fast creating report only can be done with the problems of each branch. Managers will find it
where they have unnormalized database, where the difficult, when determining the right type and price of food
unnormalized database will reduce join tables process in sql menu to be relocated, given some types of food menu outdated

170
or competition with other restaurant industries or other 4. Menu1 (MenuID(PK), TypeMenuID(FK), MenuName,
franchise restaurants. In addition, it may be an outdated type or Price)
price of food menu, still an idol in some branches. Table Menu1 is a table which content the menu is offered
restaurant as profitable venture, inevitably become one in the franchise restaurant.
option to invest. People need to eat on daily basis and more 5. TypeMenu1 (TypeMenuID(PK), TypeMenuName)
than that people need beyond the food that they eat and Table TypeMenu1 is a table which content the type of
restaurant is profitable business which is not only feed the menu offered.
customer but beyond that entertain their customer, with the 6. Staff1 (StaffID(PK), BranchID(FK), StaffName, Address,
view and the presentation the place and the food itself. DateBirth, Gender, CheckID(FK))
Building business restaurant as a franchise restaurant is another Table Staff1 is a table which record the staff data which
possible profit income, but inevitably create new problem was assigned to one of franchise restaurant branch.
where the more branches the more problem will raise 7. Branch1 (BranchID(PK), BranchName, Location,
particularly for management purposes. One of recognized CheckID)
problem is lack of update information technology support Table Branch1 is a table which record the franchise
particularly for data streaming and data updating on daily basis restaurant branch.
or even hourly basis. Inevitably, building franchise restaurant 8. Payment1 (PaymentID(PK), TypeDiscountID(FK),
must supported by information technology such as Data TypePaymentID(FK), Price)
Warehouse (DW) in order to manage and control the business Table Payment1 is a table which record the way the
process, the branch, the sale, the staff and so on. DW has been transaction is paid and if there is a discount.
recognized as powerful technology which can delivered reports
9. TypeDiscount1 (TypeDiscountID(PK), DiscountName)
which can be used by franchise restaurant management or
Table TypeDiscount1 is a table which record type of
owner in order to control the profit. This paper will give view
with the optional to implement the sales transaction into DW payment.
which explanation for each model DW design. At the end user 10. TypePayment1 (TypePaymentID(PK),
will make decision which one suitable DW schema design. TypePaymentName)
Table TypePayment1 is a table which record type of
Obviously, we need to implement intelligent application in discount.
order to support the restaurant franchise business when running
their business and compete with others in terms of franchise
restaurant management. Data Warehouse is one the door to
enter the others intelligent application and truly we should
prepare by creating ideal data warehouse schema based on
current OLTP database system.

II. CURRENT OLTP DATABASE SYSTEMS


Figure 1 is class diagram of sale transaction at franchise
restaurant where the PK is Primary Key while FK is Foreign
Key, where each table has PK and each FK as connection to
other table[14] . There are 10 tables normalized database in
figure 1 and they are :
1. Check1 (CheckID(PK), BranchID(FK), StaffID(FK),
PaymentID(FK), TransactionID(FK), NomorCheck,
Status, DateOpen, DateClosed, Subtotal, Tax,
ServiceCharge, TotalPrice)
Table Check1 is a table which record each order which
made by customer and as complement of table
Transaction1, where each customer can have many
transactions.
2. Details1 (DetailsID(PK), TransactionID(FK),
CheckID(FK), MenuID(FK), TypeDetails, QtyBuy,
PriceBuy)
Table Details1 is a table which record how many type of
menu which ordered by each customer’s transaction.
3. Transactions1 (TransactionID(PK), DateActionOpen,
DateActionClosed, StaffID(FK), DetailsID(FK))
Table Transactions1 is a table which record each
transaction ordered by customer and as complement table Fig. 1. Design class diagram of sale transaction at franchised restaurant
Check1.

171
III. DATA WAREHOUSE MODEL DESIGN Key) in star schema in figure 2 and PK (Primary Key) in
Database model design in figure 1 shows as database for OLTP tables. Those attributes are DateID, MenuID, PayID,
transactions purpose where we recognized as OLTP/TPS BranchID, StaffID and all of them become 5 dimension tables
where it is as day to day system which dealing with customer (DateTrans, Branch, Menu, Payment, Staff) where in each
or external entity. On other hand, data warehouse is database dimension table has PK as Primary Key which refer to their
model design for reporting purposes which we recognized as FK as Foreign Key in fact table Sale. As a result, in figure 3,
OLAP. It is better for systems to split between transactional there are 1 fact table (sale) and 5 dimension tables where each
and reporting or between OLTP and OLAP, where at the end of them have relationship 1 to many association to the fact
the performance will be achieved for both of them. table sale.
In Data Warehouse, there are many option database model Figure 4 is a normalization of each table dimension in
design which can be opted and its represent in schemas which figure 3, for example only table staff does not have
can be called such as star schema, snowflake schema, fact normalization, where table branch is normalized become
constellation schema or galaxy schema. This schema will be subdimension table SubBranch, and table Payment is
built based on sale reporting which needed by the system. normalized into subdimension table CatPayment. Moreover,
Figure 2 is an example of star schema with only 1 fact table, table DateTrans has double normalization where normalized to
where the data in its fact table came from the sale reporting table week and table Week is normalized to table Month.
which consist each attribute in that fact table. Meanwhile, Table Menu is normalized into table SubMenu
and its table is normalized into table CatMenu.
Sale The arrow which appoint the fact table shows as
DateID
DateTrans unNormalization and its means the more inside the table the
MenuID
MenuName more unNormal the table. On other hand, the arrow which
TypeMenuName leave the fact table shows as Normalization and its means the
Qtybuy
Pricebuy more outside the table the more Normal the table.
Subtotal
Tax
ServiceCharge Month unNormalization
Discount MonthID (PK) 1 CatMenu
TotalPrice MonthTrans 1 CatMenuID (PK)
PayID Normalization CatMenuName
BranchID
Branchname
SubBranchName Week * Sale SubMenu
StaffID WeekID (PK) MenuID (FK) * SubMenuID (PK)
WeekTrans 1 StaffID(FK)
SfaffName Monthid (FK) 1 SubMenuName
DateID(FK) CatMenuid(FK)
* PayID(FK)
Fig. 2. Star schema with only fact table of sale transaction at franchised BranchID(FK) *
restaurant DateTrans 1 * Qtybuy Menu
DateID (PK) Pricebuy * 1 MenuID (PK)
DateTrans Subtotal MenuName
The record/tuple in fact table figure 2 is recognized as Weekid(FK) Tax’ SubMenuid(FK)
ServiceCharge
unnormalized data where there are repeating in some Discount
1 * TotalPrice * 1
attributes. For example, attributes such as Branchid, Branch Payment
BranchID(PK) PayID(PK)
Branchname, SubBranchName will be repeated since in one Branchname * Way2Pay
SubBranchid(FK) CatPayid(FK)
order transaction in one branch restaurant will have many 1
ordered menu. *
Staff *
SubBranch StaffID(PK) CatPayment
SubBranchID(PK) 1 StaffName 1 CatPayID(PK)
DateTrans SubBranchname CatPayName
Menu
DateID (PK) 1 * Sale
DateTrans * 1 MenuID
MenuName
(PK)
Fig. 4. Snowflake schema of sale transaction at franchised restaurant
WeekTrans MenuID (FK)
StaffID(FK) SubMenuName
MonthTrans CatMenuName
DateID(FK)
PayID(FK) Figure 4 is recognized as snowflake schema, where sub
1 * BranchID(FK) * 1
Branch Qtybuy Payment dimension table is created and figure 4 shows a snowflake
BranchID(PK) PayID(PK)
Branchname Pricebuy Way2Pay table with 1 fact table Sale, 4 dimension tables such as
SubBranchName Subtotal CatPayName
Tax’ DateTrans, Branch, Staff, Menu and Payment. Moreover, it
ServiceCharge has 4 sub dimension tables such as Week, SubBranch,
Discount * 1
TotalPrice Staff SubMenu and CatPayment and 2 subsub dimension tables
StaffID(PK)
StaffName such as Month and CatMenu.
Fig. 3. Star schema of sale transaction at franchised restaurant The furthest table from the fact table will have one to
many association to the next associated table and so do with
Figure 3 is an example of normalization of star schema in the next associated table to the fact table. Obviously, subsub
figure 2, where some class or entity such as Date, Menu, dimension table has 1 to many association to sub dimension
Branch, Payment and Staff are created. The creation of each table and sub dimension table has 1 to many association to
dimension table come from chosen of unique attribute in star dimension table and thus dimension table has 1 to many
schema in figure 2 or recognized as attribute FK (Foreign association to the fact table. Each of subsub dimension table

172
has PK which associated to its FK in its sub dimension table, deliver best excellent software application in order to satisfy
and each sub dimension table has PK which associated to its the user. As long as the user are not satisfied with the software
FK in its dimension table. Moreover, each dimension table has application implementation then we have done the wrong SE,
PK which associated to its FK in fact table. For example, table no matter what the reasons behind that.
CatMenu as subsub dimension table has PK=CatMenuID Since DW was invented for creating report purposes, then
which become FK in table SubMenu as sub dimension table the satisfaction of user when using DW technology is when
and table SubMenu has PK=SubMenuID which become FK in the DW can make faster reporting which particularly to
table Menu as dimension table. Finally, table Menu has support in quick response decision making process. When the
PK=MenuID which become FK in fact table sale. DW can make quick response reporting then the user as
This snowflake table is possible become fact constellation usually middle and high level management will satisfy,
schema or recognized as galaxy schema, when there is another otherwise its catastrophe.
fact table which associated to at least one of dimension or sub In order to make faster DW environment which rely on
dimension or subsub dimension tables. Thus, when dimension creating reporting, then we should do the next steps:
or sub dimension or subsub dimension tables has association 1. Collect all the needed reporting.
with more than one fact table then it will be called snowflake 2. Order all the reports start from the most needed reports.
or galaxy schema Data Warehouse. 3. Mapping all the ordered reports into fact constellation
schema.
IV. JUSTIFICATION BETTER SCHEMA DESIGN FOR So, going back again, to the problem, which one as best
IMPLEMENTATION excellent DW schema? The answer is again! we should do
After we got star schemas in figure 2 and 3 and snowflake best excellent SE where making a good software application
schema in figure 4, then the next question is which one as best which satisfy our user.
Data Warehouse (DW) schema? We should define why star Sometimes, there is a question in our head regarding with
schema in figure 2 or 3 is as best excellence DW schema or join sql statement, where if join process in sql statement will
why snowflake schema in figure 4 is more better! But first of decrease the performance then why do not just only having
all, we should understand with the fact table, how to build the star schema without dimension table as seen in figure 2? Why
fact table, what the criteria or requirement to build the fact there is star schema with dimension tables as shown in figure
table! Since DW was invented for reporting purposes, where 3 or even snowflake schema which including content sub and
split between OLTP and OLAP then in order to find which subsub dimension tables as shown in figure 4? We are agree
one as best excellent DW schema then we should find which that the fact table only in figure 2 is more faster to create
one as DW schema with best excellent reporting performance. reporting rather than star schema in figure 3 or even snowflake
The fact table in DW represents the report in the system schema in figure 4. More than that fact constellation schema is
and there is limitation how many reports resources can create the most applied DW schema and in reality DW environment,
how many fact tables. The minimum requirement is from 1 we can not have DW schema with 1 or 2 fact tables only.
report can create 1 fact table, and possible as well if 1 fact Absolutely, fact constellation schema is the most suitable and
table can be created based on many reports. Let say, one or the most applied DW schema.
more reporting can create one or more fact table, but
impossible if from 1 report create many fact table, because it
will make the ambiguity and of course the redundancy.
Star schema in figures 2 is more faster for creating reports
rather than star schema in figure 3, but star schema in figure 2
is wasteful in data storage allocation rather than star schema in
figure 3. Creating report with star schema in figure 2 does not
need join operation between tables in sql statement, so that is
why star schema in figure 2 is faster for creating report differ to
star schema in figure 3. On other hand, creating report with star
schema in figure 3 will need join tables operation in sql
statement where at the end will decrease the report creation
performance differ with creating report with star schema in
figure 2. Remember, in sql statement running the sql statement
only for 1 table is more faster rather than running sql statement
with more than 1 table where there is needed to make joint
operation.
The next question is which one as suitable
implementation? Star schema with only 1 fact table as shown
in figure 2 or star schema with 5 dimension tables as shown in
figure 3 or snowflake schema in figure 4? To answer this
question, then we should reverse back to the theory of
software enginnering (SE), where the point of SE is how to Fig. 5. Mapping reporting order in snowflake schema

173
Figure 5 shows the 3rd process as mention above, how to can be applied in order to implement the three steps of best
map all the ordered reports into fact constellation schema and DW schema design implementation.
as mention before that fact constellation schema is the most
applied DW schema, but for example we run to snowflake
schema in figure 4 as for convenience and easy to explain. In
figure 5, there are 4 numbering which represent the ordered REFERENCES
reports start from report number 1 as the most needed report to
report number 4: [1] H.L.H.S, Warnars and R. Randriatoamanana. Datawarehouser: A Data
1. Report number 1 is a report which is created from table Warehouse artist who have ability to understand data warehouse schema
pictures. IEEE TENCON 2016 (Technologies for Smart Nation), pp.
sale only. 2207-2210, 22-25 Nov 2016, Singapore, 2016.
2. Report number 2 is a report which is created from 3 tables [2] H.L.H.S, Warnars. Rancangan Infrastruktur E-Bisnis Business
such as sale, DateTrans and Week. Intelligence Pada Perguruan Tinggi. Journal Telkomnika, 6(2), 115-124,
3. Report number 3 is a report which is created from 4 tables August 2008.
such as sale, DateTrans, Week and Month. [3] H.L.H.S, Warnars. Analisa Dampak Investasi Teknologi Informasi
Proyek Data Warehouse Pada Perguruan Tinggi Swasta Dengan Metode
4. Report number 4 is a report which is created from 7 tables Simple Roi. Journal Informatika, 9(2), 101-108, November 2008.
such as sale, Menu, SubMenu, CatMenu, Payment, [4] H.L.H.S, Warnars. Desain ETL dengan contoh kasus Perguruan Tinggi.
CatPayment and Staff. Journal Informatika, vol. 10, no. 2, pp. 86-93, November 2009.
[5] H.L.H.S, Warnars. Simple ROI untuk justifikasi investasi proyek Data
Report number 1 was mapped since as the most needed Warehouse pada perguruan tinggi swasta. Journal Ilmiah Teknik
report by the management and probably, this is kind of report Komputer, vol. 1, no.1, pp. 64-84, November 2009.
which usually needed on minutely basis, where it should be [6] H.L.H.S, Warnars. Desain model data warehouse dengan contoh kasus
perguruan tinggi. Journal of Industrial Engineering and Management
created in minutes. Off course, since this is the most needed System (JIEMS), vol. 3, no. 1, pp. 9-20, February 2010.
report then it only has 1 table only which is the fact table, [7] H.L.H.S, Warnars. Tata Kelola Database Perguruan Tinggi Yang
where at the end there is no join process in sql statement and Optimal Dengan Data Warehouse. Journal Telkomnika, vol.8, no. 1, pp.
at the end will increase time to create the report. Meanwhile, 25-34, April 2010.
other reports such as report number 2 as the second ordered [8] H.L.H.S, Warnars. Perbandingan penggunaan Database OLTP (Online
Transactional Processing) dan Data Warehouse. Creative
needed report needs 3 tables to create the report, report Communication and Innovative Technology (CCIT) journal, vol. 8, no.1,
number 3 needs 4 tables whilst report number 4 needs 7 tables. pp. 83-100, September 2014.
Thus, join process in sql statement upon tables databases will [9] H.L.H.S, Warnars, E. Suria and D.K. Jeremy. Pemahaman teori Data
decrease time to delivery or easy to say as performance. Warehouse bagi Mahasiswa tahun awal jenjang strata satu bidang ilmu
Obviously, when mapping the ordered report into fact komputer. Jurnal informatika, vol. 13, no. 1, pp. 20-24, Mei 2015.
constellation schema, we have to think the 1st order needed [10] H.L.H.S, Warnars. Multidimensi pada Data Warehouse dengan
menggunakan rumus Kombinasi. The 2nd National Seminar, National
report should have the minimum time to deliver the report and Seminar Information Technology Application 2006, University of Islam
other report will follow as an ordered time report delivery. Its Indonesia, pp. 1-6, Yogyakarta, 17 June 2006.
means that the DW schema design should confirm as to fulfil [11] H.L.H.S, Warnars. Multidimensi pada Data Warehouse dengan
the SE concept where we need to deliver best excellent menggunakan rumus Kombinasi. The 2nd National Seminar, engineer
software application in order to satisfy the user. industry and information technology, Sekolah Tinggi Teknologi
Nasional, Yogyakarta, 15 July 2006.
Conclusion
[12] H.L.H.S, Warnars. Multidimensional Datwarehouse with Combination
When deliver our Data Warehouse (DW) environment or as formula. The 2nd International Conference on Information and
recognized as DW schema, we have to apply Software Communication Technology and Systems (ICTS), Informatics
Engineering (SE concept) where we should create best Department, Faculty of Information Technology, Institute of Technology
excellent software application which is literally to satisfy our Sepuluh Nopember (ITS), Surabaya, Indonesia, 29 August 2006.
user. No mater normal or unNormal DW schema design, we [13] P.P. Oleynik, O.I. Nikolenko and S.Y. Yuzefova. Information System
believe that unNormalizing will boost the performance whilst for Fast Food Restaurants, Engineering and Technology, vol. 2, no.4,
pp.186-191, 2015.
normalizing will decrease the performance. However, we do
[14] P.U. Maurif, Penerapan data mining dengan teknik attribute oriented
not keen only in unnormalizing since there are many repeating induction untuk mencari characteristic dan discriminant rule transaksi
and recognize as digital rubbish and difficult as well when penjualan pada restoran franchise pt. Sushitei indonesia , Thesis S2,
dealing with this repeating think. On other hand, normalizing, Bina Nusanatara university, 2014.
is more convenient to maintain and easy to follow, but since [15] E. Capriolo, D. Wampler and J. Rutherglen. Programming Hive: Data
including many tables then the cost of performance will Warehouse and Query Language for Hadoop. 1 st ed., O’Reilly Media,
decrease. Inc. , California, USA, October 2012.
[16] S. Maitrey and C.K. jha, Mapreduce: Simplified Data Analysis of Big
The three steps such as collect all the needed reporting, Data, Procedia Computer Science, vol. 57, pp. 563-571, 2015.
order all the reports start from the most needed reports and [17] A.Thusoo, J.S. Sarma, N. Jain, Z. Shao, P. Chakka, N. Zhang, S.
mapping all the ordered reports into fact constellation schema Antony, H. Liu and R. Murthy, Hive- A petabyte scale Data Warehouse
using Hadoop, 26th International Conference on Data Engineering
is the easy way to create best SE implementation in order to (ICDE), Callifornia, USA, 1-6 March 2010.
create best DW schema design. Moreover, user requirement [18] W.H. Imnon and K. Krishnan. Building the unstructured data
tools such as questionnaire, interview, Meeting, observation warehouse: architecture, Analysis and Design, 1st ed., Technic
publications, New Jersey, USA, January 2011.

174

View publication stats

You might also like