Solved

Converting large excel simulation to MySQL - Tools & Steps

Posted on 2008-06-10
5
387 Views
Last Modified: 2013-12-13
In Excel I have a simulation that I have been slowly adding to over a series of months.  The simulation is entirely based in Excel and simulates a 8 season period of a football clubs league life.

It allows for 8 clubs to be 'played' over the 8 season period, and each season you enter data for each club.

I want to convert the project to a MySQL database, some of which is simple , some is complex.

The key problem is the worksheet which represents the 'engine' of the simulation, this takes several hundred complext calculations based on the input from all 8 clubs and generates data based on them, this data is then in turn displayed in reports.  

How can I go about breaking the incrediably complex excel spreadhseet apart strategically ?

How can I programme an MySQL table to derive data from other table values ? Is this possible or will the PHP script need to handle the calculations and then post them into the 'stats' table.

Can I use a function as a cell value within a MySQL table, and when will this data update if the function returns a new value, say for example when the club data is added ?

Ultimately I want to build an intelligent MySQL that can store the data , and perform all lthe calculations on the fly as data is updated.
0
Comment
Question by:ecommercedeveloper
  • 2
5 Comments
 
LVL 3

Expert Comment

by:caseyrharris
Comment Utility
Depending on how the data is entered into the Excel DB you have several option via transactional SQL.  You may create insert/update stored procedures in the SQL DB.  These would then run the business logic you desire populating the data to the other tables.  Another option is to utilize triggers on insert to the club data in order to complete the logic needed to populate the other tables.  

I believe SP's and Triggers are the most effiecient way to do this as all of the computations and work is done at the SQL Server level.  Anymore detail on what the "complex excel computations" you are using?  Maybe with examples I or someone else on here could get you started with the procs/triggers.
0
 

Author Comment

by:ecommercedeveloper
Comment Utility
Many thanks for your suggestions.

The triggers would have to handle upto 100 calculations all feeding into the 'engine' db, and all pulling data from oher tables containing 'static' data and other club data

A simple example would be, once the club entered its total gate footfall, the sp/trigger for the update would then do

100/allclubfootfall * clubfootfall

to calculate the percentage of football fans the club attracts.  The problem I have is there are hundreds of calculations built up over months of time , for example random weather factors affect the attendence.

How can I possibly extract all the formulas and cell mapping from excel in a manner that allows easy recreation in MySQL
0
 
LVL 3

Accepted Solution

by:
caseyrharris earned 500 total points
Comment Utility
Doesn't seem like an easy task, take a look at this thread, it might be helpful:

 http://www.mrexcel.com/archive2/30200/34400.htm

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now