I am creating a credit card applicatoin in Codeigniter that will allow anybody, without logging into websites, to produce a form to become completed using different input types (using text boxes, dropdowns, checkboxes, etc.). This type might be 1-100 questions so when completed it will likely be e-mailed to another person who'll then complete it on the website.

When i first setup my MySQL database much like this post, with a number of different tables with merely a couple of posts. Then i indexed and used foreign secrets to link the data.

Since that time, I've transformed and hang up my database such as this so I am making less queries:

Document
  id, name, email, recipientname, recipientemail, document name
Document Questions
  document_id, question_id, question, type, comments

Is getting more tables with less posts but more queries more effective than how I am doing the work now? I realize that normalization plays a job, but as to the extent are you currently blocking performance by looking into making your tables so particularly small?

From the normalization perspective you will find things you could do this to help normalize your computer data (readers might have their very own entity and kinds may also), but it is not necessarily probably the most optimal method of being able to access your computer data.

For instance, should you split your condition into 4 different organizations (Types could just like be easily an ENUM):

Documents
Document Questions
Recipients
Types

Then to fetch just one form for the application you'd be performing a question with multiple joins. If you are using MyISAM then all of the tables become locked before the query finishes. Queries with bad joins and bad indexes may become very slow.

A much better alternative is always to execute four separate queries around the database (add indexes in accordance with the most typical queries you are running) to retrieve your computer data, by doing this tables will remain locked for a shorter time of your time.

I understand it is really an extreme example, however i would concentrate more about your index optimisation and strike a great balance between normalization and gratifaction.

To summarize, sometimes fully stabilized data means lower performance.