O'Reilly logo

Refactoring Workbook by William C. Wake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. A Database Example

Reggie is a system to handle course registration for a small school.

The developers are using a database to maintain information about students and classes. The first version of the database is simple (see Figure 13.1).

School Registration Database—First Version

Figure 13.1. School Registration Database—First Version

A Course is a class that could be offered. For now, we'll use simple names (“Econ101” for “Introduction to Economics”). Later, this will expand to include a full title, description, and other information about the course.

An Offering is a version of a class, taught on some schedule. DaysTimes is a comma-separated string of days and times (“M10,T11,F10”). ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required