Upload
alice-davidson
View
216
Download
0
Embed Size (px)
Citation preview
Project Description
I am an avid crafter and over the past several years I have created dozens of gift- or greeting-type cards using a variety of materials. Most of the cards are centered around a poem or quote. I use a variety of rubber stamps, inks and powders to decorate them. The goal of this project is to design a database to record the materials used in each card so I can create more cards.
Definitions
Entities: Card: An individual hand-made greeting-type card
identified by the poem on the inside. Stamp: A rubber stamp used with ink and powder to
create an image. There are two kinds of stamps: Wood-mounted Cling
Ink : The colored fluid used for stamping an image. There are two types of inks:• Pigment• Archival
More entities… Powder: The powder that is sprinkled on the stamped
image and melted. There are two types of powder:• Opaque• Transparent
Object: An individual instance of a stamped image on a card. Every card can have one or more objects. Every object uses one stamp, one ink and one powder.
Business Rules
• Each card has one or more objects; each object is on only one card.
• Each stamp can be used on one or more objects; each object uses only one stamp.
• Each powder can be used on one or more objects; each object uses only one powder.
• Each ink can be used on one or more objects; each object uses only one ink.
Query 1.select object_id, ink_brand, ink_color from cards.object, cards.ink where object.ink_id=ink.ink_id;
Query 2.select poet, poem, stamp_name, object_id from cards.card, cards.stamp, cards.object where object.card_id=card.card_id and object.stamp_id=stamp.stamp_id and stamp.product_line='Mindscapes';
Query 3.select poet, poem, stamp_name, object_id, powder_color from cards.card, cards.stamp, cards.object, cards.powder where object.card_id=card.card_id and object.stamp_id=stamp.stamp_id and object.powder_id=powder.powder_id and powder.product_line='PEARLustre';
Query 4select card.poem, card.poet, stamp.stamp_name, ink.ink_color from object, card, stamp, ink where object.card_id=card.card_id and object.stamp_id=stamp.stamp_id and object.ink_id=ink.ink_id and stamp.product_line='Mindscapes';
Query 8.select object_id, poet, poem, stamp_name, ink_color, powder_color from object, card, stamp, ink, powder where card.poet= (select card.poet from card where card.poet='Emily Dickinson' and object.card_id=card.card_id and object.stamp_id=stamp.stamp_id and object.ink_id=ink.ink_id and object.powder_id=powder.powder_id);