Designing an OER Physics Problem Database

Designing an OER Physics Problem Database

The OER Physics Problem Database (pdb) provides an open access resource to enhance problem solving skills and student learning outcomes. The pdb is built with the open source database management system (dbms) MySQL, well known to for its reliability, functionality, and performance.

Two other main components of pdb are JabRef and LaTeX, which are both published under free software licenses. JabRef provides a graphical user interface (GUI) for users to insert questions to the pdb, and LaTeX provides a high quality PDF document output. The following flow chart shows the relationships between MySQL, JabRef, and LaTeX in handling the information in the pdb in order to produce a document of chosen physics problems.

PDB flow chart


Figure 1: A flow diagram showing the main components of pdb.

Users will insert problems into pdb with the JabRef GUI, shown in Figure 2. JabRef is typically used as a bibliography manager and paired with LaTeX. The main features pdb will use from JabRef are customizable functionality and the ability to connect to MySQL databases. (See for more information.) This the method of managing a database with mathematical expressions is an extension and modification from Mark Hickman’s database of math problems of University of Canterbury, which he has  offered available under the free software license, ( The OER pdb differs from Hickman’s in that it is for physics problems;  it contains different customized fields for the question entries, it uses MySQL for dbms, and allows images to be added.

The questions inserted into pdb with JabRef have required fields that must be completely filled in order to qualify as valid pdb input. The necessary fields are: Problem, Ndim, Owner, Timestamp, Subject, Difficulty, Solution, and Bibtexkey. LaTeX commands may be used directly in the fields; this is especially useful for the Problem and Solution inputs. Ndim is the number of dimensions of the problem, the Owner field is the user submitting this question to pdb, Subject denotes the area of physics that the question focuses on, and Difficulty should be entered in as easy, medium, or hard. Also, each question has a Timestamp field in order to make sure the problems in pdb remain current.

jabref dashboard


Figure 2: Users input problems into pdb via the GUI provided by JabRef.

JabRef connects to the MySQL pdb and merges new questions with existing ones in the database. SQL is short for “Structured Query Language”, and is a standard for dbms. All information in the database is stored as tables and linked with keys, of which there is only one primary key. The primary key is a unique identification number attached to each problem in pdb. While JabRef provides a GUI interface for input, MySQL will handle the heavy lifting behind the scenes in managing the database. Such managing will be necessary as subroutines are developed to randomize and alter tables.

mySQL document for pdb

Figure 3: The pdb is named PHYSICS_DB, with tables named: ENTRY, FIELD, and METADATA. (Note that MySQL is case sensitive)

The pdb consists of three tables (case sensitive): ENTRY, FIELD, and METADATA. The ENTRY table holds the primary key, denoted as SHARED_ID, which is an increment in each physics problem, the TYPE of entry, and the VERSION. The FIELD table holds all the information about the physics problems, such as problem, timestamp, ndim, solution, etc. In FIELD, the ENTRY_SHARED_ID links to the primary key, NAME matches the title fields in JabRef, and VALUE holds the problem input. METADATA is a table that simply describes the information stored in this database.

mySQL tables

Figure 4: These are the tables in pdb, with a couple of rows filled. All of the question content is held in the VALUE column.

The entity relationship diagram (ERD) for pdb is shown in Figure 5. An ERD aids in visualizing the logical relationships between tables and data in a database; this also helps with design and performance. The ENTRY entity (table) holds the primary key, shown with a yellow diamond next to SHARED_ID. The dashed line linking to the FIELD entity means that there is a relationship between ENTRY and FIELD, and that FIELD contains attribute values from ENTRY. The fact that there is one, and only one ENTRY per row is shown by the two short double vertical lines on the relationship line. The pdb allows for question/answer variation, thus there may be one or many questions per unique row in entry; this is expressed as the “crow’s feet” and short vertical line next to the FIELD entity. METADATA does not relate to the other tables, but shows information about the type of data that pdb holds.

Figure 5: The erd for pdb.

In order to access particular problems from pdb, a user can search for a keyword from subject, ndim, difficulty, owner, or timestamp. For example, to select all problems that are under the subject of kinematics in pdb, the query syntax is shown in Figure 6. Note that the asterisk (*) is known as a wildcard, which returns all matches that fulfill the requirements of the given search. In this example, the subject search for all kinematic questions gives problem numbers: 1, 4, 6, 7, 9, 11.

mySQL file

Figure 6: An example showing how to select all kinematic problems from pdb.

Finally, a PDF document of the chosen physics problems is created with a short LaTeX file, displayed in Figure 7. LaTeX is a very common document preparation system used in mathematics and the physical sciences ( ). In the LaTeX file it is important to use the ‘problems’ package; this allows access to pdb problems. The user will simply input the desired problem numbers, and decide if they want to create a document with only problems, or problems with solutions.

Figure 7: The LaTeX file that will create your pdb document.

The two links below show the PDFs generated by the above methods with the OER Physics Problem Database. The first link shows the problems only, and the second link shows the output when the problems with solutions option is chosen in the LaTeX file.

The framework for the OER pdb is complete and the next step is to set up a server and provide remote access to users. From there, we will begin constructing the assessment content base and make plans to pilot the use of the pdb in Physics courses this academic year.

Posted by Christina Nelson in OER
An Open Physics Database for Students Learning with OER

An Open Physics Database for Students Learning with OER

Two main components are crucial for one's success as a physics student: access to proper studying resources, and developing problem solving skills. Beginning in 2015, the UH Mānoa Department of Physics and Astronomy has used the OpenStax College Physics OER textbook for their introductory physics courses, which is freely available online under a Creative Commons license. This eliminates the cost of purchasing a text book, and allows access to course materials for everyone; a print textbook also available to those who wish to purchase it.

About the Database

Particularly in physics, solving problems by working through to the solution is a key process of learning. We are building a physics database (pdb) of practice and assessment problems to pair with the Openstax College Physics textbook. The pdb will be open source, with the goal of providing a quality and free resource to students and faculty that others can extend or build on. Ideally, the problems in pdb will be randomized and mutable so that they are unique in methods of solution and time. This will help foster critical thinking, and reasoning in physics.
One of the main aspects of physics that is truly exciting is how mathematics is used to accurately describe the reality around us. It was Newton who first described gravity with a thought experiment. He considered firing a cannon from a very tall building, and eventually if fired with enough force, the cannon ball was sent into orbit around the Earth. Indeed, it is this falling motion in gravity that holds the planets and our solar system together. The planets are literally falling around one another! Problems in pdb will be algebraic and complementary to the content structure of the OpenStax College Physics text. Students will learn Newton's laws of motion, kinematics, work and energy relations, uniform circular motion, linear momentum and collisions, statics and torque, rotational motion and angular momentum.

Concepts in Physics

To give an example of the knowledge areas the pdb will focus on, here is a classic example of conservation of angular momentum. The concept is demonstrated by an ice skater who controls their speed by extending or pulling in their arms. When the skater pulls in his or her arms, their moment of inertia is decreased.

Thus, in order for angular momentum L to be conserved, if a skater changes shape by extending or lowering their arms, their rotational speed must decrease or increase, respectively.

ΔL = 0

The two videos below demonstrate this phenomenon. Conservation of angular momentum is applied to solving many physics problems. Examples include those involving orbiting planets, gravitation, motion of atoms and subatomic particles.

Chris, a graduate student in the Department of Physics and Astronomy at the University of Hawaii Manoa, demonstrates conservation of angular momentum.

Mechanical engineering junior at the University of Hawaii Manoa, Ana, demonstrates conservation of angular momentum.

Our goal is to create the physics database of problems to serve as a free resource for students and teachers that are using the Openstax College Physics book. OER can greatly offset costs for students, and we hope to provide a quality problem solving component to match.

Project Leads of the Physics Database of Problems

Dr. Mark Slovak

Mark H. Slovak is an observational astronomer in the Department of Physics & Astronomy at the University of Hawaii at Manoa, specializing in cataclysmic variables. Involved with STEM/OER initiatives for several decades, he has been recognized for his outstanding undergraduate teaching in both physics and astronomy. An early adopter of OER e-texts for physics (and astronomy), he is currently engaged in efforts to provide additional ancillary OER materials, including a non-proprietary database of physics problems and exercises. He can be reached at mslovak_at-hawaii-dot-edu

Christina Nelson

Christina graduated from the University of Hawaii at Manoa with a B.S. in Physics and a minor in computer science in the Spring of 2017. Motivated by a deep passion to learn and discover what nature is telling us through physics, she plans to continue her academic career in graduate school at McGill University, Montreal. Her main interests are experimental particle physics, the fundamental constituents of matter and their interaction, the very early Universe after the Big Bang; quantum mechanics, how matter on the smallest scale relates to matter on the largest, the role of a conscious observer; and computer science applications to physics analysis such as Monte Carlo simulations, machine learning, and algorithm optimization.

For more about this project, see their project page: College Physics

Posted by Christina Nelson in OER, Open Textbooks, Student, UH Manoa