Datasheet
Part I SQL Basic Concepts and Principles
See Appendix B and Appendix F for more detailed descriptions of the ACME sample
database and how to install it.
Health care provider database
A health care provider company has multiple offices in many different states. Many doctors
work for the company, and each doctor takes care of multiple patients. Some doctors just
work in one office, and others work in different offices on different days. The database keeps
information about each doctor, such as his or her name, address, contact phone numbers, area of
specialization, and so on. Each patient can be assigned to one or more doctors. Specific patient
information is also kept in the database (names, addresses, phone numbers, health record birth
dates, history of appointments, prescriptions, blood tests, diagnoses, and so on). Customers can
schedule and cancel appointments and order prescription drugs either over the phone or using
the company Web site. Some restrictions apply — for example, to see a specialist, the patient
needs an approval from his or her primary physician; to order a prescription, the patient should
have at least one valid refill left; and so on.
Now, what are the main database user groups? Patients should be able to access the database
using a Web browser to order prescriptions and make appointments. This is all that patients
may do in the database. Doctors and nurses can browse information about their patients, write
and renew prescriptions, schedule blood tests and X-rays, and so on. Administrative staff (such
as receptionists or pharmacy assistants) can schedule appointments for patients, fill prescriptions,
and run specific reports.
Again, in real life this database would be far more complicated and would have many more busi-
ness rules, but this should give you a general idea of what kind of information a database could
contain.
The health provider and order management system databases are both examples of a typical
hybrid database (although the former is probably closer to an OLTP).
Video sharing and editing database
Online video sharing services, such as YouTube, Eyespot, and Jumpcut, use databases to store,
retrieve, and edit video files. The users should be able to save their videos in different formats,
share them with others or make them private, and delete the video clips when they are no
longer needed.
The two main requirements for such a database are capacity (the media files can be quite big,
and the number of video-sharing service members is growing every month) and performance (it
is not enough just to store a huge number of large binary files; the users should be able to find
the file they need and to play it in their Web browser).
This database is also a hybrid database, but in this case, it’s closer to a data warehouse — the
ability to search and retrieve data is more important than a capability to update and insert new
records quickly.
10










