PDA

View Full Version : Math Equations in Databases. How to?


mnhk2006
Feb 19, 2006, 11:15 PM
:eek: Hi tech guys. I am in a software development process for an educational institution. Overview of project is random question generator which deals with all subjects like maths, phy, chemistry,. User enters a question, it may contain mathematical symbols, sub scripts & superscripts. My front end is VB. I don't want to store data as images. How do I retrieve data into front end and how do I store into backend (oracle) without losing formats and symbols. Kindly help me. Very urgent

ScottGem
Feb 20, 2006, 10:55 AM
I'm assuming you are referring to storing the formulas themselves. If these are really complex math equations, then you are better off using an Equation editor (like the one in Word) and storing as an image. There are a number of mathematical symbols that can be used in text strings. The obvious +-/* plus ^ for power may be sufficient for many formulas.

dmatos
Feb 20, 2006, 08:23 PM
How are the users going to enter the question into the front end? I suspect you will need some form of markup language (for entering and storing the equations) plus a rendering engine (for displaying them).

mnhk2006
Feb 21, 2006, 01:38 AM
My front is vb. I'll be using text boxes to capture data from user. Special symbols are loaded into list box and after selecting a symbol it concats at the end of text box. I need to store it into database and further I should be able to retrieve it. What data type I should use to preserve the formattings and what input controls I should use to retrieve the data.

dmatos
Feb 21, 2006, 05:37 PM
How are the special symbols represented in the list boxes? Are they selected from a choice of images? I would suggest that you create text representations of the special symbols, like <integral> or <delta>, store them that way, then when retrieving from the database, you could parse for those tags and display an appropriate image.

mnhk2006
Feb 21, 2006, 07:22 PM
I am loading text in list box by setting the font as SYMBOL. So I can select any symbol and this symbol will be padded with text in text box. But when getting the data into text box, it'll be changing the format to its own type. How to do it