QuizzifyTech

Bug library › Database testing

Database testing · Order items

Order item points to order 209, which does not exist

P2 · MajorIntermediateOrder items

Want to find it yourself first? This page gives away the answer. Play this bug on a fake app screen and see if you can spot it in three tries.

Spot this bug

The clue

Every item must belong to an order that exists.

Steps to reproduce

  1. Delete an order that has items
  2. Query order_items

Expected result

Items are deleted with their order, or the delete is blocked

Actual result

Item 3 is left pointing to a missing order 209

Why it matters

This is a major (P2) bug. The feature still works in part, but users get wrong information or a broken step, and many will notice. It should be fixed before or soon after release.

Testing tip

Orphan rows mean a missing foreign key. Test deletes and check that related rows are cleaned up.

How to find bugs like this

Database bugs show up when you look at the tables: duplicate rows, joins that double totals, deleted users still active, values cut short or saved in the wrong type. When you test, try these checks:

  • Run the query yourself and count the rows.
  • Look for duplicates that differ only in case or spaces.
  • Check deleted and archived records.
  • Compare stored values with what the user typed.

More Database testing bugs

See all 158 bugs