Grade 12 · lesson 3 of 4

Apply a Stated Deletion Schedule

Test a retention boundary using a fictional day counter.

Download the grade pack

Supplied materials

  • Paper and pencil; an adult may read aloud. No device, account or purchase is needed.

Learn the idea

A retention rule states how long a record is kept and when deletion happens. It must match a justified operational need rather than a vague forever policy. This exercise supplies an internal rule for practice: at a daily sweep, delete aggregate rows whose age is at least 7 whole days. Seven days is an exercise input, not a universal recommended period.

Let current_day = 10 and row_day be the fictional day the row was created. Define age = current_day − row_day. Valid row days are whole numbers from 1 through current_day; future rows are invalid. Then delete when age ≥ 7, otherwise keep. Test equality explicitly so the policy is implemented consistently.

  1. Write columns row_day, age, validity and action.
  2. Compute ages for row days 2, 3, 4 and 10.
  3. Apply delete when age ≥ 7 only after checking validity.
  4. Test future row day 11 as invalid, and test the exact deletion boundary day 3.
Worked example

See the method in action

At current day 10: row day 2 has age 8 → delete; day 3 age 7 → delete; day 4 age 6 → keep; day 10 age 0 → keep. Day 11 is invalid, not a negative-age row to retain.

Your turn

Check your reasoning

Your answer is temporary and is not saved to an account. Download your current answer before leaving or reloading. Written work on paper or in another app stays in your own file.

At current day 12, a row was created on day 5. Under this exercise rule, what happens?

Feedback appears here after you check. This is practice, not a graded school assessment.

See the answer and explanation

Delete because age = 7

12 − 5 = 7, and the inclusive rule deletes at age 7 or greater.

Take it further

Change the retention cutoff to at least 5 days at current day 10. Expected actions for row days 4,5,6: delete, delete, keep, with ages 6,5,4.

Nothing here is saved to an account or sent to a teacher. The answer download includes your current choice and any checked feedback.

Check the subject sources

These LifeStarter passages, scenarios and exercises are authored for this Academy with AI assistance and review. External resources keep their publishers’ terms. A grade label suggests a starting level; it does not establish alignment with your school’s complete requirements.