I\'m using mySQL to set up a database of stock options. There are about 330,000 rows (each row is 1 option). I\'m new to SQL so I\'m trying to decide on the field types for
I would definitely not recreate the database each time. Instead I would do the following:
If it were me I would also have an in memory cache of all the symbols and the current price data.
Price data is never an int - you can use characters.
The company name is probably not unique as there are many options for a particular company. That should be an index and you can save space just using the id of a company.
As someone else also pointed out - your web clients do not need to have to hit the actual database and do a query - you can probably just hit your cache. (though that really depends on what tables and data you expose to your clients and what data they want)
Having query access for other users is also a reason NOT to keep removing and creating a database.