Solved

Converting large excel simulation to MySQL - Tools & Steps

Posted on 2008-06-10
5
391 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
ID: 21751419
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
ID: 21751501
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
ID: 21752704
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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