Test Your Thinking
The projects in this section are meant to have you utilize all of the skills that you have acquired throughout this chapter. The answers to these projects can be found at the companion Web site to this book, located at http://www.phptr.com/rischert.
Visit the Web site periodically to share and discuss your answers.
In this chapter you learned about data, how data is organized in tables, and how the relationships among it is depicted in a schema diagram. Based on your newly acquired knowledge, design a schema diagram based on the fictional ACME Construction Company. Draw on your own work experience to design the following components.
Draw boxes for these three tables: employee, position, and department.
Create at least three columns for each of the tables and designate a primary key for each table.
Create relationships among the tables that make sense to you. At least one table should have a self-referencing relationship. Hint: Be sure to include the necessary foreign key columns.
Think about which columns should NOT allow NULL values.