phpMyAdmin

PhpMyAdmin is a web-based administration utility developed by the phpMyAdmin group. It is written in PHP and provides many utilities for managing a MySQL server. The application provides a graphical interface for performing many administration tasks which are possible but cumbersome with MySQL text based utilities. PhpMyAdmin is used in our lab for designing and maintaining the Ensemble database. Additionally, it is sometimes used by researchers in the lab to edit question records or manage stimulus records.

Editing Questions, Forms, and Experiments Within the Database

If you find that you need to change aspects of an existing form, question or experiment that cannot be edited in the respective editors (e.g. the form header), you can do so in the database.  However, caution must be taken to ensure that you don’t corrupt any response data that is already stored.  It may be a good idea to print out the original versions of the affected forms before you make any changes.  Depending on the magnitude of the changes and the degree to which they will affect stored responses, it may be a better idea to generate new forms, questions, or experiments, rather than edit existing ones. 

Editing Questions To edit the text or category of a particular question, log in to phpMyAdmin and open the ensemble database.  Select the “question” table from the list on the left. The select “browse” from the tabs at the top of the main window to view the entries in the table.  To edit a particular question, click the pencil icon at the left of the screen.  Do not edit the question_id.  You can edit the question text by typing changes in the associated text box, using html commands for formatting.  You can also change the question category (e.g. general background vs. experiment specific). 

If you need to edit the answer format associated with a particular question, there are a couple of ways to go about it.  If the question is not already in use and you need to change the answer options, you can change them directly in the data_format table.  Or, if you want to keep the old enum values for future use, you can create a new enum set (in the Question Editor) and then link it to the desired question in the junction table question_x_data_format.  To do this, look up the data_format_id for the enum set in the data_format table and then enter it in the field called “answer_format_id” in the junction table.  If the question is already in use in other experiments and you don’t want your changes to apply to all instances of the question, you should create a new question with the desired response enums. 

Editing Forms To edit a form’s name, header, footer, or conditional terms, log in to phpMyAdmin. Select the “form” table from the list on the left.  Then select “browse” from the tabs at the top of the main window to view the entries in the form table.  To edit a particular form, click the pencil icon at the left of the screen next to the desired form. This will bring up the fields associated with that form.  As you will see, you cannot edit the questions associated with a form from this table; to do this, use the form editor.  Do not edit the form_id.  To make changes to the header, footer, or conditions, simply type your changes in the respective text box.  You will need to use html commands to format the text in bold or italics or to insert paragraph breaks. 

Forms are mapped to questions in the junction table form_x_question.  You should not make changes to this form directly; the form editor allows you to add, drop, and reorder questions.  Similarly, forms are mapped to various experiments in the table experiment_x_form.  You should use the experiment editor to add, drop or reorder forms in an experiment.  Do not make changes to this table in the database.

Editing Experiments Exercise caution when making changes to this table, as changes may affect analysis scripts.  The only fields you should change in this form are experiment_title and response_table.  Other changes to an experiment should be done in the experiment editor.

More information on phpMyAdmin can be found at the phpMyAdmin site.

bottom corner