Judy, who is new to town, has decided to join the local chapter of a womans volunteer club that undertakes a number of charitable events and outreach programs. It has approximately 150 current members as well as 30 provisional members (a new member before she becomes a full member). The club would like to create a single table database that could be used to maintain a membership directory and print mailing labels. This table should include each members first name, last name, street address, city, state, zip code, phone, fax, e-mail address, the community in which she lives, whether she receives the news letter via regular mail or e-mail, and whether she is a provisional member.
The club wants to be able to query this table to
Create the single table and write the preceding queries.
The following single table database could be used to maintain information about the members of the club.
CREATE TABLE club_member ( member_number CHAR(5) NOT NULL, first_name VARCHAR(12), last_name VARCHAR(12), community_name VARCHAR(12), street_address VARCHAR(50), city VARCHAR(12), state CHAR(2), zip_code CHAR(5), phone_number VARCHAR(12), fax_number VARCHAR(12), email_address VARCHAR(25), newsletter_delivery_method VARCHAR(10), member_type VARCHAR(12), PRIMARY KEY (member_number));
SELECT first_name, last_name FROM club_member WHERE news_letter_delivery_method = 'Mail';
SELECT first_name, last_name, email_address FROM club_member WHERE email_address <> NULL ORDER BY last_name, first_name;
SELECT community_name, last_name, first_name FROM club_member WHERE community_name IN ('HG','AG','CLI','CC') ORDER BY community_name, last_name, first_name;
SELECT member_type, last_name, first_name FROM club_member ORDER BY member_type, last_name, first_name;
This page is part of the promotional and support
material for Data Management (open edition) by Richard T. Watson For questions and comments please contact the author |