SlideShare a Scribd company logo
1 of 97
Download to read offline
​The Harry Potter Universe
Database
Charles Harrill, Greg Eskridge and Alex Janousek
December 8, 2016
Table of Contents
Project Name & Project Cover Sheet.............................................. Cover Sheet
Introduction.......................................................................................................... 3
Business Rules and User Requirements............................................................. 6
Enhanced Entity Relation Diagram.................................................................... 8
Entity, Attribute and Relationship Definitions................................................ 14
Relational Schema 3rd Normal Form……….................................................. 23
SQL Script File……………………….……….................................................. 36
Describe and Select Statements…..….……….................................................. 70
Database Queries…..….………......................................................................... 84
Peer Evaluation…………………..….………................................................... 98
2
Harry Potter Universe Database
Introduction
When reading Harry Potter books or watching the movies, it is very difficult to keep track
of all the characters, spells and other magical items that appear throughout the series. The fans
of these books and movies would appreciate having an app or website optimized for quick
reference, when questions arise about specific characters or event details. A well-constructed
database is created because of this need to gather the plethora of information that anyone would
possibly want to know about the Harry Potter universe. With a central repository of shared data,
information is easily managed by a controlling agent which stores all information in a
standardized, convenient form. Not only does the database prevent data redundancy and improve
data sharing but it also improves data accessibility and responsiveness to continuously improve
data quality and sharing. This helps prevent the compromising of data integrity however, there
are still many other challenges to take into consideration when making the Harry Potter Universe
database.
The potential users of this database are people who want to learn more about not only
what they read in the books, but also what they saw in the movies. This database will help these
users to be able to get answers to the questions that they seek to know more about after reading
or watching. Since there is a great amount of information in the series, the database will provide
a concise and logical way to solve any potential gaps in knowledge. For example, a user may
desire more information on what potions a wizard created or what group a given wizard is
associated with. They also might like to know more about which books a character appears in
and they type of school and house they are linked to. In this way, the user saves time trying to
flip through books and fast-forward through movies trying to get their answers.
There is no quick way to add all of the Harry Potter data and metadata at once. SQL
script files or queries will have to be created to add all of these entities such as characters,
humans, creatures, wizards and related attributes along with the relationships between each
entity. Other limitations to the database include taking the time to find all of the specific
information needed to insert all of the data into tables accurately. Another challenge that will be
faced is deciding on whether information from the books are more important than the movies and
vice versa. For example, the books are more descriptive and detailed and the scenes may vary
between the book and the appropriate movie. Also, many characters are left out in the movies
such as Peeves, Professor Binns and Ludo Bagman. A great amount of Quidditch matches are
absent as well along with many small but important scenes that are crucial to the storyline.
Another example of this is that the movies also do not cover apparition tests, wandless magic or
describe what a squib is, even though Filch and Mrs. Figg are present in them. Many scenes are
altered as well in the movies that make the storyline slightly different. A perfect example of this
would be in ​Harry Potter and the Deathly Hallows Part 1 when Harry escapes the Dursleys and
3
instead of first going through a series of safe houses via portkey, he magically ends up at the
Weasley’s house.
Some of these problems have been solved by creating multiple attributes such as
Book_Appeared_In (multiple value) and Movie_Appeared_In (multiple value) to better collect
the character data accurately even with differences between the films and books. In order solve
the problem of characters not appearing in the movies that were in the books, there is an attribute
called Level_Of_Impact which designates a character’s importance as minor or major. This
attribute keeps the data accurate by using the assumption that the correlation of a character being
left out of a movie is because of their level of importance which will be reported as minor.
The motivation behind the Harry Potter Universe database comes from the extensive
knowledge of the many books and movies with the goal of wanting to help people find the
information they need in the quickest means possible, without having data inconsistencies. Since
the scope of the Harry Potter universe is so extensive, a database would be the easiest solution
which allows data organization and manipulation whenever it is needed. With exactly 772 unique
characters in this series and over 100 spells, developing a database to organize data from this
universe is crucial for ultimately creating an app or website to integrate with the database.
With the use of a database, information is stored in electronic records that can be
searched, retrieved, organized and manipulated in countless ways. Not only is the data easy to
access, it is extremely accurate as well. With a GUI in place, all Harry Potter fans that are able to
operate a computer or digital device can easily update and view any information in the database
to help them better understand the series.
The additional benefits of the Harry Potter Universe database include saving precious
time by retrieving single or multiple records in the matter of minutes, whether you are writing or
using a GUI to submit the queries. These queries will systematically update and manipulate the
data accordingly and return the information quickly. It will be much quicker than searching
blindly on google or by other methods. With the structure and flexibility of databases, it is
extremely easy to link many different sources of information together to help better analyze and
see important patterns within the data and metadata they may not normally notice. With the
scalability of databases, it is easy to upgrade from thousands to millions of entries. The amount
of information in the Harry Potter Universe database can be infinite.
With superior databases, comes larger costs. In order to first set up a database, there are
specific setup costs required and then future ongoing expenses for maintaining it. Maintenance
costs increase with the size and growth of the database such as enhanced security and the training
of people to be able to use its functionality and understand the system. It would not be beneficial
for Harry Potter fans to have access to records that are inaccurate or are coming from a rogue
hacker who believes it would be entertaining to destroy the hard work put into creating the
database. Even though database management systems provide easy access, organization and
analysis of data, without a feasible budget, it may not be the best solution if a small team is not
continually maintaining it after it is created.
4
The goal of the Harry Potter Universe database is to begin the initial work needed to
eventually create a fully functional implementation of the database management system. Once
created, new Harry Potter fans and veterans alike can access, add information, and eventually put
in requests to edit or remove inaccurate data. Even with the challenges that come with the
development of a well-structured database (and especially one created for retaining Harry Potter
data), it is still more beneficial to create it for the fans. The creation of the this database would
be very much appreciated by those who want a greater understanding of the depth of Harry
Potter.
5
Harry Potter Universe Database
Business Rules
The Harry Potter Universe contains many Characters. The common attributes of a Character are:
Character_Name (identifier), Language (multiple value), Level_of_Impact (“major” or “minor”),
Book_Appeared_In (multiple value), and Movie_Appeared_In (multiple value).
A Character may be a Human or a Creature. The unique attribute of Human is Profession. The
unique attribute of Creature is Species. Some Characters may be classified as both, and there are
a few other Characters in the Harry Potter Universe, who have other classifications, such as
ghosts, but with no unique attributes. A Character may be the parent of one or more other
Characters, and each Character has two parents. However, not all Characters’ parents are
mentioned in the Harry Potter Universe.
A Human may be classified as a Wizard or a Muggle. There are many humans in the Harry
Potter Universe who may be classified as both. The unique attributes of Wizard are:
Wand_Type, Patronus, and Familiar_Type. The unique attribute of Muggle is Citizenship. A
Wizard may be responsible for protecting several Wizards or several Muggles. A Wizard may
also own multiple Creatures.
Each Wizard who attended a School was assigned to a House within that School. The attributes
of House are: House_Name (identifier), Symbol, and Characteristic (multiple value). Other
Characters may also appear as “House Ghosts.” Each House also has one Wizard in charge of
the House.
Each House is belongs to only one wizarding School, and each School may contain more than
one House, however not all Houses are mentioned for all Schools in the Harry Potter Universe.
The attributes of School are: School_Name (identifier), Number_of_Houses, and Region. Other
Characters, aside from Wizards, may also appear on the grounds of a School. Wizards may also
be faculty members of a School.
Wizards may be affiliated with a Group. The attributes of Group are: Group_Name (identifier),
Purpose, and Ethical_Orientation. Each Group has a designated Wizard_Leader. A Group must
include multiple Wizards and a Wizard may be a member of more than one Group.
A Character may be able to cast many different Spells. The attributes of Spell are: Spell_Name
(identifier), Type, Result, and Method_of_Casting. The last time a specific Character casted a
specific spell will need to be noted as Chapter_of_Last_Casting. A Character may be able to
6
cast many different Spells. A Spell may have also been invented by only one Character or may
have no inventor mentioned in the Harry Potter Universe. A Character may have invented
multiple Spells.
Each Wizard is also capable of making Potions by using Potion Ingredients, which are listed in a
Potion Recipe. The attributes of Potion are: Potion_Name (identifier) and effect (multiple
value). A Wizard may not know how to make any Potions or may know how to make a number
of Potions. A Wizard may also be the inventor of a Potion, but not every Potion has a known
inventor. A Potion can be made by at least one Wizard.
The attributes of Potion Recipe are: Potion_Recipe_ID (surrogate identifier), Potion_Name, and
Ingredient_Name (multiple value). The Attributes of Potion Ingredient are:
Potion_Ingredient_Name (identifier) and Location_Found. A Potion has only one recipe. One
Potion may contain many Potion Ingredients, but a Potion Ingredient may be used in more than
one Potion.
Characters may have studied several key Texts, which are highlighted in the Harry Potter
Universe. The attributes of Text are: Text_Title (identifier), Author, Subject_Matter, and Style
(as in fiction, nonfiction, poetry, prose, etc…). A Character may study many Texts or may not
study and Texts at all. A Text may also have been enchanted by a Wizard or may not be
enchanted at all.
Throughout the Universe, all Characters may love to eat some Notable Foods. The attributes of
Notable Food are: Food_Name (identifier), Food_Enchantment, Food_Type, and
Where_to_Obtain (multiple value). Many Characters may eat many Notable Foods in the Harry
Potter Universe. It is important to note the Chapter_Last_Eaten to view the last time a Character
ate a Notable Food.
A Character may also possess Enchanted Items. The attributes of Enchanted Item are:
Item_Name (identifier), Item_Enchantment, and Item_Type. Throughout the books of the Harry
Potter Universe, several Characters may have possessed several Enchanted Items. It is
important to note the final owner of an Enchanted Item by recording the
Chapter_Last_Owned_By_Character.
7
Harry Potter Universe Database
Enhanced Entity - Relationship Diagram
8
9
10
11
12
13
Harry Potter Universe Database
Entity, Attribute and Relationship Definitions
Entity and Attribute Definitions
Entity:​ Character
Definition:​ ​A Character is any person, ghost, creature, or other living or dead being, who
was specifically mentioned by name in any of the Harry Potter books or movies.
Attribute:​ Character_Name (identifier)
Definition:​ ​Every Character has a unique name.
Attribute:​ Language (multiple value)
Definition: ​This is how a character communicates. A character may be
able to communicate with one or more languages.
Attribute:​ Level_of_Impact
Definition: ​Some characters are major characters, and some are minor
characters. Level_of_Impact is a way to designate character importance.
Attribute:​ Book_Appeared_In (multiple value)
Definition: ​The Harry Potter Universe consists of multiple books. This
attribute captures in which books a Character appeared.
Attribute:​ Movie_Appeared_In (multiple value)
Definition: ​The Harry Potter Universe consists of multiple movies. This
attribute captures in which movies a Character appeared.
Attribute:​ Character_Type (Human?, Creature?)
Definition: ​This is the sub-type discriminator for Character. It is partially
complete, and there may be overlapping between Human and Creature.
Entity:​ Human
Definition:​ ​A Human is any Character that is a person.
Attribute:​ Profession
Definition: ​Each Human Character has a profession in the book, whether
a student, a teacher, a banker or other profession.
Attribute:​ Human_Type
Definition: ​This is the sub-type discriminator for Human. It has total
completeness, and the sub-types of the Human super-type are disjoint. So,
this is a simple attribute instead of a composite attribute.
14
Entity:​ Creature
Definition: ​A Creature includes an animal, such as an owl or cat, or a mystical beast,
such as a giant or phoenix. Creatures are almost any non-human Character, aside from
certain plants, ghosts or spirits.
Attribute:​ Species
Definition: ​As stated above, there are many types of Creatures. The
Species attribute specifies the type of Creature (ie. Cat, Dog, Griffon,
Centaur, Phoenix, Giant, etc.)
Entity:​ Wizard
Definition: ​A Wizard is a Human who is able to perform magic. This may also include a
human who was born to Wizard parents but has no magical abilities.
Attribute:​ Wand_Type
Definition: ​Every wizard needs to use a wand in order to perform most
magical Spells. Each Wizard has a unique wand type,
Attribute:​ Patronus
Definition: ​When a Wizard casts the Spell, “Expecto Patronum,” the
result is a protective force, in the shape of an animal, known as a Patronus.
Many Wizards have a unique Patronus that embodies their character.
Attribute:​ Familiar_Type
Definition: ​Wizards have a special, often magical, connection with their
familiars. Familiars are somewhat like pets, but with a stronger mental
connection to their Wizards. A familiar may be a cat, toad, owl, phoenix,
snake or other Creature.
Entity:​ Muggle
Definition: ​A Muggle is a non-Wizard Human, who is unable to perform magic and who
was not born to Wizard parents.
Attribute:​ Citizenship
Definition: ​All Muggles are a citizen of some country. While Wizards
tend to exist only in the Wizarding world after they come of age, Muggles
exist in the “real” world.
15
Entity:​ House
Definition: ​On the very first day that a Wizard attends a School of Wizardry, the Wizard
is “sorted” into one of the school’s houses. These houses are sort of dormitories, where
all of the students work as a team and study together, and where students do the majority
of their socializing.
Attribute:​ House_Name (identifier)
Definition:​ ​Each House has a unique name.
Attribute:​ Symbol
Definition: ​A Symbol is a house logo or insignia. This is typically a
representation of an animal, such as a lion, a raven, a badger or a snake.
Attribute:​ Characteristic (multiple value)
Definition: ​Wizards are sorted into a particular house based on their
primary character traits. One house may include Wizards who are
primarily brave and honest, while another may include Wizards who are
mostly intelligence and crafty.
Entity:​ School
Definition: ​Every Wizard attended a School of Wizardry, beginning at age 11 (before
September 1). The School entity focuses solely on Schools of Wizardry, within the Harry
Potter Universe, and does not include Muggle schools.
Attribute:​ School_Name (identifier)
Definition:​ ​Every School of Wizardry has a unique name.
Attribute:​ Number_of_Houses
Definition: ​Each unique School of Wizardry may contain a unique
number of Houses in which students are sorted.
Attribute:​ Region
Definition: Though they exist in the Wizarding World, these Schools are
located in various regions of the Earth, including Great Britain, the Soviet
Bloc, or Southwestern Europe, among others.
Entity:​ Group
Definition: ​Some wizards are affiliated with various sub-groups throughout the Harry
Potter Universe. The Group Entity is designed to capture these Wizard affiliations.
Attribute:​ Group_Name (identifier)
Definition:​ ​Every Group has a unique name.
Attribute:​ Purpose
Definition: ​This explains why a Group exists, whether, for instance, its
purpose is to destroy something, to protect something or to govern.
Attribute:​ Ethical_Orientation
Definition: ​Some groups have an evil agenda, some have a benevolent
agenda, and some may be neutral.
16
Entity:​ Spell
Definition: ​A Character may be able to cast magical spells, aimed to achieve a desired
result through magical means. The Spell entity captures this magical ability that can be
performed by most Wizards and some Creatures.
Attribute:​ Spell_Name (identifier)
Definition:​ ​Every Spell has a unique name.
Attribute:​ Type
Definition: ​Some spells are designed to attack, some may be used to
defend or heal, and others may be used for a more utility function, such as
cooking or casting a light.
Attribute:​ Result
Definition: ​This attribute is designed to detail the end result of casting a
certain spell.
Attribute:​ Method_of_Casting
Definition: ​Each Spell has a unique way of being cast. An example may
be “with a wand - a swish and a flick.”
Entity:​ Potion
Definition: ​Another way that Wizards perform magic is to make special Potions, by
mixing various ingredients together in a specific way. This creates essentially a Wizard
form of medicine.
Attribute:​ Potion_Name (identifier)
Definition:​ ​Every Potion has a unique name.
Attribute:​ Effect (multiple value)
Definition: ​Potions may be aimed at created various results. One Potion
may be designed to heal broken bones, while another Potion’s Effect is to
“induce relaxation and unfiltered honesty.”
Entity:​ Potion Ingredient
Definition:​ ​A Potion Ingredient is used during the formulation of a magical Potion.
Attribute:​ Potion_Ingredient_Name (identifier)
Definition:​ ​Every Potion Ingredient has a unique name.
Attribute:​ Location_Found (multiple value)
Definition: ​Potion Ingredients may each be found in one place or in a
number of different places. These locations may include geographical
areas or may include the office of a Character.
17
Entity:​ Potion Recipe
Definition: ​Some Potions may share Potion Ingredients, however every Potion has one
and only one Potion Recipe, combining a specific list of ingredients.
Attribute:​ Potion Recipe ID (identifier)
Definition: ​This is a surrogate identifier, designed to make a Potion
Recipe search easier to complete, instead of creating a composite primary
key between Potion_Name and Ingredient_Name, since Ingredient_Name
is a multiple value attribute.
Attribute:​ Potion_Name
Definition:​ ​This is the identifier of Potion.
Attribute:​ Potion_Ingredient_Name (multiple value)
Definition: ​This is the identifier of Potion Ingredient, and is a multiple
value attribute, comprised of all ingredients used to make the Potion.
Entity:​ Text
Definition: ​Throughout the Harry Potter books and movies, a Character may have
interacted with a number of different in-universe texts, whether school textbooks,
journals, news sources or other types.
Attribute:​ Text_Title (identifier)
Definition:​ ​Every Text has a unique title.
Attribute:​ Author
Definition: ​Each Text has an Author, who created the text. Some texts
share the same Author.
Attribute:​ Subject_Matter
Definition: ​A Text may be a news piece, a history book, a science
textbook, a work of fiction, or have another reason for existing, which is
its Subject_Matter.
Attribute:​ Style
Definition: ​To further describe the text, this attribute details whether the
text is poetry, prose, instructional, a play, or another style.
18
Entity:​ Notable Food
Definition: ​Some Notable Foods in the Harry Potter Universe received special mention
on one or multiple occasions throughout the books or movies.
Attribute:​ Food_Name (identifier)
Definition:​ ​Every Notable Food has a unique name.
Attribute:​ Food_Enchantment
Definition: ​Each of the Notable Foods mentioned, may have a unique
enchantment, such as a Chocolate Frog being magically enchanted to
behave like a real fog.
Attribute:​ Food_Type
Definition: ​This allows more detail about the food, including whether the
food is sweet or savory, or whether it’s a solid or liquid.
Attribute:​ Where_to_Obtain (multiple value)
Definition: ​Characters came across these Notable Foods in various
locations or settings. This multiple value attribute allows for explanation
of these locations.
Entity:​ Enchanted Item
Definition: ​Aside from wands, Potions and Foods, a Character may have interacted with
various other magical Enchanted Items. If an item that could qualify as the Text entity
was magically enchanted, it will be stored as an Enchanted Item.
Attribute:​ Item_Name (identifier)
Definition:​ ​Every Enchanted Item has a unique name.
Attribute:​ Item_Enchantment
Definition: ​This attribute details the magical effect that has been placed
on the Enchanted Item, such as invisibility or immortality.
Attribute:​ Item_Type
Definition: ​The Item_Type attribute is designed to describe what type of
item has been enchanted, such as a cloak, stone or journal.
19
Relationship and Attribute-on-Relationship Definitions
Relationship:​ Character “is parent of” Character (M:M)
Definition: A character may have optional or more parents mentioned in the Harry Potter
Books. A Character also may be the parent of optional or many Characters.
Relationship:​ Spell “invented by” Character (1:M)
Definition: A spell may have optional or one Character cited as its inventor. A Character
may have invented optional or many Spells.
Relationship:​ Character “reads” Text (1:M)
Definition: A Character may have read optional or many Texts. A Text that is
mentioned in the Harry Potter Books is read by one and only one Character.
Relationship:​ Character “visits” School (1:M)
Definition: A Character may have visited optional or one School during the course of the
Harry Potter Books and Movies. A School has been visited by many Characters.
Relationship:​ Character “casts” Spell (M:M)
Definition: A Character may “cast” or perform optional or many Spells. A Spell may
have been casted by optional or many Characters.
Attribute-on-Relationship:​ Chapter_Last_Cast
Definition: This is the last time that a certain Character casted a certain Spell in the
Harry Potter books.
Relationship:​ Character “possesses” Enchanted Item (M:M)
Definition: A Character may have possessed optional or many Enchanted Items at some
point in the Harry Potter Universe. An Enchanted Item may have been possessed by
optional or many Characters.
Attribute-on-Relationship:​ Chapter_Last_Possessed_By
Definition: This is the last time that a certain Character possessed a certain item in the
Harry Potter books.
Relationship:​ Character “loves to eat” Notable Food (M:M)
Definition: A Character may have been mentioned as eating optional or many Notable
Foods. A Notable Food was eaten by one or many Characters.
Attribute-on-Relationship:​ Chapter_Last_Eaten_By
Definition: This is the last time that a certain Character was noted as eating a certain
Notable Food in the Harry Potter books.
Relationship:​ Wizard “enchants” Text (1:M)
Definition: A Wizard may have used magic to enchant optional or many Texts. A Text
may have been enchanted by optional or one Wizard.
Relationship:​ Wizard “protects” Muggle (M:M)
Definition: A Wizard may have protected optional or many Muggles during the course of
the Harry Potter Universe. A Muggle may have been protected by optional or many
Wizards.
20
Relationship:​ Wizard “owns” Creature (1:M)
Definition: A Wizard may have been mentioned as owning optional or many Creatures
in the Harry Potter Universe. A Creature may have been owned by optional or one
Wizard. “Owns” may include owning a pet, having a familiar, or being the master of a
Creature, such as an Elf.
Relationship:​ Wizard “makes” Potion (M:M)
Definition: A Wizard may have made optional or many potions in the Harry Potter
Universe. Every Potion that was mentioned in the books was made by one or more
Wizards.
Relationship:​ Wizard “assigned to” House (1:M)
Definition: A House contains one to many Wizards, but a Wizard belongs to one and
only one House.
Relationship:​ Wizard “invents” Potion. (1:M)
Definition: A Wizard may have invented optional or many Potions, but each Potion was
invented by one and only one Wizard.
Relationship:​ Wizard “protects” Wizard (M:M)
Definition: A Wizard may have been protected by optional or many Wizards, and a
Wizard may have protected optional or many Wizards.
Relationship:​ Wizard “affiliates with” Group (M:M)
Definition: A Wizard may have been a member of, or affiliated with, optional or many
Groups. A Group has many Wizards affiliated with it.
Relationship:​ Group “lead by” Wizard (1:M)
Definition: Each Group has one and only one Wizard leader. A Wizard may have lead
optional or many Groups.
Relationship:​ Wizard “is faculty” School (1:M)
Definition: Every Wizarding School has a faculty of many Wizards. But a Wizard is
faculty of optional or only one School.
Relationship:​ Wizard “in Charge of” House (1:1)
Definition: A House has one and only one Wizard in Charge of it. A Wizard may be in
charge of optional or one House.
Relationship:​ House “belongs to” School (1:M)
Definition: A House belongs to one and only one school. A School contains one or
many Houses.
Relationship:​ Character “belongs to” House (1:M)
Definition: There are a few non-Wizard Characters, such as ghosts or half-giants, who
also belonged to a House. In that case, a Character may belong to optional or one
Houses, and a House contains one or more Characters.
21
Relationship:​ Potion “has” Recipe (1:M)
Definition: There are more than one Potion in the Harry Potter Universe that have a
Potion Recipe mentioned. However, every Potion has one and only one Potion Recipe.
Relationship:​ Potion Recipe “contains” Potion Ingredient (M:M)
Definition: Each Potion Recipe contains at least one Potion Ingredient. Some Potion
Ingredients may be used in more than one Potion.
22
Harry Potter Universe Database
Relational Schema in 3rd Normal Form
23
24
25
26
27
28
29
30
31
32
33
34
35
Harry Potter Universe Database
SQL Script File
DROP TABLE HP_SCHOOL CASCADE CONSTRAINTS;
DROP TABLE HP_HOUSE CASCADE CONSTRAINTS;
DROP TABLE HP_HOUSE_CHARACTERISTIC CASCADE CONSTRAINTS;
DROP TABLE HP_CHARACTER CASCADE CONSTRAINTS;
DROP TABLE HP_LANGUAGE CASCADE CONSTRAINTS;
DROP TABLE HP_BOOK_APPEARED_IN CASCADE CONSTRAINTS;
DROP TABLE HP_MOVIE_APPEARED_IN CASCADE CONSTRAINTS;
DROP TABLE HP_CHARACTER_PARENT CASCADE CONSTRAINTS;
DROP TABLE HP_HUMAN CASCADE CONSTRAINTS;
DROP TABLE HP_MUGGLE CASCADE CONSTRAINTS;
DROP TABLE HP_WIZARD CASCADE CONSTRAINTS;
DROP TABLE HP_WIZARD_PROTECTS_MUGGLE CASCADE CONSTRAINTS;
DROP TABLE HP_WIZARD_PROTECTS_WIZARD CASCADE CONSTRAINTS;
DROP TABLE HP_CREATURE CASCADE CONSTRAINTS;
DROP TABLE HP_WIZARD_OWNS_CREATURE CASCADE CONSTRAINTS;
DROP TABLE HP_TEXT CASCADE CONSTRAINTS;
DROP TABLE HP_ENCHANTED_ITEM CASCADE CONSTRAINTS;
DROP TABLE HP_CHARACTER_ENCHANTED_ITEM CASCADE CONSTRAINTS;
DROP TABLE HP_SPELL CASCADE CONSTRAINTS;
DROP TABLE HP_CHARACTER_SPELL CASCADE CONSTRAINTS;
DROP TABLE HP_NOTABLE_FOOD CASCADE CONSTRAINTS;
DROP TABLE HP_WHERE_TO_OBTAIN_FOOD CASCADE CONSTRAINTS;
DROP TABLE HP_CHARACTER_FOOD CASCADE CONSTRAINTS;
DROP TABLE HP_POTION CASCADE CONSTRAINTS;
DROP TABLE HP_POTION_INGREDIENT CASCADE CONSTRAINTS;
DROP TABLE HP_POTION_RECIPE CASCADE CONSTRAINTS;
DROP TABLE HP_WIZARD_MAKES_POTION CASCADE CONSTRAINTS;
DROP TABLE HP_POTION_EFFECT CASCADE CONSTRAINTS;
DROP TABLE HP_GROUP CASCADE CONSTRAINTS;
DROP TABLE HP_GROUP_WIZARD_AFFILIATION CASCADE CONSTRAINTS;
CREATE TABLE HP_SCHOOL
(School_Name VARCHAR(50) NOT NULL,
School_Number_of_Houses INTEGER,
School_Region VARCHAR(50),
Constraint HP_SCHOOL_PK
Primary Key (School_Name)
);
INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region)
VALUES ('Hogwarts', 4, 'United Kingdom');
INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region)
VALUES ('Durmstrang', 1, 'Eastern Europe');
INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region)
36
VALUES ('Beauxbatons', 1, 'France');
CREATE TABLE HP_HOUSE
(House_Name VARCHAR(50) NOT NULL,
House_Symbol VARCHAR(50),
Wizard_Name_In_Charge VARCHAR(50),
School_Name_Belongs_To VARCHAR(50),
Constraint HP_HOUSE_PK
Primary Key (House_Name),
Constraint HP_HOUSE_FK1 Foreign Key (School_Name_Belongs_To)
References HP_SCHOOL (School_Name)
);
INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To)
VALUES ('Gryffindor', 'Lion', 'Minerva McGonagall', 'Hogwarts');
INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To)
VALUES ('Slytherin', 'Snake', 'Severus Snape', 'Hogwarts');
INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To)
VALUES ('Hufflepuff', 'Badger', 'Pomona Sprout', 'Hogwarts');
INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To)
VALUES ('Ravenclaw', 'Raven', 'Filius Flitwick', 'Hogwarts');
CREATE TABLE HP_HOUSE_CHARACTERISTIC
(House_Name VARCHAR(50) NOT NULL,
House_Characteristic VARCHAR(50) NOT NULL,
Constraint HP_HOUSE_CHARACTERISTIC_PK
Primary Key (House_Name,House_Characteristic),
Constraint HP_HOUSE_CHARACTERISTIC_FK1 Foreign Key (House_Name)
References HP_HOUSE (House_Name)
);
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Gryffindor', 'Bravery');
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Gryffindor', 'Honor');
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Ravenclaw', 'Intellect');
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Hufflepuff', 'Kindness');
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Slytherin', 'Natural Talent');
INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic)
VALUES ('Slytherin', 'Aggression');
CREATE TABLE HP_CHARACTER
(Character_Name VARCHAR(50) NOT NULL,
Character_Level_Of_Impact VARCHAR(50)
Check(Character_Level_Of_Impact IN('All Books', 'Most Books', 'Less Than Half of Books',
'One Book', 'One Chapter', 'Referenced')),
Character_Human CHAR(1)
37
Check (Character_Human IN('Y', 'N')),
Character_Creature CHAR(1)
Check (Character_Creature IN('Y', 'N')),
School_Name_Visited VARCHAR(50),
Constraint HP_CHARACTER_PK
Primary Key (Character_Name),
Constraint HP_CHARACTER_FK1 Foreign Key (School_Name_Visited)
References HP_SCHOOL (School_Name)
);
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Harry Potter', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Hermione Granger', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Ron Weasly', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Rubeus Hagrid', 'All Books', 'Y', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Gilderoy Lockheart', 'Less Than Half of Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Cedric Diggery', 'One Book', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Firenze', 'Less Than Half of Books', 'N', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Cho Chang', 'Less Than Half of Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Albus Severus Potter', 'One Chapter', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Dudley Dursley', 'Most Books', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Ginny Weasly', 'Most Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Nicolas Flamel', 'Referenced', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Petunia Dursley', 'Most Books', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Buckbeak', 'Less Than Half of Books', 'N', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
38
VALUES('Minerva McGonagall', 'All Books', 'Y', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Severus Snape', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Filius Flitwick', 'All Books', 'Y', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Pomona Sprout', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Headwig', 'All Books', 'N', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Dobby', 'Most Books', 'N', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Kreature', 'Less Than Half of Books', 'N', 'Y');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Draco Malfoy', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Lucius Malfoy', 'Most Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Mrs. Granger', 'Less Than Half of Books', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Mr. Granger', 'Less Than Half of Books', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Albus Dumbledore', 'Most Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Remus Lupin', 'Most Books', 'Y', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Sirius Black', 'Most Books', 'Y', 'Y', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature,
School_Name_Visited)
VALUES('Voldemort', 'All Books', 'Y', 'N', 'Hogwarts');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Damocles Belb', 'Referenced', 'Y', 'N');
INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature)
VALUES('Zygmunt Budge', 'Referenced', 'Y', 'N');
CREATE TABLE HP_LANGUAGE
(Language_Name VARCHAR(50) NOT NULL,
Character_Name VARCHAR(50) NOT NULL,
Constraint HP_LANGUAGE_PK
Primary Key (Language_Name, Character_Name),
39
Constraint HP_LANGUAGE_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Harry Potter');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Parseltongue', 'Harry Potter');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Hermione Granger');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Ron Weasly');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Rubeus Hagrid');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Giantish', 'Rubeus Hagrid');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Gilderoy Lockheart');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Cedric Diggery');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Firenze');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Centaurish', 'Firenze');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Cho Chang');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Albus Severus Potter');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Dudley Dursley');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Ginny Weasly');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Petunia Dursley');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('French', 'Nicolas Flamel');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Hippogriffish', 'Buckbeak');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Minerva McGonagall');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Severus Snape');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Filius Flitwick');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Goblin', 'Filius Flitwick');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Pomona Sprout');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Owl', 'Headwig');
40
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Elfish', 'Dobby');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Dobby');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Elfish', 'Kreature');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Kreature');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Lucius Malfoy');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Draco Malfoy');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Mrs. Granger');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Mr. Granger');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Albus Dumbledore');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Remus Lupin');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Sirius Black');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Voldemort');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('Parseltongue', 'Voldemort');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Damocles Belb');
INSERT INTO HP_LANGUAGE (Language_Name, Character_Name)
VALUES ('English', 'Zygmunt Budge');
CREATE TABLE HP_BOOK_APPEARED_IN
(Book_Number INTEGER NOT NULL,
Character_Name VARCHAR(50) NOT NULL,
Constraint HP_BOOK_APPEARED_IN_PK
Primary Key (Book_Number, Character_Name),
Constraint HP_BOOK_APPEARED_IN_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
41
VALUES (5, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Harry Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Hermione Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Ron Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Rubeus Hagrid');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Gilderoy Lockheart');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
42
VALUES (7, 'Gilderoy Lockheart');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Cedric Diggery');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Cedric Diggery');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Cho Chang');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Cho Chang');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Firenze');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Firenze');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Firenze');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Albus Severus Potter');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Dudley Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Ginny Weasly');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Nicolas Flamel');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
43
VALUES (3, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Petunia Dursley');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Buckbeak');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Buckbeak');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Minerva McGonagall');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Severus Snape');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
44
VALUES (5, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Filius Flitwick');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Pomona Sprout');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Headwig');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Dobby');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Dobby');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Dobby');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Dobby');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Kreature');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Kreature');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
45
VALUES (3, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Draco Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Lucius Malfoy');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Mrs. Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Mr. Granger');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Albus Dumbledore');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Albus Dumbledore');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Albus Dumbledore');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Albus Dumbledore');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Albus Dumbledore');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Remus Lupin');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Remus Lupin');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Remus Lupin');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Remus Lupin');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Remus Lupin');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Sirius Black');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Sirius Black');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
46
VALUES (5, 'Sirius Black');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Sirius Black');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (1, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (2, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (3, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (4, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (5, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (7, 'Voldemort');
INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name)
VALUES (6, 'Damocles Belb');
CREATE TABLE HP_MOVIE_APPEARED_IN
(Movie_Number INTEGER NOT NULL,
Character_Name VARCHAR(50) NOT NULL,
Constraint HP_MOVIE_APPEARED_IN_PK
Primary Key (Movie_Number, Character_Name),
Constraint HP_MOVIE_APPEARED_IN_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Harry Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
47
VALUES (3, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Hermione Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Ron Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Rubeus Hagrid');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Gilderoy Lockheart');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Gilderoy Lockheart');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Cedric Diggery');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
48
VALUES (8, 'Cedric Diggery');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Cho Chang');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Firenze');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Firenze');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Firenze');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Dudley Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Ginny Weasly');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Albus Severus Potter');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Petunia Dursley');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
49
VALUES (3, 'Buckbeak');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Minerva McGonagall');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Severus Snape');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Filius Flitwick');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
50
VALUES (1, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Pomona Sprout');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Headwig');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Dobby');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Dobby');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Kreature');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Kreature');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
51
VALUES (7, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Draco Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Lucius Malfoy');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Mrs. Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Mr. Granger');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (1, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Albus Dumbledore');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Remus Lupin');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Remus Lupin');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Remus Lupin');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Remus Lupin');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Remus Lupin');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Sirius Black');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Sirius Black');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Sirius Black');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
52
VALUES (1, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (2, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (3, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (4, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (5, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (7, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (8, 'Voldemort');
INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name)
VALUES (6, 'Damocles Belb');
CREATE TABLE HP_CHARACTER_PARENT
(Child_Name VARCHAR(50) NOT NULL,
Parent_Name VARCHAR(50) NOT NULL,
Constraint HP_CHARACTER_PARENT_PK
Primary Key (Child_Name, Parent_Name),
Constraint HP_CHARACTER_PARENT_FK1 Foreign Key (Child_Name)
References HP_CHARACTER (Character_Name),
Constraint HP_CHARACTER_PARENT_FK2 Foreign Key (Parent_Name)
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Albus Severus Potter', 'Harry Potter');
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Albus Severus Potter', 'Ginny Weasly');
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Dudley Dursley', 'Petunia Dursley');
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Draco Malfoy', 'Lucius Malfoy');
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Hermione Granger', 'Mrs. Granger');
INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name)
VALUES ('Hermione Granger', 'Mr. Granger');
CREATE TABLE HP_HUMAN
(Human_Name VARCHAR(50) NOT NULL,
Human_Profession VARCHAR(50),
Human_Type CHAR(1)
Check (Human_Type IN('M', 'W')),
Constraint HP_HUMAN_PK
Primary Key (Human_Name),
Constraint HP_HUMAN_FK1 Foreign Key (Human_Name)
53
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Harry Potter', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Hermione Granger', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Ron Weasly', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Rubeus Hagrid', 'Groundskeeper', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Gilderoy Lockheart', 'Teacher', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Cedric Diggery', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Cho Chang', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Albus Severus Potter', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Dudley Dursley', 'Student', 'M');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Ginny Weasly', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Nicolas Flamel', 'Writer', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Petunia Dursley', 'Homemaker', 'M');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Minerva McGonagall', 'Professor', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Severus Snape', 'Professor', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Filius Flitwick', 'Professor', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Pomona Sprout', 'Professor', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Draco Malfoy', 'Student', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Lucius Malfoy', 'Independently Wealthy', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Mrs. Granger', 'Dentist', 'M');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Mr. Granger', 'Dentist', 'M');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Albus Dumbledore', 'Headmaster', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Remus Lupin', 'Professor', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Sirius Black', 'Harrys Godfather', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
54
VALUES ('Voldemort', 'Dark Wizard', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Damocles Belb', 'Potioneer', 'W');
INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type)
VALUES ('Zygmunt Budge', 'Potioneer', 'W');
CREATE TABLE HP_MUGGLE
(Muggle_Name VARCHAR(50) NOT NULL,
Muggle_Citizenship VARCHAR(50),
Constraint HP_MUGGLE_PK
Primary Key (Muggle_Name),
Constraint HP_MUGGLE_FK1 Foreign Key (Muggle_Name)
References HP_HUMAN (Human_Name)
);
INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship)
VALUES ('Dudley Dursley', 'British');
INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship)
VALUES ('Petunia Dursley', 'British');
INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship)
VALUES ('Mrs. Granger', 'British');
INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship)
VALUES ('Mr. Granger', 'British');
CREATE TABLE HP_WIZARD
(Wizard_Name VARCHAR(50) NOT NULL,
Wizard_Wand_Type VARCHAR(50),
Wizard_Patronus VARCHAR(50),
Wizard_Familiar_Type VARCHAR(50),
Check (Wizard_Familiar_Type IN('Cat', 'Toad', 'Owl', 'Snake', 'Phoenix', 'Hound')),
House_Name_Belongs_To VARCHAR(50),
School_Name_Attended VARCHAR(50),
Constraint HP_WIZARD_PK
Primary Key (Wizard_Name),
Constraint HP_WIZARD_FK1 Foreign Key (Wizard_Name)
References HP_HUMAN (Human_Name),
Constraint HP_WIZARD_FK2 Foreign Key (House_Name_Belongs_To)
References HP_HOUSE (House_Name),
Constraint HP_WIZARD_FK3 Foreign Key (School_Name_Attended)
References HP_SCHOOL (School_Name)
);
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Harry Potter', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Hermione Granger', 'Vine and Dragon Heartstring', 'Otter', 'Cat', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
55
VALUES ('Ron Weasly', 'Willow and Unicorn Hair', 'Terrier', 'Toad', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended)
VALUES ('Rubeus Hagrid', 'Hound', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Gilderoy Lockheart', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Cedric Diggery', 'Ash and Unicorn Hair', 'Stag', 'Owl', 'Hufflepuff', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Cho Chang', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Ravenclaw', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Albus Severus Potter', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Ginny Weasly', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended)
VALUES ('Nicolas Flamel', 'Beauxbatons');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To,
School_Name_Attended)
VALUES ('Minerva McGonagall', 'Cat', 'Cat', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended)
VALUES ('Severus Snape', 'Doe', 'Slytherin', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended)
VALUES ('Filius Flitwick', 'Non-Corporeal', 'Ravenclaw', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended)
VALUES ('Pomona Sprout', 'Unicorporeal', 'Hufflepuff', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Familiar_Type, House_Name_Belongs_To,
School_Name_Attended)
VALUES ('Draco Malfoy', 'Elm and Dragon Heartstring', 'Owl', 'Slytherin', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Lucius Malfoy', 'Elm and Dragon Heartstring', 'Peacock', 'Hound', 'Slytherin', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Albus Dumbledore', 'Elder Wand', 'Phoenix', 'Phoenix', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, House_Name_Belongs_To,
School_Name_Attended)
VALUES ('Remus Lupin', 'Cypress and Unicorn Hair', 'Wolf', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type,
House_Name_Belongs_To, School_Name_Attended)
VALUES ('Sirius Black', 'Wood and Core', 'Dog', 'Hound', 'Gryffindor', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Familiar_Type, House_Name_Belongs_To,
School_Name_Attended)
VALUES ('Voldemort', 'Yew and Phoenix Feather', 'Snake', 'Slytherin', 'Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended)
VALUES ('Damocles Belb','Hogwarts');
INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended)
56
VALUES ('Zygmunt Budge','Hogwarts');
ALTER TABLE HP_HOUSE
Add Constraint HP_HOUSE_FK2 Foreign Key (Wizard_Name_In_Charge)
References HP_WIZARD (Wizard_Name);
CREATE TABLE HP_WIZARD_PROTECTS_MUGGLE
(Wizard_Name VARCHAR(50) NOT NULL,
Muggle_Name VARCHAR(50) NOT NULL,
Chapter_Last_Protected_By VARCHAR(20),
Constraint HP_WIZARD_PROTECTS_MUGGLE_PK
Primary Key (Wizard_Name, Muggle_Name),
Constraint HP_WIZARD_PROTECTS_MUGGLE_FK1 Foreign Key (Wizard_Name)
References HP_WIZARD (Wizard_Name),
Constraint HP_WIZARD_PROTECTS_MUGGLE_FK2 Foreign Key (Muggle_Name)
References HP_MUGGLE (Muggle_Name)
);
INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Dudley Dursley', 'Book 5 Chapter 1');
INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By)
VALUES ('Hermione Granger', 'Mrs. Granger', 'Book 7 Chapter 1');
INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By)
VALUES ('Hermione Granger', 'Mr. Granger', 'Book 7 Chapter 1');
CREATE TABLE HP_WIZARD_PROTECTS_WIZARD
(Wizard_Name VARCHAR(50) NOT NULL,
Protector_Name VARCHAR(50) NOT NULL,
Chapter_Last_Protected_By VARCHAR(50),
Constraint HP_WIZARD_PROTECTS_WIZARD_PK
Primary Key (Wizard_Name, Protector_Name),
Constraint HP_WIZARD_PROTECTS_WIZARD_FK1 Foreign Key (Wizard_Name)
References HP_WIZARD (Wizard_Name),
Constraint HP_WIZARD_PROTECTS_WIZARD_FK2 Foreign Key (Protector_Name)
References HP_WIZARD (Wizard_Name)
);
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Ginny Weasly', 'Book 2 Chapter 17');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Cedric Diggery', 'Book 4 Chapter 31');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Draco Malfoy', 'Book 7 Chapter 31');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Hermione Granger', 'Book 5 Chapter 34');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Harry Potter', 'Ron Weasly', 'Book 5 Chapter 34');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Hermione Granger', 'Harry Potter', 'Book 5 Chapter 34');
57
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Albus Dumbledore', 'Harry Potter', 'Book 5 Chapter 36');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Remus Lupin', 'Harry Potter', 'Book 5 Chapter 35');
INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By)
VALUES ('Sirius Black', 'Harry Potter', 'Book 5 Chapter 35');
CREATE TABLE HP_CREATURE
(Creature_Name VARCHAR(50) NOT NULL,
Creature_Species VARCHAR(50),
Constraint HP_CREATURE_PK
Primary Key (Creature_Name),
Constraint HP_CREATURE_FK1 Foreign Key (Creature_Name)
References HP_CHARACTER (Character_Name)
);
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Firenze', 'Centaur');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Buckbeak', 'Hippogriff');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Rubeus Hagrid', 'Giant');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Filius Flitwick', 'Goblin');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Dobby', 'Elf');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Kreature', 'Elf');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Headwig', 'Owl');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Minerva McGonagall', 'Cat');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Sirius Black', 'Dog');
INSERT INTO HP_CREATURE (Creature_Name, Creature_Species)
VALUES ('Remus Lupin', 'Werewolf');
CREATE TABLE HP_WIZARD_OWNS_CREATURE
(Wizard_Name VARCHAR(50) NOT NULL,
Creature_Name VARCHAR(50) NOT NULL,
Chapter_Last_Owned VARCHAR(20),
Constraint HP_WIZARD_OWNS_CREATURE_PK
Primary Key (Wizard_Name, Creature_Name),
Constraint HP_WIZARD_OWNS_CREATURE_FK1 Foreign Key (Wizard_Name)
References HP_WIZARD (Wizard_Name),
Constraint HP_WIZARD_OWNS_CREATURE_FK2 Foreign Key (Creature_Name)
References HP_CREATURE (Creature_Name)
);
58
INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned)
VALUES ('Rubeus Hagrid', 'Buckbeak', 'Book 3 Chapter 21');
INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned)
VALUES ('Lucius Malfoy', 'Dobby', 'Book 2 Chapter 18');
INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned)
VALUES ('Harry Potter', 'Headwig', 'Book 7 Chapter 4');
INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned)
VALUES ('Harry Potter', 'Kreature', 'Book 7 Chapter 11');
CREATE TABLE HP_TEXT
(Text_Title VARCHAR(50) NOT NULL,
Text_Author VARCHAR(50),
Text_Subject_Matter VARCHAR(50),
Text_Style VARCHAR(50)
Check(Text_Style IN('Poetry', 'Prose', 'Textbook', 'Journal')),
Character_Name_Read VARCHAR(50),
Wizard_Name_Enchanted VARCHAR(50),
Constraint HP_TEXT_PK
Primary Key (Text_Title),
Constraint HP_TEXT_FK1 Foreign Key (Character_Name_Read)
References HP_CHARACTER (Character_Name),
Constraint HP_TEXT_FK2 Foreign Key (Wizard_Name_Enchanted)
References HP_WIZARD (Wizard_Name)
);
INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read)
VALUES ('Advanced Potion-Making','Libatius Borage','Potions','Textbook','Harry Potter');
INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read)
VALUES ('Magical Me','Gilderoy Lockhart','Autobiography','Journal','Harry Potter');
INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read)
VALUES ('Snape: Scoundrel or Saint?','Rita Skeeter','Biography','Textbook','Harry Potter');
INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read,
Wizard_Name_Enchanted)
VALUES ('The Journal of Tom Riddle', 'Tom Riddle', 'Magical Secrets', 'Journal', 'Ginny Weasly', 'Voldemort');
INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read,
Wizard_Name_Enchanted)
VALUES ('The Half-Blood Prince', 'Severus Snape', 'Hints in Potions and Spells', 'Prose', 'Harry Potter', 'Severus Snape');
CREATE TABLE HP_ENCHANTED_ITEM
(Item_Name VARCHAR(50) NOT NULL,
Item_Enchantment VARCHAR(50),
Item_Type VARCHAR(50),
Constraint HP_ENCHANTED_ITEM_PK
Primary Key (Item_Name)
);
INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type)
VALUES ('Enchanted Galleon','Communication Charm','Galleon');
INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type)
VALUES ('Howler','Charm to amplify senders voice','Blood-red Letter');
59
INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type)
VALUES ('Deluminator','Absorb Energy','Cigarette Lighter');
INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type)
VALUES ('Opal Necklace','Lethal','Necklace');
INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type)
VALUES ('Elder Wand','Most Powerful Wand','Wand');
CREATE TABLE HP_CHARACTER_ENCHANTED_ITEM
(Character_Name VARCHAR(50) NOT NULL,
Item_Name VARCHAR(50) NOT NULL,
Chapter_Last_Owned VARCHAR(20),
Constraint HP_CHARACTER_ENC_ITEM_PK
Primary Key (Character_Name, Item_Name),
Constraint HP_CHARACTER_ENC_ITEM_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name),
Constraint HP_CHARACTER_ENC_ITEM_FK2 Foreign Key (Item_Name)
References HP_ENCHANTED_ITEM (Item_Name)
);
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Harry Potter','Enchanted Galleon','Book 5 Chapter 20');
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Ron Weasly','Deluminator','Book 7 Chapter 22');
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Draco Malfoy','Opal Necklace','Book 6 Chapter 15');
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Ron Weasly','Howler','Book 3 Chapter 5');
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Albus Dumbledore','Elder Wand','Book 6 Chapter 32');
INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned)
VALUES ('Harry Potter','Elder Wand','Book 7 Chapter 31');
CREATE TABLE HP_SPELL
(Spell_Name VARCHAR(50) NOT NULL,
Spell_Type VARCHAR(50),
Spell_Result VARCHAR(50),
Spell_Method_Of_Casting VARCHAR(100),
Constraint HP_SPELL_PK
Primary Key (Spell_Name)
);
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result)
VALUES ('Petrificus Totalus','Hex','Paralyses');
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting)
VALUES ('Lumos','Charm','Generate Light','Wave Hand in Front of Wand');
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting)
VALUES ('Expelliarmus','Battle','Disarms Opponent','Point and Shout');
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result)
VALUES ('Stupefy','Battle','Knock Out Opponent');
60
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting)
VALUES ('Wingardium Leviosa','Utility','Levitate','A Swish and a Flick');
INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting)
VALUES ('Avada Kadavra','Hex','Death','Heart Filled With Hate');
CREATE TABLE HP_CHARACTER_SPELL
(Character_Name VARCHAR(50) NOT NULL,
Spell_Name VARCHAR(50) NOT NULL,
Chapter_Of_Last_Casting VARCHAR(20),
Constraint HP_CHARACTER_SPELL_PK
Primary Key (Character_Name, Spell_Name),
Constraint HP_CHARACTER_SPELL_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name),
Constraint HP_CHARACTER_SPELL_FK2 Foreign Key (Spell_Name)
References HP_SPELL (Spell_Name)
);
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Harry Potter','Expelliarmus','Book 7 Chapter 36');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Albus Dumbledore','Lumos','Book 6 Chapter 26');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Draco Malfoy','Petrificus Totalus','Book 6 Chapter 4');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Hermione Granger','Stupefy','Book 7 Chapter 34');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Hermione Granger','Wingardium Leviosa','Book 1 Chapter 8');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Harry Potter','Wingardium Leviosa','Book 1 Chapter 8');
INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting)
VALUES ('Voldemort','Avada Kadavra','Book 7 Chapter 33');
CREATE TABLE HP_NOTABLE_FOOD
(Food_Name VARCHAR(50) NOT NULL,
Food_Enchantment VARCHAR(50),
Food_Type VARCHAR(50),
Constraint HP_NOTABLE_FOOD_PK
Primary Key (Food_Name)
);
INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type)
VALUES ('Chocolate Frogs','Frogs Come Alive', 'Chocolate');
INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type)
VALUES ('Fainting Fancies','Charm to Make the Eater Faint', 'Candy');
INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type)
VALUES ('Bertie Botts Every Flavor Beans','Charmed to Have Good and Awful Flavors','Candy');
INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Type)
VALUES ('Butterbeer', 'Drink');
INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Type)
VALUES ('Treacle Tart', 'Sweet Pastry');
61
CREATE TABLE HP_WHERE_TO_OBTAIN_FOOD
(Food_Name VARCHAR(50) NOT NULL,
Food_Location VARCHAR(50) NOT NULL,
Constraint HP_WHERE_TO_OBTAIN_FOOD_PK
Primary Key (Food_Name, Food_Location),
Constraint HP_WHERE_TO_OBTAIN_FOOD_FK1 Foreign Key (Food_Name)
References HP_NOTABLE_FOOD (Food_Name)
);
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Chocolate Frogs','Hogwarts Train');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Chocolate Frogs','Hogsmeade');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Fainting Fancies','Fred and George Joke Shop');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Bertie Botts Every Flavor Beans','Hogwarts Train');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Bertie Botts Every Flavor Beans','Hogsmeade');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Butterbeer','Hogsmeade');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Butterbeer','Hogwarts');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Treacle Tart','Hogwarts');
INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location)
VALUES ('Treacle Tart','The Dursley Home');
CREATE TABLE HP_CHARACTER_FOOD
(Character_Name VARCHAR(50) NOT NULL,
Food_Name VARCHAR(50) NOT NULL,
Chapter_Last_Eaten_By VARCHAR(20),
Constraint HP_CHARACTER_FOOD_PK
Primary Key (Character_Name, Food_Name),
Constraint HP_CHARACTER_FOOD_FK1 Foreign Key (Character_Name)
References HP_CHARACTER (Character_Name),
Constraint HP_CHARACTER_FOOD_FK2 Foreign Key (Food_Name)
References HP_NOTABLE_FOOD (Food_Name)
);
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Harry Potter','Chocolate Frogs','Book 1 Chapter 3');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Ron Weasly','Chocolate Frogs','Book 1 Chapter 3');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Ron Weasly','Bertie Botts Every Flavor Beans','Book 1 Chapter 3');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Harry Potter','Fainting Fancies','Book 6 Chapter 4');
62
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Harry Potter','Butterbeer','Book 5 Chapter 20');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Hermione Granger','Butterbeer','Book 5 Chapter 20');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Ron Weasly','Butterbeer','Book 5 Chapter 20');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Sirius Black', 'Treacle Tart', 'Book 4 Chapter 4');
INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By)
VALUES ('Albus Dumbledore','Bertie Botts Every Flavor Beans','Book 1 Chapter 18');
CREATE TABLE HP_POTION
(Potion_Name VARCHAR(50) NOT NULL,
Wizard_Name_Inventor VARCHAR(50),
Constraint HP_POTION_PK
Primary Key (Potion_Name),
Constraint HP_POTION_FK1 Foreign Key (Wizard_Name_Inventor)
References HP_WIZARD (Wizard_Name)
);
INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor)
VALUES ('Wolfsbane Potion', 'Damocles Belb');
INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor)
VALUES ('Felix Felicis', 'Zygmunt Budge');
INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor)
VALUES ('Doxycide Potion', 'Zygmunt Budge');
INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor)
VALUES ('Laughing Potion', 'Zygmunt Budge');
INSERT INTO HP_POTION (Potion_Name)
VALUES ('Forgetfulness Potion');
INSERT INTO HP_POTION (Potion_Name)
VALUES ('Polyjuice Potion');
CREATE TABLE HP_POTION_INGREDIENT
(Potion_Ingredient_Name VARCHAR(50) NOT NULL,
Potion_Ingred_Loc_Found VARCHAR(50),
Constraint HP_POTION_INGREDIENT_PK
Primary Key (Potion_Ingredient_Name)
);
--Wolfbane potion
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Aconite','Wild Places');
--Felix felicis
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Ashwinder Egg','Ashwinder');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Squill Bulb','Muggle Homes');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Murtlap Tentacle','Coastal Areas of Britain');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
63
VALUES ('Tincture of Thyme','Wild Places');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Occamy Eggshell','Occamy');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Powdered Common Rue','Mediterranean, Macaronesia and southwest Asia');
--Doxycide
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Bundimun Ooze','Worldwide.');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Streeler Shells','Africa, Europe, Asia, North America');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Dragon Liver','Dragon liver');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Hemlock Essence','Wild Places');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Tormentil Tincture','Wild Places');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Cowbane Essence','Wild Places');
--Laughing potion
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Spring Water','Worldwide');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Alihotsy Leaves','Hyena tree');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Billywig Wings','Australia');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Knarl Quills','North Europe, North America');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Puffskein Hair','Worldwide');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Horseradish Powder','Wild Places');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Laughter','Worldwide');
--Forgetfullness Potion
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Lethe River Water','River Lethe');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Valerian Sprigs','Hargrids Garden');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Standard Ingredient','Wild Places');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Mistletoe Berry','Worldwide');
--PolyJuice Potion
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Lacewing Flies','Worldwide');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Leeches','Worldwide');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
VALUES ('Powdered Bicorn Horn','Snapes Office');
INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found)
64
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase
HarryPotterDatabase

More Related Content

What's hot

Doors Getting Started
Doors Getting StartedDoors Getting Started
Doors Getting Startedsong4fun
 
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021AWSKRUG - AWS한국사용자모임
 
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...Edureka!
 
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...Edureka!
 
Practical Kerberos with Apache HBase
Practical Kerberos with Apache HBasePractical Kerberos with Apache HBase
Practical Kerberos with Apache HBaseJosh Elser
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)Rowell Belen
 
Manage Add-On Services with Apache Ambari
Manage Add-On Services with Apache AmbariManage Add-On Services with Apache Ambari
Manage Add-On Services with Apache AmbariDataWorks Summit
 
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo..."Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...Lucidworks
 
Redis cluster
Redis clusterRedis cluster
Redis clusteriammutex
 
BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)ejlp12
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance TuningRicardo Santos
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101Weaveworks
 
GraphFrames: Graph Queries In Spark SQL
GraphFrames: Graph Queries In Spark SQLGraphFrames: Graph Queries In Spark SQL
GraphFrames: Graph Queries In Spark SQLSpark Summit
 
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...Amazon Web Services Korea
 
Asynchronous programming with Functional Java and comparison with Scala
Asynchronous programming with Functional Java and comparison with ScalaAsynchronous programming with Functional Java and comparison with Scala
Asynchronous programming with Functional Java and comparison with ScalaKnoldus Inc.
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Hao H. Zhang
 
Jump Start with Apache Spark 2.0 on Databricks
Jump Start with Apache Spark 2.0 on DatabricksJump Start with Apache Spark 2.0 on Databricks
Jump Start with Apache Spark 2.0 on DatabricksDatabricks
 

What's hot (20)

Doors Getting Started
Doors Getting StartedDoors Getting Started
Doors Getting Started
 
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021
Docker를 활용한 손쉬운 ECS 활용기 - 김민태 (AUSG) :: AWS Community Day Online 2021
 
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...
Spark Interview Questions and Answers | Apache Spark Interview Questions | Sp...
 
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
 
Apache spark
Apache sparkApache spark
Apache spark
 
Practical Kerberos with Apache HBase
Practical Kerberos with Apache HBasePractical Kerberos with Apache HBase
Practical Kerberos with Apache HBase
 
Serverless Framework (2018)
Serverless Framework (2018)Serverless Framework (2018)
Serverless Framework (2018)
 
Manage Add-On Services with Apache Ambari
Manage Add-On Services with Apache AmbariManage Add-On Services with Apache Ambari
Manage Add-On Services with Apache Ambari
 
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo..."Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
"Spark Search" - In-memory, Distributed Search with Lucene, Spark, and Tachyo...
 
Redis cluster
Redis clusterRedis cluster
Redis cluster
 
BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
AWS ECS vs EKS
AWS ECS vs EKSAWS ECS vs EKS
AWS ECS vs EKS
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
GraphFrames: Graph Queries In Spark SQL
GraphFrames: Graph Queries In Spark SQLGraphFrames: Graph Queries In Spark SQL
GraphFrames: Graph Queries In Spark SQL
 
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...
통신사 인프라로서의 Edge cloud: 서비스 인프라의 미래 - 이기동 클라우드 사업부 시니어 매니저, SK Telecom :: AWS ...
 
Asynchronous programming with Functional Java and comparison with Scala
Asynchronous programming with Functional Java and comparison with ScalaAsynchronous programming with Functional Java and comparison with Scala
Asynchronous programming with Functional Java and comparison with Scala
 
AWS Basics .pdf
AWS Basics .pdfAWS Basics .pdf
AWS Basics .pdf
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1
 
Jump Start with Apache Spark 2.0 on Databricks
Jump Start with Apache Spark 2.0 on DatabricksJump Start with Apache Spark 2.0 on Databricks
Jump Start with Apache Spark 2.0 on Databricks
 

Viewers also liked

Kaplan & norton transforming the bsc from performance measurement to st...
Kaplan & norton   transforming the bsc from performance measurement to st...Kaplan & norton   transforming the bsc from performance measurement to st...
Kaplan & norton transforming the bsc from performance measurement to st...Rinsanti Margaretha
 
Cuentas Anuales Consolidadas Vocento 2007
Cuentas Anuales Consolidadas Vocento 2007Cuentas Anuales Consolidadas Vocento 2007
Cuentas Anuales Consolidadas Vocento 2007Gonzalo Martín
 
Maric, jornal of power sources 172(2007)4930502
Maric, jornal of power sources 172(2007)4930502Maric, jornal of power sources 172(2007)4930502
Maric, jornal of power sources 172(2007)4930502tiwisakirman
 
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมือง
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมืองLoadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมือง
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมืองnawaporn khamseanwong
 
U1 t1 a2_geometria_camilo osorio
U1 t1 a2_geometria_camilo osorioU1 t1 a2_geometria_camilo osorio
U1 t1 a2_geometria_camilo osorioJuan Osorio
 
Kaplan & norton transforming the bsc from performance measurement to st...
Kaplan & norton   transforming the bsc from performance measurement to st...Kaplan & norton   transforming the bsc from performance measurement to st...
Kaplan & norton transforming the bsc from performance measurement to st...Rinsanti Margaretha
 
20th Century Russia
20th Century Russia20th Century Russia
20th Century RussiaKalyn Duggan
 
ASSISTED REPRODUCTIVE TECHNIQUES
ASSISTED REPRODUCTIVE TECHNIQUESASSISTED REPRODUCTIVE TECHNIQUES
ASSISTED REPRODUCTIVE TECHNIQUESManu Aravind
 
Informe 2008 Industria Contenidos Digitales
Informe 2008 Industria Contenidos DigitalesInforme 2008 Industria Contenidos Digitales
Informe 2008 Industria Contenidos DigitalesGonzalo Martín
 
L'entrepreneur canadien - Denis Vincent
L'entrepreneur canadien - Denis VincentL'entrepreneur canadien - Denis Vincent
L'entrepreneur canadien - Denis VincentDenis Vincent
 

Viewers also liked (15)

Kaplan & norton transforming the bsc from performance measurement to st...
Kaplan & norton   transforming the bsc from performance measurement to st...Kaplan & norton   transforming the bsc from performance measurement to st...
Kaplan & norton transforming the bsc from performance measurement to st...
 
Cuentas Anuales Consolidadas Vocento 2007
Cuentas Anuales Consolidadas Vocento 2007Cuentas Anuales Consolidadas Vocento 2007
Cuentas Anuales Consolidadas Vocento 2007
 
Abraes
AbraesAbraes
Abraes
 
Maric, jornal of power sources 172(2007)4930502
Maric, jornal of power sources 172(2007)4930502Maric, jornal of power sources 172(2007)4930502
Maric, jornal of power sources 172(2007)4930502
 
biodata_RN
biodata_RNbiodata_RN
biodata_RN
 
Applied statistics-fda-san-diego-ca
Applied statistics-fda-san-diego-caApplied statistics-fda-san-diego-ca
Applied statistics-fda-san-diego-ca
 
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมือง
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมืองLoadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมือง
Loadแนวข้อสอบ พนักงานวางผังเมือง (ปริญญาโท) กรมโยธาธิการและผังเมือง
 
U1 t1 a2_geometria_camilo osorio
U1 t1 a2_geometria_camilo osorioU1 t1 a2_geometria_camilo osorio
U1 t1 a2_geometria_camilo osorio
 
Kaplan & norton transforming the bsc from performance measurement to st...
Kaplan & norton   transforming the bsc from performance measurement to st...Kaplan & norton   transforming the bsc from performance measurement to st...
Kaplan & norton transforming the bsc from performance measurement to st...
 
20th Century Russia
20th Century Russia20th Century Russia
20th Century Russia
 
ASSISTED REPRODUCTIVE TECHNIQUES
ASSISTED REPRODUCTIVE TECHNIQUESASSISTED REPRODUCTIVE TECHNIQUES
ASSISTED REPRODUCTIVE TECHNIQUES
 
Informe 2008 Industria Contenidos Digitales
Informe 2008 Industria Contenidos DigitalesInforme 2008 Industria Contenidos Digitales
Informe 2008 Industria Contenidos Digitales
 
J Beukes CV
J Beukes CVJ Beukes CV
J Beukes CV
 
Soalan ictl bm
Soalan ictl bmSoalan ictl bm
Soalan ictl bm
 
L'entrepreneur canadien - Denis Vincent
L'entrepreneur canadien - Denis VincentL'entrepreneur canadien - Denis Vincent
L'entrepreneur canadien - Denis Vincent
 

Similar to HarryPotterDatabase

Two People Talking Dialog
Two People Talking DialogTwo People Talking Dialog
Two People Talking DialogStacy Johnson
 
024 Essay Example Social Media Introduction In Pakis
024 Essay Example Social Media Introduction In Pakis024 Essay Example Social Media Introduction In Pakis
024 Essay Example Social Media Introduction In PakisCarolina Cardona
 
College Board Sat Essay. Essay Sample 1 Bogard. 2
College Board Sat Essay. Essay Sample 1 Bogard. 2College Board Sat Essay. Essay Sample 1 Bogard. 2
College Board Sat Essay. Essay Sample 1 Bogard. 2Diana Walker
 
SEO in the Age of Entities: Using Schema.org for Findability
SEO in the Age of Entities: Using Schema.org for FindabilitySEO in the Age of Entities: Using Schema.org for Findability
SEO in the Age of Entities: Using Schema.org for FindabilityJonathon Colman
 
Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Trey Grainger
 
Web of Data - Introduction (english)
Web of Data - Introduction (english)Web of Data - Introduction (english)
Web of Data - Introduction (english)Thomas Francart
 
Everything You Didn't Know About Entity SEO
Everything You Didn't Know About Entity SEO Everything You Didn't Know About Entity SEO
Everything You Didn't Know About Entity SEO Sara Taher
 
Essay Helper Online
Essay Helper OnlineEssay Helper Online
Essay Helper OnlineAshlee Jones
 
(PROJEKTURA) open data big data @tgg osijek
(PROJEKTURA) open data big data @tgg osijek(PROJEKTURA) open data big data @tgg osijek
(PROJEKTURA) open data big data @tgg osijekRatko Mutavdzic
 
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerHaystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerOpenSource Connections
 
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docx
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docxYou have been assigned a reading by WMF Petrie; Diospolis Parva (.docx
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docxmaxinesmith73660
 
Paper Writer Services
Paper Writer ServicesPaper Writer Services
Paper Writer ServicesCheryl Brown
 
Harry Potter and Information Architecture
Harry Potter and Information ArchitectureHarry Potter and Information Architecture
Harry Potter and Information ArchitectureLeow Hou Teng
 
Wuthering Heights Essays.pdf
Wuthering Heights Essays.pdfWuthering Heights Essays.pdf
Wuthering Heights Essays.pdfBreanne Brooks
 
Relationships Essay Introduction
Relationships Essay IntroductionRelationships Essay Introduction
Relationships Essay IntroductionAngel Morris
 

Similar to HarryPotterDatabase (20)

Stories in HCI
Stories in HCIStories in HCI
Stories in HCI
 
FactGuru
FactGuruFactGuru
FactGuru
 
Two People Talking Dialog
Two People Talking DialogTwo People Talking Dialog
Two People Talking Dialog
 
024 Essay Example Social Media Introduction In Pakis
024 Essay Example Social Media Introduction In Pakis024 Essay Example Social Media Introduction In Pakis
024 Essay Example Social Media Introduction In Pakis
 
College Board Sat Essay. Essay Sample 1 Bogard. 2
College Board Sat Essay. Essay Sample 1 Bogard. 2College Board Sat Essay. Essay Sample 1 Bogard. 2
College Board Sat Essay. Essay Sample 1 Bogard. 2
 
SEO in the Age of Entities: Using Schema.org for Findability
SEO in the Age of Entities: Using Schema.org for FindabilitySEO in the Age of Entities: Using Schema.org for Findability
SEO in the Age of Entities: Using Schema.org for Findability
 
Resource Description Pres and Paper
Resource Description Pres and PaperResource Description Pres and Paper
Resource Description Pres and Paper
 
Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)Natural Language Search with Knowledge Graphs (Haystack 2019)
Natural Language Search with Knowledge Graphs (Haystack 2019)
 
Web of Data - Introduction (english)
Web of Data - Introduction (english)Web of Data - Introduction (english)
Web of Data - Introduction (english)
 
Everything You Didn't Know About Entity SEO
Everything You Didn't Know About Entity SEO Everything You Didn't Know About Entity SEO
Everything You Didn't Know About Entity SEO
 
Beyond gsafd
Beyond gsafdBeyond gsafd
Beyond gsafd
 
Essay Helper Online
Essay Helper OnlineEssay Helper Online
Essay Helper Online
 
(PROJEKTURA) open data big data @tgg osijek
(PROJEKTURA) open data big data @tgg osijek(PROJEKTURA) open data big data @tgg osijek
(PROJEKTURA) open data big data @tgg osijek
 
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey GraingerHaystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
Haystack 2019 - Natural Language Search with Knowledge Graphs - Trey Grainger
 
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docx
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docxYou have been assigned a reading by WMF Petrie; Diospolis Parva (.docx
You have been assigned a reading by WMF Petrie; Diospolis Parva (.docx
 
Smart Searching
Smart SearchingSmart Searching
Smart Searching
 
Paper Writer Services
Paper Writer ServicesPaper Writer Services
Paper Writer Services
 
Harry Potter and Information Architecture
Harry Potter and Information ArchitectureHarry Potter and Information Architecture
Harry Potter and Information Architecture
 
Wuthering Heights Essays.pdf
Wuthering Heights Essays.pdfWuthering Heights Essays.pdf
Wuthering Heights Essays.pdf
 
Relationships Essay Introduction
Relationships Essay IntroductionRelationships Essay Introduction
Relationships Essay Introduction
 

HarryPotterDatabase

  • 1. ​The Harry Potter Universe Database Charles Harrill, Greg Eskridge and Alex Janousek December 8, 2016
  • 2. Table of Contents Project Name & Project Cover Sheet.............................................. Cover Sheet Introduction.......................................................................................................... 3 Business Rules and User Requirements............................................................. 6 Enhanced Entity Relation Diagram.................................................................... 8 Entity, Attribute and Relationship Definitions................................................ 14 Relational Schema 3rd Normal Form……….................................................. 23 SQL Script File……………………….……….................................................. 36 Describe and Select Statements…..….……….................................................. 70 Database Queries…..….………......................................................................... 84 Peer Evaluation…………………..….………................................................... 98 2
  • 3. Harry Potter Universe Database Introduction When reading Harry Potter books or watching the movies, it is very difficult to keep track of all the characters, spells and other magical items that appear throughout the series. The fans of these books and movies would appreciate having an app or website optimized for quick reference, when questions arise about specific characters or event details. A well-constructed database is created because of this need to gather the plethora of information that anyone would possibly want to know about the Harry Potter universe. With a central repository of shared data, information is easily managed by a controlling agent which stores all information in a standardized, convenient form. Not only does the database prevent data redundancy and improve data sharing but it also improves data accessibility and responsiveness to continuously improve data quality and sharing. This helps prevent the compromising of data integrity however, there are still many other challenges to take into consideration when making the Harry Potter Universe database. The potential users of this database are people who want to learn more about not only what they read in the books, but also what they saw in the movies. This database will help these users to be able to get answers to the questions that they seek to know more about after reading or watching. Since there is a great amount of information in the series, the database will provide a concise and logical way to solve any potential gaps in knowledge. For example, a user may desire more information on what potions a wizard created or what group a given wizard is associated with. They also might like to know more about which books a character appears in and they type of school and house they are linked to. In this way, the user saves time trying to flip through books and fast-forward through movies trying to get their answers. There is no quick way to add all of the Harry Potter data and metadata at once. SQL script files or queries will have to be created to add all of these entities such as characters, humans, creatures, wizards and related attributes along with the relationships between each entity. Other limitations to the database include taking the time to find all of the specific information needed to insert all of the data into tables accurately. Another challenge that will be faced is deciding on whether information from the books are more important than the movies and vice versa. For example, the books are more descriptive and detailed and the scenes may vary between the book and the appropriate movie. Also, many characters are left out in the movies such as Peeves, Professor Binns and Ludo Bagman. A great amount of Quidditch matches are absent as well along with many small but important scenes that are crucial to the storyline. Another example of this is that the movies also do not cover apparition tests, wandless magic or describe what a squib is, even though Filch and Mrs. Figg are present in them. Many scenes are altered as well in the movies that make the storyline slightly different. A perfect example of this would be in ​Harry Potter and the Deathly Hallows Part 1 when Harry escapes the Dursleys and 3
  • 4. instead of first going through a series of safe houses via portkey, he magically ends up at the Weasley’s house. Some of these problems have been solved by creating multiple attributes such as Book_Appeared_In (multiple value) and Movie_Appeared_In (multiple value) to better collect the character data accurately even with differences between the films and books. In order solve the problem of characters not appearing in the movies that were in the books, there is an attribute called Level_Of_Impact which designates a character’s importance as minor or major. This attribute keeps the data accurate by using the assumption that the correlation of a character being left out of a movie is because of their level of importance which will be reported as minor. The motivation behind the Harry Potter Universe database comes from the extensive knowledge of the many books and movies with the goal of wanting to help people find the information they need in the quickest means possible, without having data inconsistencies. Since the scope of the Harry Potter universe is so extensive, a database would be the easiest solution which allows data organization and manipulation whenever it is needed. With exactly 772 unique characters in this series and over 100 spells, developing a database to organize data from this universe is crucial for ultimately creating an app or website to integrate with the database. With the use of a database, information is stored in electronic records that can be searched, retrieved, organized and manipulated in countless ways. Not only is the data easy to access, it is extremely accurate as well. With a GUI in place, all Harry Potter fans that are able to operate a computer or digital device can easily update and view any information in the database to help them better understand the series. The additional benefits of the Harry Potter Universe database include saving precious time by retrieving single or multiple records in the matter of minutes, whether you are writing or using a GUI to submit the queries. These queries will systematically update and manipulate the data accordingly and return the information quickly. It will be much quicker than searching blindly on google or by other methods. With the structure and flexibility of databases, it is extremely easy to link many different sources of information together to help better analyze and see important patterns within the data and metadata they may not normally notice. With the scalability of databases, it is easy to upgrade from thousands to millions of entries. The amount of information in the Harry Potter Universe database can be infinite. With superior databases, comes larger costs. In order to first set up a database, there are specific setup costs required and then future ongoing expenses for maintaining it. Maintenance costs increase with the size and growth of the database such as enhanced security and the training of people to be able to use its functionality and understand the system. It would not be beneficial for Harry Potter fans to have access to records that are inaccurate or are coming from a rogue hacker who believes it would be entertaining to destroy the hard work put into creating the database. Even though database management systems provide easy access, organization and analysis of data, without a feasible budget, it may not be the best solution if a small team is not continually maintaining it after it is created. 4
  • 5. The goal of the Harry Potter Universe database is to begin the initial work needed to eventually create a fully functional implementation of the database management system. Once created, new Harry Potter fans and veterans alike can access, add information, and eventually put in requests to edit or remove inaccurate data. Even with the challenges that come with the development of a well-structured database (and especially one created for retaining Harry Potter data), it is still more beneficial to create it for the fans. The creation of the this database would be very much appreciated by those who want a greater understanding of the depth of Harry Potter. 5
  • 6. Harry Potter Universe Database Business Rules The Harry Potter Universe contains many Characters. The common attributes of a Character are: Character_Name (identifier), Language (multiple value), Level_of_Impact (“major” or “minor”), Book_Appeared_In (multiple value), and Movie_Appeared_In (multiple value). A Character may be a Human or a Creature. The unique attribute of Human is Profession. The unique attribute of Creature is Species. Some Characters may be classified as both, and there are a few other Characters in the Harry Potter Universe, who have other classifications, such as ghosts, but with no unique attributes. A Character may be the parent of one or more other Characters, and each Character has two parents. However, not all Characters’ parents are mentioned in the Harry Potter Universe. A Human may be classified as a Wizard or a Muggle. There are many humans in the Harry Potter Universe who may be classified as both. The unique attributes of Wizard are: Wand_Type, Patronus, and Familiar_Type. The unique attribute of Muggle is Citizenship. A Wizard may be responsible for protecting several Wizards or several Muggles. A Wizard may also own multiple Creatures. Each Wizard who attended a School was assigned to a House within that School. The attributes of House are: House_Name (identifier), Symbol, and Characteristic (multiple value). Other Characters may also appear as “House Ghosts.” Each House also has one Wizard in charge of the House. Each House is belongs to only one wizarding School, and each School may contain more than one House, however not all Houses are mentioned for all Schools in the Harry Potter Universe. The attributes of School are: School_Name (identifier), Number_of_Houses, and Region. Other Characters, aside from Wizards, may also appear on the grounds of a School. Wizards may also be faculty members of a School. Wizards may be affiliated with a Group. The attributes of Group are: Group_Name (identifier), Purpose, and Ethical_Orientation. Each Group has a designated Wizard_Leader. A Group must include multiple Wizards and a Wizard may be a member of more than one Group. A Character may be able to cast many different Spells. The attributes of Spell are: Spell_Name (identifier), Type, Result, and Method_of_Casting. The last time a specific Character casted a specific spell will need to be noted as Chapter_of_Last_Casting. A Character may be able to 6
  • 7. cast many different Spells. A Spell may have also been invented by only one Character or may have no inventor mentioned in the Harry Potter Universe. A Character may have invented multiple Spells. Each Wizard is also capable of making Potions by using Potion Ingredients, which are listed in a Potion Recipe. The attributes of Potion are: Potion_Name (identifier) and effect (multiple value). A Wizard may not know how to make any Potions or may know how to make a number of Potions. A Wizard may also be the inventor of a Potion, but not every Potion has a known inventor. A Potion can be made by at least one Wizard. The attributes of Potion Recipe are: Potion_Recipe_ID (surrogate identifier), Potion_Name, and Ingredient_Name (multiple value). The Attributes of Potion Ingredient are: Potion_Ingredient_Name (identifier) and Location_Found. A Potion has only one recipe. One Potion may contain many Potion Ingredients, but a Potion Ingredient may be used in more than one Potion. Characters may have studied several key Texts, which are highlighted in the Harry Potter Universe. The attributes of Text are: Text_Title (identifier), Author, Subject_Matter, and Style (as in fiction, nonfiction, poetry, prose, etc…). A Character may study many Texts or may not study and Texts at all. A Text may also have been enchanted by a Wizard or may not be enchanted at all. Throughout the Universe, all Characters may love to eat some Notable Foods. The attributes of Notable Food are: Food_Name (identifier), Food_Enchantment, Food_Type, and Where_to_Obtain (multiple value). Many Characters may eat many Notable Foods in the Harry Potter Universe. It is important to note the Chapter_Last_Eaten to view the last time a Character ate a Notable Food. A Character may also possess Enchanted Items. The attributes of Enchanted Item are: Item_Name (identifier), Item_Enchantment, and Item_Type. Throughout the books of the Harry Potter Universe, several Characters may have possessed several Enchanted Items. It is important to note the final owner of an Enchanted Item by recording the Chapter_Last_Owned_By_Character. 7
  • 8. Harry Potter Universe Database Enhanced Entity - Relationship Diagram 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. Harry Potter Universe Database Entity, Attribute and Relationship Definitions Entity and Attribute Definitions Entity:​ Character Definition:​ ​A Character is any person, ghost, creature, or other living or dead being, who was specifically mentioned by name in any of the Harry Potter books or movies. Attribute:​ Character_Name (identifier) Definition:​ ​Every Character has a unique name. Attribute:​ Language (multiple value) Definition: ​This is how a character communicates. A character may be able to communicate with one or more languages. Attribute:​ Level_of_Impact Definition: ​Some characters are major characters, and some are minor characters. Level_of_Impact is a way to designate character importance. Attribute:​ Book_Appeared_In (multiple value) Definition: ​The Harry Potter Universe consists of multiple books. This attribute captures in which books a Character appeared. Attribute:​ Movie_Appeared_In (multiple value) Definition: ​The Harry Potter Universe consists of multiple movies. This attribute captures in which movies a Character appeared. Attribute:​ Character_Type (Human?, Creature?) Definition: ​This is the sub-type discriminator for Character. It is partially complete, and there may be overlapping between Human and Creature. Entity:​ Human Definition:​ ​A Human is any Character that is a person. Attribute:​ Profession Definition: ​Each Human Character has a profession in the book, whether a student, a teacher, a banker or other profession. Attribute:​ Human_Type Definition: ​This is the sub-type discriminator for Human. It has total completeness, and the sub-types of the Human super-type are disjoint. So, this is a simple attribute instead of a composite attribute. 14
  • 15. Entity:​ Creature Definition: ​A Creature includes an animal, such as an owl or cat, or a mystical beast, such as a giant or phoenix. Creatures are almost any non-human Character, aside from certain plants, ghosts or spirits. Attribute:​ Species Definition: ​As stated above, there are many types of Creatures. The Species attribute specifies the type of Creature (ie. Cat, Dog, Griffon, Centaur, Phoenix, Giant, etc.) Entity:​ Wizard Definition: ​A Wizard is a Human who is able to perform magic. This may also include a human who was born to Wizard parents but has no magical abilities. Attribute:​ Wand_Type Definition: ​Every wizard needs to use a wand in order to perform most magical Spells. Each Wizard has a unique wand type, Attribute:​ Patronus Definition: ​When a Wizard casts the Spell, “Expecto Patronum,” the result is a protective force, in the shape of an animal, known as a Patronus. Many Wizards have a unique Patronus that embodies their character. Attribute:​ Familiar_Type Definition: ​Wizards have a special, often magical, connection with their familiars. Familiars are somewhat like pets, but with a stronger mental connection to their Wizards. A familiar may be a cat, toad, owl, phoenix, snake or other Creature. Entity:​ Muggle Definition: ​A Muggle is a non-Wizard Human, who is unable to perform magic and who was not born to Wizard parents. Attribute:​ Citizenship Definition: ​All Muggles are a citizen of some country. While Wizards tend to exist only in the Wizarding world after they come of age, Muggles exist in the “real” world. 15
  • 16. Entity:​ House Definition: ​On the very first day that a Wizard attends a School of Wizardry, the Wizard is “sorted” into one of the school’s houses. These houses are sort of dormitories, where all of the students work as a team and study together, and where students do the majority of their socializing. Attribute:​ House_Name (identifier) Definition:​ ​Each House has a unique name. Attribute:​ Symbol Definition: ​A Symbol is a house logo or insignia. This is typically a representation of an animal, such as a lion, a raven, a badger or a snake. Attribute:​ Characteristic (multiple value) Definition: ​Wizards are sorted into a particular house based on their primary character traits. One house may include Wizards who are primarily brave and honest, while another may include Wizards who are mostly intelligence and crafty. Entity:​ School Definition: ​Every Wizard attended a School of Wizardry, beginning at age 11 (before September 1). The School entity focuses solely on Schools of Wizardry, within the Harry Potter Universe, and does not include Muggle schools. Attribute:​ School_Name (identifier) Definition:​ ​Every School of Wizardry has a unique name. Attribute:​ Number_of_Houses Definition: ​Each unique School of Wizardry may contain a unique number of Houses in which students are sorted. Attribute:​ Region Definition: Though they exist in the Wizarding World, these Schools are located in various regions of the Earth, including Great Britain, the Soviet Bloc, or Southwestern Europe, among others. Entity:​ Group Definition: ​Some wizards are affiliated with various sub-groups throughout the Harry Potter Universe. The Group Entity is designed to capture these Wizard affiliations. Attribute:​ Group_Name (identifier) Definition:​ ​Every Group has a unique name. Attribute:​ Purpose Definition: ​This explains why a Group exists, whether, for instance, its purpose is to destroy something, to protect something or to govern. Attribute:​ Ethical_Orientation Definition: ​Some groups have an evil agenda, some have a benevolent agenda, and some may be neutral. 16
  • 17. Entity:​ Spell Definition: ​A Character may be able to cast magical spells, aimed to achieve a desired result through magical means. The Spell entity captures this magical ability that can be performed by most Wizards and some Creatures. Attribute:​ Spell_Name (identifier) Definition:​ ​Every Spell has a unique name. Attribute:​ Type Definition: ​Some spells are designed to attack, some may be used to defend or heal, and others may be used for a more utility function, such as cooking or casting a light. Attribute:​ Result Definition: ​This attribute is designed to detail the end result of casting a certain spell. Attribute:​ Method_of_Casting Definition: ​Each Spell has a unique way of being cast. An example may be “with a wand - a swish and a flick.” Entity:​ Potion Definition: ​Another way that Wizards perform magic is to make special Potions, by mixing various ingredients together in a specific way. This creates essentially a Wizard form of medicine. Attribute:​ Potion_Name (identifier) Definition:​ ​Every Potion has a unique name. Attribute:​ Effect (multiple value) Definition: ​Potions may be aimed at created various results. One Potion may be designed to heal broken bones, while another Potion’s Effect is to “induce relaxation and unfiltered honesty.” Entity:​ Potion Ingredient Definition:​ ​A Potion Ingredient is used during the formulation of a magical Potion. Attribute:​ Potion_Ingredient_Name (identifier) Definition:​ ​Every Potion Ingredient has a unique name. Attribute:​ Location_Found (multiple value) Definition: ​Potion Ingredients may each be found in one place or in a number of different places. These locations may include geographical areas or may include the office of a Character. 17
  • 18. Entity:​ Potion Recipe Definition: ​Some Potions may share Potion Ingredients, however every Potion has one and only one Potion Recipe, combining a specific list of ingredients. Attribute:​ Potion Recipe ID (identifier) Definition: ​This is a surrogate identifier, designed to make a Potion Recipe search easier to complete, instead of creating a composite primary key between Potion_Name and Ingredient_Name, since Ingredient_Name is a multiple value attribute. Attribute:​ Potion_Name Definition:​ ​This is the identifier of Potion. Attribute:​ Potion_Ingredient_Name (multiple value) Definition: ​This is the identifier of Potion Ingredient, and is a multiple value attribute, comprised of all ingredients used to make the Potion. Entity:​ Text Definition: ​Throughout the Harry Potter books and movies, a Character may have interacted with a number of different in-universe texts, whether school textbooks, journals, news sources or other types. Attribute:​ Text_Title (identifier) Definition:​ ​Every Text has a unique title. Attribute:​ Author Definition: ​Each Text has an Author, who created the text. Some texts share the same Author. Attribute:​ Subject_Matter Definition: ​A Text may be a news piece, a history book, a science textbook, a work of fiction, or have another reason for existing, which is its Subject_Matter. Attribute:​ Style Definition: ​To further describe the text, this attribute details whether the text is poetry, prose, instructional, a play, or another style. 18
  • 19. Entity:​ Notable Food Definition: ​Some Notable Foods in the Harry Potter Universe received special mention on one or multiple occasions throughout the books or movies. Attribute:​ Food_Name (identifier) Definition:​ ​Every Notable Food has a unique name. Attribute:​ Food_Enchantment Definition: ​Each of the Notable Foods mentioned, may have a unique enchantment, such as a Chocolate Frog being magically enchanted to behave like a real fog. Attribute:​ Food_Type Definition: ​This allows more detail about the food, including whether the food is sweet or savory, or whether it’s a solid or liquid. Attribute:​ Where_to_Obtain (multiple value) Definition: ​Characters came across these Notable Foods in various locations or settings. This multiple value attribute allows for explanation of these locations. Entity:​ Enchanted Item Definition: ​Aside from wands, Potions and Foods, a Character may have interacted with various other magical Enchanted Items. If an item that could qualify as the Text entity was magically enchanted, it will be stored as an Enchanted Item. Attribute:​ Item_Name (identifier) Definition:​ ​Every Enchanted Item has a unique name. Attribute:​ Item_Enchantment Definition: ​This attribute details the magical effect that has been placed on the Enchanted Item, such as invisibility or immortality. Attribute:​ Item_Type Definition: ​The Item_Type attribute is designed to describe what type of item has been enchanted, such as a cloak, stone or journal. 19
  • 20. Relationship and Attribute-on-Relationship Definitions Relationship:​ Character “is parent of” Character (M:M) Definition: A character may have optional or more parents mentioned in the Harry Potter Books. A Character also may be the parent of optional or many Characters. Relationship:​ Spell “invented by” Character (1:M) Definition: A spell may have optional or one Character cited as its inventor. A Character may have invented optional or many Spells. Relationship:​ Character “reads” Text (1:M) Definition: A Character may have read optional or many Texts. A Text that is mentioned in the Harry Potter Books is read by one and only one Character. Relationship:​ Character “visits” School (1:M) Definition: A Character may have visited optional or one School during the course of the Harry Potter Books and Movies. A School has been visited by many Characters. Relationship:​ Character “casts” Spell (M:M) Definition: A Character may “cast” or perform optional or many Spells. A Spell may have been casted by optional or many Characters. Attribute-on-Relationship:​ Chapter_Last_Cast Definition: This is the last time that a certain Character casted a certain Spell in the Harry Potter books. Relationship:​ Character “possesses” Enchanted Item (M:M) Definition: A Character may have possessed optional or many Enchanted Items at some point in the Harry Potter Universe. An Enchanted Item may have been possessed by optional or many Characters. Attribute-on-Relationship:​ Chapter_Last_Possessed_By Definition: This is the last time that a certain Character possessed a certain item in the Harry Potter books. Relationship:​ Character “loves to eat” Notable Food (M:M) Definition: A Character may have been mentioned as eating optional or many Notable Foods. A Notable Food was eaten by one or many Characters. Attribute-on-Relationship:​ Chapter_Last_Eaten_By Definition: This is the last time that a certain Character was noted as eating a certain Notable Food in the Harry Potter books. Relationship:​ Wizard “enchants” Text (1:M) Definition: A Wizard may have used magic to enchant optional or many Texts. A Text may have been enchanted by optional or one Wizard. Relationship:​ Wizard “protects” Muggle (M:M) Definition: A Wizard may have protected optional or many Muggles during the course of the Harry Potter Universe. A Muggle may have been protected by optional or many Wizards. 20
  • 21. Relationship:​ Wizard “owns” Creature (1:M) Definition: A Wizard may have been mentioned as owning optional or many Creatures in the Harry Potter Universe. A Creature may have been owned by optional or one Wizard. “Owns” may include owning a pet, having a familiar, or being the master of a Creature, such as an Elf. Relationship:​ Wizard “makes” Potion (M:M) Definition: A Wizard may have made optional or many potions in the Harry Potter Universe. Every Potion that was mentioned in the books was made by one or more Wizards. Relationship:​ Wizard “assigned to” House (1:M) Definition: A House contains one to many Wizards, but a Wizard belongs to one and only one House. Relationship:​ Wizard “invents” Potion. (1:M) Definition: A Wizard may have invented optional or many Potions, but each Potion was invented by one and only one Wizard. Relationship:​ Wizard “protects” Wizard (M:M) Definition: A Wizard may have been protected by optional or many Wizards, and a Wizard may have protected optional or many Wizards. Relationship:​ Wizard “affiliates with” Group (M:M) Definition: A Wizard may have been a member of, or affiliated with, optional or many Groups. A Group has many Wizards affiliated with it. Relationship:​ Group “lead by” Wizard (1:M) Definition: Each Group has one and only one Wizard leader. A Wizard may have lead optional or many Groups. Relationship:​ Wizard “is faculty” School (1:M) Definition: Every Wizarding School has a faculty of many Wizards. But a Wizard is faculty of optional or only one School. Relationship:​ Wizard “in Charge of” House (1:1) Definition: A House has one and only one Wizard in Charge of it. A Wizard may be in charge of optional or one House. Relationship:​ House “belongs to” School (1:M) Definition: A House belongs to one and only one school. A School contains one or many Houses. Relationship:​ Character “belongs to” House (1:M) Definition: There are a few non-Wizard Characters, such as ghosts or half-giants, who also belonged to a House. In that case, a Character may belong to optional or one Houses, and a House contains one or more Characters. 21
  • 22. Relationship:​ Potion “has” Recipe (1:M) Definition: There are more than one Potion in the Harry Potter Universe that have a Potion Recipe mentioned. However, every Potion has one and only one Potion Recipe. Relationship:​ Potion Recipe “contains” Potion Ingredient (M:M) Definition: Each Potion Recipe contains at least one Potion Ingredient. Some Potion Ingredients may be used in more than one Potion. 22
  • 23. Harry Potter Universe Database Relational Schema in 3rd Normal Form 23
  • 24. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. Harry Potter Universe Database SQL Script File DROP TABLE HP_SCHOOL CASCADE CONSTRAINTS; DROP TABLE HP_HOUSE CASCADE CONSTRAINTS; DROP TABLE HP_HOUSE_CHARACTERISTIC CASCADE CONSTRAINTS; DROP TABLE HP_CHARACTER CASCADE CONSTRAINTS; DROP TABLE HP_LANGUAGE CASCADE CONSTRAINTS; DROP TABLE HP_BOOK_APPEARED_IN CASCADE CONSTRAINTS; DROP TABLE HP_MOVIE_APPEARED_IN CASCADE CONSTRAINTS; DROP TABLE HP_CHARACTER_PARENT CASCADE CONSTRAINTS; DROP TABLE HP_HUMAN CASCADE CONSTRAINTS; DROP TABLE HP_MUGGLE CASCADE CONSTRAINTS; DROP TABLE HP_WIZARD CASCADE CONSTRAINTS; DROP TABLE HP_WIZARD_PROTECTS_MUGGLE CASCADE CONSTRAINTS; DROP TABLE HP_WIZARD_PROTECTS_WIZARD CASCADE CONSTRAINTS; DROP TABLE HP_CREATURE CASCADE CONSTRAINTS; DROP TABLE HP_WIZARD_OWNS_CREATURE CASCADE CONSTRAINTS; DROP TABLE HP_TEXT CASCADE CONSTRAINTS; DROP TABLE HP_ENCHANTED_ITEM CASCADE CONSTRAINTS; DROP TABLE HP_CHARACTER_ENCHANTED_ITEM CASCADE CONSTRAINTS; DROP TABLE HP_SPELL CASCADE CONSTRAINTS; DROP TABLE HP_CHARACTER_SPELL CASCADE CONSTRAINTS; DROP TABLE HP_NOTABLE_FOOD CASCADE CONSTRAINTS; DROP TABLE HP_WHERE_TO_OBTAIN_FOOD CASCADE CONSTRAINTS; DROP TABLE HP_CHARACTER_FOOD CASCADE CONSTRAINTS; DROP TABLE HP_POTION CASCADE CONSTRAINTS; DROP TABLE HP_POTION_INGREDIENT CASCADE CONSTRAINTS; DROP TABLE HP_POTION_RECIPE CASCADE CONSTRAINTS; DROP TABLE HP_WIZARD_MAKES_POTION CASCADE CONSTRAINTS; DROP TABLE HP_POTION_EFFECT CASCADE CONSTRAINTS; DROP TABLE HP_GROUP CASCADE CONSTRAINTS; DROP TABLE HP_GROUP_WIZARD_AFFILIATION CASCADE CONSTRAINTS; CREATE TABLE HP_SCHOOL (School_Name VARCHAR(50) NOT NULL, School_Number_of_Houses INTEGER, School_Region VARCHAR(50), Constraint HP_SCHOOL_PK Primary Key (School_Name) ); INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region) VALUES ('Hogwarts', 4, 'United Kingdom'); INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region) VALUES ('Durmstrang', 1, 'Eastern Europe'); INSERT INTO HP_SCHOOL (School_Name, School_Number_Of_Houses, School_Region) 36
  • 37. VALUES ('Beauxbatons', 1, 'France'); CREATE TABLE HP_HOUSE (House_Name VARCHAR(50) NOT NULL, House_Symbol VARCHAR(50), Wizard_Name_In_Charge VARCHAR(50), School_Name_Belongs_To VARCHAR(50), Constraint HP_HOUSE_PK Primary Key (House_Name), Constraint HP_HOUSE_FK1 Foreign Key (School_Name_Belongs_To) References HP_SCHOOL (School_Name) ); INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To) VALUES ('Gryffindor', 'Lion', 'Minerva McGonagall', 'Hogwarts'); INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To) VALUES ('Slytherin', 'Snake', 'Severus Snape', 'Hogwarts'); INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To) VALUES ('Hufflepuff', 'Badger', 'Pomona Sprout', 'Hogwarts'); INSERT INTO HP_HOUSE (House_Name, House_Symbol, Wizard_Name_In_Charge, School_Name_Belongs_To) VALUES ('Ravenclaw', 'Raven', 'Filius Flitwick', 'Hogwarts'); CREATE TABLE HP_HOUSE_CHARACTERISTIC (House_Name VARCHAR(50) NOT NULL, House_Characteristic VARCHAR(50) NOT NULL, Constraint HP_HOUSE_CHARACTERISTIC_PK Primary Key (House_Name,House_Characteristic), Constraint HP_HOUSE_CHARACTERISTIC_FK1 Foreign Key (House_Name) References HP_HOUSE (House_Name) ); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Gryffindor', 'Bravery'); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Gryffindor', 'Honor'); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Ravenclaw', 'Intellect'); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Hufflepuff', 'Kindness'); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Slytherin', 'Natural Talent'); INSERT INTO HP_HOUSE_CHARACTERISTIC (House_Name, House_Characteristic) VALUES ('Slytherin', 'Aggression'); CREATE TABLE HP_CHARACTER (Character_Name VARCHAR(50) NOT NULL, Character_Level_Of_Impact VARCHAR(50) Check(Character_Level_Of_Impact IN('All Books', 'Most Books', 'Less Than Half of Books', 'One Book', 'One Chapter', 'Referenced')), Character_Human CHAR(1) 37
  • 38. Check (Character_Human IN('Y', 'N')), Character_Creature CHAR(1) Check (Character_Creature IN('Y', 'N')), School_Name_Visited VARCHAR(50), Constraint HP_CHARACTER_PK Primary Key (Character_Name), Constraint HP_CHARACTER_FK1 Foreign Key (School_Name_Visited) References HP_SCHOOL (School_Name) ); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Harry Potter', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Hermione Granger', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Ron Weasly', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Rubeus Hagrid', 'All Books', 'Y', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Gilderoy Lockheart', 'Less Than Half of Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Cedric Diggery', 'One Book', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Firenze', 'Less Than Half of Books', 'N', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Cho Chang', 'Less Than Half of Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Albus Severus Potter', 'One Chapter', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Dudley Dursley', 'Most Books', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Ginny Weasly', 'Most Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Nicolas Flamel', 'Referenced', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Petunia Dursley', 'Most Books', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Buckbeak', 'Less Than Half of Books', 'N', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) 38
  • 39. VALUES('Minerva McGonagall', 'All Books', 'Y', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Severus Snape', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Filius Flitwick', 'All Books', 'Y', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Pomona Sprout', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Headwig', 'All Books', 'N', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Dobby', 'Most Books', 'N', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Kreature', 'Less Than Half of Books', 'N', 'Y'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Draco Malfoy', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Lucius Malfoy', 'Most Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Mrs. Granger', 'Less Than Half of Books', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Mr. Granger', 'Less Than Half of Books', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Albus Dumbledore', 'Most Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Remus Lupin', 'Most Books', 'Y', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Sirius Black', 'Most Books', 'Y', 'Y', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature, School_Name_Visited) VALUES('Voldemort', 'All Books', 'Y', 'N', 'Hogwarts'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Damocles Belb', 'Referenced', 'Y', 'N'); INSERT INTO HP_CHARACTER (Character_Name, Character_Level_Of_Impact, Character_Human, Character_Creature) VALUES('Zygmunt Budge', 'Referenced', 'Y', 'N'); CREATE TABLE HP_LANGUAGE (Language_Name VARCHAR(50) NOT NULL, Character_Name VARCHAR(50) NOT NULL, Constraint HP_LANGUAGE_PK Primary Key (Language_Name, Character_Name), 39
  • 40. Constraint HP_LANGUAGE_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name) ); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Harry Potter'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Parseltongue', 'Harry Potter'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Hermione Granger'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Ron Weasly'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Rubeus Hagrid'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Giantish', 'Rubeus Hagrid'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Gilderoy Lockheart'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Cedric Diggery'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Firenze'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Centaurish', 'Firenze'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Cho Chang'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Albus Severus Potter'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Dudley Dursley'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Ginny Weasly'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Petunia Dursley'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('French', 'Nicolas Flamel'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Hippogriffish', 'Buckbeak'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Minerva McGonagall'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Severus Snape'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Filius Flitwick'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Goblin', 'Filius Flitwick'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Pomona Sprout'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Owl', 'Headwig'); 40
  • 41. INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Elfish', 'Dobby'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Dobby'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Elfish', 'Kreature'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Kreature'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Lucius Malfoy'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Draco Malfoy'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Mrs. Granger'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Mr. Granger'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Albus Dumbledore'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Remus Lupin'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Sirius Black'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Voldemort'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('Parseltongue', 'Voldemort'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Damocles Belb'); INSERT INTO HP_LANGUAGE (Language_Name, Character_Name) VALUES ('English', 'Zygmunt Budge'); CREATE TABLE HP_BOOK_APPEARED_IN (Book_Number INTEGER NOT NULL, Character_Name VARCHAR(50) NOT NULL, Constraint HP_BOOK_APPEARED_IN_PK Primary Key (Book_Number, Character_Name), Constraint HP_BOOK_APPEARED_IN_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name) ); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 41
  • 42. VALUES (5, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Harry Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Hermione Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Ron Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Rubeus Hagrid'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Gilderoy Lockheart'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 42
  • 43. VALUES (7, 'Gilderoy Lockheart'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Cedric Diggery'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Cedric Diggery'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Cho Chang'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Cho Chang'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Firenze'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Firenze'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Firenze'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Albus Severus Potter'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Dudley Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Ginny Weasly'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Nicolas Flamel'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 43
  • 44. VALUES (3, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Petunia Dursley'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Buckbeak'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Buckbeak'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Minerva McGonagall'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Severus Snape'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 44
  • 45. VALUES (5, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Filius Flitwick'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Pomona Sprout'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Headwig'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Dobby'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Dobby'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Dobby'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Dobby'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Kreature'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Kreature'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 45
  • 46. VALUES (3, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Draco Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Lucius Malfoy'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Mrs. Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Mr. Granger'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Albus Dumbledore'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Albus Dumbledore'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Albus Dumbledore'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Albus Dumbledore'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Albus Dumbledore'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Remus Lupin'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Remus Lupin'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Remus Lupin'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Remus Lupin'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Remus Lupin'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Sirius Black'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Sirius Black'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) 46
  • 47. VALUES (5, 'Sirius Black'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Sirius Black'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (1, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (2, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (3, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (4, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (5, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (7, 'Voldemort'); INSERT INTO HP_BOOK_APPEARED_IN (Book_Number, Character_Name) VALUES (6, 'Damocles Belb'); CREATE TABLE HP_MOVIE_APPEARED_IN (Movie_Number INTEGER NOT NULL, Character_Name VARCHAR(50) NOT NULL, Constraint HP_MOVIE_APPEARED_IN_PK Primary Key (Movie_Number, Character_Name), Constraint HP_MOVIE_APPEARED_IN_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name) ); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Harry Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 47
  • 48. VALUES (3, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Hermione Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Ron Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Rubeus Hagrid'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Gilderoy Lockheart'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Gilderoy Lockheart'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Cedric Diggery'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 48
  • 49. VALUES (8, 'Cedric Diggery'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Cho Chang'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Firenze'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Firenze'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Firenze'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Dudley Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Ginny Weasly'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Albus Severus Potter'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Petunia Dursley'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 49
  • 50. VALUES (3, 'Buckbeak'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Minerva McGonagall'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Severus Snape'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Filius Flitwick'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 50
  • 51. VALUES (1, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Pomona Sprout'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Headwig'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Dobby'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Dobby'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Kreature'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Kreature'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 51
  • 52. VALUES (7, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Draco Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Lucius Malfoy'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Mrs. Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Mr. Granger'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (1, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Albus Dumbledore'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Remus Lupin'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Remus Lupin'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Remus Lupin'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Remus Lupin'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Remus Lupin'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Sirius Black'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Sirius Black'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Sirius Black'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) 52
  • 53. VALUES (1, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (2, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (3, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (4, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (5, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (7, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (8, 'Voldemort'); INSERT INTO HP_MOVIE_APPEARED_IN (Movie_Number, Character_Name) VALUES (6, 'Damocles Belb'); CREATE TABLE HP_CHARACTER_PARENT (Child_Name VARCHAR(50) NOT NULL, Parent_Name VARCHAR(50) NOT NULL, Constraint HP_CHARACTER_PARENT_PK Primary Key (Child_Name, Parent_Name), Constraint HP_CHARACTER_PARENT_FK1 Foreign Key (Child_Name) References HP_CHARACTER (Character_Name), Constraint HP_CHARACTER_PARENT_FK2 Foreign Key (Parent_Name) References HP_CHARACTER (Character_Name) ); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Albus Severus Potter', 'Harry Potter'); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Albus Severus Potter', 'Ginny Weasly'); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Dudley Dursley', 'Petunia Dursley'); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Draco Malfoy', 'Lucius Malfoy'); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Hermione Granger', 'Mrs. Granger'); INSERT INTO HP_CHARACTER_PARENT (Child_Name, Parent_Name) VALUES ('Hermione Granger', 'Mr. Granger'); CREATE TABLE HP_HUMAN (Human_Name VARCHAR(50) NOT NULL, Human_Profession VARCHAR(50), Human_Type CHAR(1) Check (Human_Type IN('M', 'W')), Constraint HP_HUMAN_PK Primary Key (Human_Name), Constraint HP_HUMAN_FK1 Foreign Key (Human_Name) 53
  • 54. References HP_CHARACTER (Character_Name) ); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Harry Potter', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Hermione Granger', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Ron Weasly', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Rubeus Hagrid', 'Groundskeeper', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Gilderoy Lockheart', 'Teacher', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Cedric Diggery', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Cho Chang', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Albus Severus Potter', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Dudley Dursley', 'Student', 'M'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Ginny Weasly', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Nicolas Flamel', 'Writer', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Petunia Dursley', 'Homemaker', 'M'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Minerva McGonagall', 'Professor', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Severus Snape', 'Professor', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Filius Flitwick', 'Professor', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Pomona Sprout', 'Professor', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Draco Malfoy', 'Student', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Lucius Malfoy', 'Independently Wealthy', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Mrs. Granger', 'Dentist', 'M'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Mr. Granger', 'Dentist', 'M'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Albus Dumbledore', 'Headmaster', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Remus Lupin', 'Professor', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Sirius Black', 'Harrys Godfather', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) 54
  • 55. VALUES ('Voldemort', 'Dark Wizard', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Damocles Belb', 'Potioneer', 'W'); INSERT INTO HP_HUMAN (Human_Name, Human_Profession, Human_Type) VALUES ('Zygmunt Budge', 'Potioneer', 'W'); CREATE TABLE HP_MUGGLE (Muggle_Name VARCHAR(50) NOT NULL, Muggle_Citizenship VARCHAR(50), Constraint HP_MUGGLE_PK Primary Key (Muggle_Name), Constraint HP_MUGGLE_FK1 Foreign Key (Muggle_Name) References HP_HUMAN (Human_Name) ); INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship) VALUES ('Dudley Dursley', 'British'); INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship) VALUES ('Petunia Dursley', 'British'); INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship) VALUES ('Mrs. Granger', 'British'); INSERT INTO HP_MUGGLE (Muggle_Name, Muggle_Citizenship) VALUES ('Mr. Granger', 'British'); CREATE TABLE HP_WIZARD (Wizard_Name VARCHAR(50) NOT NULL, Wizard_Wand_Type VARCHAR(50), Wizard_Patronus VARCHAR(50), Wizard_Familiar_Type VARCHAR(50), Check (Wizard_Familiar_Type IN('Cat', 'Toad', 'Owl', 'Snake', 'Phoenix', 'Hound')), House_Name_Belongs_To VARCHAR(50), School_Name_Attended VARCHAR(50), Constraint HP_WIZARD_PK Primary Key (Wizard_Name), Constraint HP_WIZARD_FK1 Foreign Key (Wizard_Name) References HP_HUMAN (Human_Name), Constraint HP_WIZARD_FK2 Foreign Key (House_Name_Belongs_To) References HP_HOUSE (House_Name), Constraint HP_WIZARD_FK3 Foreign Key (School_Name_Attended) References HP_SCHOOL (School_Name) ); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Harry Potter', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Hermione Granger', 'Vine and Dragon Heartstring', 'Otter', 'Cat', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) 55
  • 56. VALUES ('Ron Weasly', 'Willow and Unicorn Hair', 'Terrier', 'Toad', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Rubeus Hagrid', 'Hound', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Gilderoy Lockheart', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Cedric Diggery', 'Ash and Unicorn Hair', 'Stag', 'Owl', 'Hufflepuff', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Cho Chang', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Ravenclaw', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Albus Severus Potter', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Ginny Weasly', 'Holly and Phoenix Feather', 'Stag', 'Owl', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended) VALUES ('Nicolas Flamel', 'Beauxbatons'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Minerva McGonagall', 'Cat', 'Cat', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended) VALUES ('Severus Snape', 'Doe', 'Slytherin', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended) VALUES ('Filius Flitwick', 'Non-Corporeal', 'Ravenclaw', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended) VALUES ('Pomona Sprout', 'Unicorporeal', 'Hufflepuff', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Draco Malfoy', 'Elm and Dragon Heartstring', 'Owl', 'Slytherin', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Lucius Malfoy', 'Elm and Dragon Heartstring', 'Peacock', 'Hound', 'Slytherin', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Albus Dumbledore', 'Elder Wand', 'Phoenix', 'Phoenix', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, House_Name_Belongs_To, School_Name_Attended) VALUES ('Remus Lupin', 'Cypress and Unicorn Hair', 'Wolf', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Patronus, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Sirius Black', 'Wood and Core', 'Dog', 'Hound', 'Gryffindor', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, Wizard_Wand_Type, Wizard_Familiar_Type, House_Name_Belongs_To, School_Name_Attended) VALUES ('Voldemort', 'Yew and Phoenix Feather', 'Snake', 'Slytherin', 'Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended) VALUES ('Damocles Belb','Hogwarts'); INSERT INTO HP_WIZARD (Wizard_Name, School_Name_Attended) 56
  • 57. VALUES ('Zygmunt Budge','Hogwarts'); ALTER TABLE HP_HOUSE Add Constraint HP_HOUSE_FK2 Foreign Key (Wizard_Name_In_Charge) References HP_WIZARD (Wizard_Name); CREATE TABLE HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name VARCHAR(50) NOT NULL, Muggle_Name VARCHAR(50) NOT NULL, Chapter_Last_Protected_By VARCHAR(20), Constraint HP_WIZARD_PROTECTS_MUGGLE_PK Primary Key (Wizard_Name, Muggle_Name), Constraint HP_WIZARD_PROTECTS_MUGGLE_FK1 Foreign Key (Wizard_Name) References HP_WIZARD (Wizard_Name), Constraint HP_WIZARD_PROTECTS_MUGGLE_FK2 Foreign Key (Muggle_Name) References HP_MUGGLE (Muggle_Name) ); INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Dudley Dursley', 'Book 5 Chapter 1'); INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By) VALUES ('Hermione Granger', 'Mrs. Granger', 'Book 7 Chapter 1'); INSERT INTO HP_WIZARD_PROTECTS_MUGGLE (Wizard_Name, Muggle_Name, Chapter_Last_Protected_By) VALUES ('Hermione Granger', 'Mr. Granger', 'Book 7 Chapter 1'); CREATE TABLE HP_WIZARD_PROTECTS_WIZARD (Wizard_Name VARCHAR(50) NOT NULL, Protector_Name VARCHAR(50) NOT NULL, Chapter_Last_Protected_By VARCHAR(50), Constraint HP_WIZARD_PROTECTS_WIZARD_PK Primary Key (Wizard_Name, Protector_Name), Constraint HP_WIZARD_PROTECTS_WIZARD_FK1 Foreign Key (Wizard_Name) References HP_WIZARD (Wizard_Name), Constraint HP_WIZARD_PROTECTS_WIZARD_FK2 Foreign Key (Protector_Name) References HP_WIZARD (Wizard_Name) ); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Ginny Weasly', 'Book 2 Chapter 17'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Cedric Diggery', 'Book 4 Chapter 31'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Draco Malfoy', 'Book 7 Chapter 31'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Hermione Granger', 'Book 5 Chapter 34'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Harry Potter', 'Ron Weasly', 'Book 5 Chapter 34'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Hermione Granger', 'Harry Potter', 'Book 5 Chapter 34'); 57
  • 58. INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Albus Dumbledore', 'Harry Potter', 'Book 5 Chapter 36'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Remus Lupin', 'Harry Potter', 'Book 5 Chapter 35'); INSERT INTO HP_WIZARD_PROTECTS_WIZARD (Wizard_Name, Protector_Name, Chapter_Last_Protected_By) VALUES ('Sirius Black', 'Harry Potter', 'Book 5 Chapter 35'); CREATE TABLE HP_CREATURE (Creature_Name VARCHAR(50) NOT NULL, Creature_Species VARCHAR(50), Constraint HP_CREATURE_PK Primary Key (Creature_Name), Constraint HP_CREATURE_FK1 Foreign Key (Creature_Name) References HP_CHARACTER (Character_Name) ); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Firenze', 'Centaur'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Buckbeak', 'Hippogriff'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Rubeus Hagrid', 'Giant'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Filius Flitwick', 'Goblin'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Dobby', 'Elf'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Kreature', 'Elf'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Headwig', 'Owl'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Minerva McGonagall', 'Cat'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Sirius Black', 'Dog'); INSERT INTO HP_CREATURE (Creature_Name, Creature_Species) VALUES ('Remus Lupin', 'Werewolf'); CREATE TABLE HP_WIZARD_OWNS_CREATURE (Wizard_Name VARCHAR(50) NOT NULL, Creature_Name VARCHAR(50) NOT NULL, Chapter_Last_Owned VARCHAR(20), Constraint HP_WIZARD_OWNS_CREATURE_PK Primary Key (Wizard_Name, Creature_Name), Constraint HP_WIZARD_OWNS_CREATURE_FK1 Foreign Key (Wizard_Name) References HP_WIZARD (Wizard_Name), Constraint HP_WIZARD_OWNS_CREATURE_FK2 Foreign Key (Creature_Name) References HP_CREATURE (Creature_Name) ); 58
  • 59. INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned) VALUES ('Rubeus Hagrid', 'Buckbeak', 'Book 3 Chapter 21'); INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned) VALUES ('Lucius Malfoy', 'Dobby', 'Book 2 Chapter 18'); INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned) VALUES ('Harry Potter', 'Headwig', 'Book 7 Chapter 4'); INSERT INTO HP_WIZARD_OWNS_CREATURE (Wizard_Name, Creature_Name, Chapter_Last_Owned) VALUES ('Harry Potter', 'Kreature', 'Book 7 Chapter 11'); CREATE TABLE HP_TEXT (Text_Title VARCHAR(50) NOT NULL, Text_Author VARCHAR(50), Text_Subject_Matter VARCHAR(50), Text_Style VARCHAR(50) Check(Text_Style IN('Poetry', 'Prose', 'Textbook', 'Journal')), Character_Name_Read VARCHAR(50), Wizard_Name_Enchanted VARCHAR(50), Constraint HP_TEXT_PK Primary Key (Text_Title), Constraint HP_TEXT_FK1 Foreign Key (Character_Name_Read) References HP_CHARACTER (Character_Name), Constraint HP_TEXT_FK2 Foreign Key (Wizard_Name_Enchanted) References HP_WIZARD (Wizard_Name) ); INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read) VALUES ('Advanced Potion-Making','Libatius Borage','Potions','Textbook','Harry Potter'); INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read) VALUES ('Magical Me','Gilderoy Lockhart','Autobiography','Journal','Harry Potter'); INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read) VALUES ('Snape: Scoundrel or Saint?','Rita Skeeter','Biography','Textbook','Harry Potter'); INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read, Wizard_Name_Enchanted) VALUES ('The Journal of Tom Riddle', 'Tom Riddle', 'Magical Secrets', 'Journal', 'Ginny Weasly', 'Voldemort'); INSERT INTO HP_TEXT (Text_Title, Text_Author, Text_Subject_Matter, Text_Style, Character_Name_Read, Wizard_Name_Enchanted) VALUES ('The Half-Blood Prince', 'Severus Snape', 'Hints in Potions and Spells', 'Prose', 'Harry Potter', 'Severus Snape'); CREATE TABLE HP_ENCHANTED_ITEM (Item_Name VARCHAR(50) NOT NULL, Item_Enchantment VARCHAR(50), Item_Type VARCHAR(50), Constraint HP_ENCHANTED_ITEM_PK Primary Key (Item_Name) ); INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type) VALUES ('Enchanted Galleon','Communication Charm','Galleon'); INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type) VALUES ('Howler','Charm to amplify senders voice','Blood-red Letter'); 59
  • 60. INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type) VALUES ('Deluminator','Absorb Energy','Cigarette Lighter'); INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type) VALUES ('Opal Necklace','Lethal','Necklace'); INSERT INTO HP_ENCHANTED_ITEM (Item_Name, Item_Enchantment, Item_Type) VALUES ('Elder Wand','Most Powerful Wand','Wand'); CREATE TABLE HP_CHARACTER_ENCHANTED_ITEM (Character_Name VARCHAR(50) NOT NULL, Item_Name VARCHAR(50) NOT NULL, Chapter_Last_Owned VARCHAR(20), Constraint HP_CHARACTER_ENC_ITEM_PK Primary Key (Character_Name, Item_Name), Constraint HP_CHARACTER_ENC_ITEM_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name), Constraint HP_CHARACTER_ENC_ITEM_FK2 Foreign Key (Item_Name) References HP_ENCHANTED_ITEM (Item_Name) ); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Harry Potter','Enchanted Galleon','Book 5 Chapter 20'); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Ron Weasly','Deluminator','Book 7 Chapter 22'); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Draco Malfoy','Opal Necklace','Book 6 Chapter 15'); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Ron Weasly','Howler','Book 3 Chapter 5'); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Albus Dumbledore','Elder Wand','Book 6 Chapter 32'); INSERT INTO HP_CHARACTER_ENCHANTED_ITEM (Character_Name, Item_Name, Chapter_Last_Owned) VALUES ('Harry Potter','Elder Wand','Book 7 Chapter 31'); CREATE TABLE HP_SPELL (Spell_Name VARCHAR(50) NOT NULL, Spell_Type VARCHAR(50), Spell_Result VARCHAR(50), Spell_Method_Of_Casting VARCHAR(100), Constraint HP_SPELL_PK Primary Key (Spell_Name) ); INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result) VALUES ('Petrificus Totalus','Hex','Paralyses'); INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting) VALUES ('Lumos','Charm','Generate Light','Wave Hand in Front of Wand'); INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting) VALUES ('Expelliarmus','Battle','Disarms Opponent','Point and Shout'); INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result) VALUES ('Stupefy','Battle','Knock Out Opponent'); 60
  • 61. INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting) VALUES ('Wingardium Leviosa','Utility','Levitate','A Swish and a Flick'); INSERT INTO HP_SPELL (Spell_Name, Spell_Type, Spell_Result, Spell_Method_Of_Casting) VALUES ('Avada Kadavra','Hex','Death','Heart Filled With Hate'); CREATE TABLE HP_CHARACTER_SPELL (Character_Name VARCHAR(50) NOT NULL, Spell_Name VARCHAR(50) NOT NULL, Chapter_Of_Last_Casting VARCHAR(20), Constraint HP_CHARACTER_SPELL_PK Primary Key (Character_Name, Spell_Name), Constraint HP_CHARACTER_SPELL_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name), Constraint HP_CHARACTER_SPELL_FK2 Foreign Key (Spell_Name) References HP_SPELL (Spell_Name) ); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Harry Potter','Expelliarmus','Book 7 Chapter 36'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Albus Dumbledore','Lumos','Book 6 Chapter 26'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Draco Malfoy','Petrificus Totalus','Book 6 Chapter 4'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Hermione Granger','Stupefy','Book 7 Chapter 34'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Hermione Granger','Wingardium Leviosa','Book 1 Chapter 8'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Harry Potter','Wingardium Leviosa','Book 1 Chapter 8'); INSERT INTO HP_CHARACTER_SPELL (Character_Name, Spell_Name, Chapter_Of_Last_Casting) VALUES ('Voldemort','Avada Kadavra','Book 7 Chapter 33'); CREATE TABLE HP_NOTABLE_FOOD (Food_Name VARCHAR(50) NOT NULL, Food_Enchantment VARCHAR(50), Food_Type VARCHAR(50), Constraint HP_NOTABLE_FOOD_PK Primary Key (Food_Name) ); INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type) VALUES ('Chocolate Frogs','Frogs Come Alive', 'Chocolate'); INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type) VALUES ('Fainting Fancies','Charm to Make the Eater Faint', 'Candy'); INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Enchantment, Food_Type) VALUES ('Bertie Botts Every Flavor Beans','Charmed to Have Good and Awful Flavors','Candy'); INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Type) VALUES ('Butterbeer', 'Drink'); INSERT INTO HP_NOTABLE_FOOD (Food_Name, Food_Type) VALUES ('Treacle Tart', 'Sweet Pastry'); 61
  • 62. CREATE TABLE HP_WHERE_TO_OBTAIN_FOOD (Food_Name VARCHAR(50) NOT NULL, Food_Location VARCHAR(50) NOT NULL, Constraint HP_WHERE_TO_OBTAIN_FOOD_PK Primary Key (Food_Name, Food_Location), Constraint HP_WHERE_TO_OBTAIN_FOOD_FK1 Foreign Key (Food_Name) References HP_NOTABLE_FOOD (Food_Name) ); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Chocolate Frogs','Hogwarts Train'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Chocolate Frogs','Hogsmeade'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Fainting Fancies','Fred and George Joke Shop'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Bertie Botts Every Flavor Beans','Hogwarts Train'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Bertie Botts Every Flavor Beans','Hogsmeade'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Butterbeer','Hogsmeade'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Butterbeer','Hogwarts'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Treacle Tart','Hogwarts'); INSERT INTO HP_WHERE_TO_OBTAIN_FOOD (Food_Name, Food_Location) VALUES ('Treacle Tart','The Dursley Home'); CREATE TABLE HP_CHARACTER_FOOD (Character_Name VARCHAR(50) NOT NULL, Food_Name VARCHAR(50) NOT NULL, Chapter_Last_Eaten_By VARCHAR(20), Constraint HP_CHARACTER_FOOD_PK Primary Key (Character_Name, Food_Name), Constraint HP_CHARACTER_FOOD_FK1 Foreign Key (Character_Name) References HP_CHARACTER (Character_Name), Constraint HP_CHARACTER_FOOD_FK2 Foreign Key (Food_Name) References HP_NOTABLE_FOOD (Food_Name) ); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Harry Potter','Chocolate Frogs','Book 1 Chapter 3'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Ron Weasly','Chocolate Frogs','Book 1 Chapter 3'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Ron Weasly','Bertie Botts Every Flavor Beans','Book 1 Chapter 3'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Harry Potter','Fainting Fancies','Book 6 Chapter 4'); 62
  • 63. INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Harry Potter','Butterbeer','Book 5 Chapter 20'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Hermione Granger','Butterbeer','Book 5 Chapter 20'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Ron Weasly','Butterbeer','Book 5 Chapter 20'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Sirius Black', 'Treacle Tart', 'Book 4 Chapter 4'); INSERT INTO HP_CHARACTER_FOOD (Character_Name, Food_Name, Chapter_Last_Eaten_By) VALUES ('Albus Dumbledore','Bertie Botts Every Flavor Beans','Book 1 Chapter 18'); CREATE TABLE HP_POTION (Potion_Name VARCHAR(50) NOT NULL, Wizard_Name_Inventor VARCHAR(50), Constraint HP_POTION_PK Primary Key (Potion_Name), Constraint HP_POTION_FK1 Foreign Key (Wizard_Name_Inventor) References HP_WIZARD (Wizard_Name) ); INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor) VALUES ('Wolfsbane Potion', 'Damocles Belb'); INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor) VALUES ('Felix Felicis', 'Zygmunt Budge'); INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor) VALUES ('Doxycide Potion', 'Zygmunt Budge'); INSERT INTO HP_POTION (Potion_Name, Wizard_Name_Inventor) VALUES ('Laughing Potion', 'Zygmunt Budge'); INSERT INTO HP_POTION (Potion_Name) VALUES ('Forgetfulness Potion'); INSERT INTO HP_POTION (Potion_Name) VALUES ('Polyjuice Potion'); CREATE TABLE HP_POTION_INGREDIENT (Potion_Ingredient_Name VARCHAR(50) NOT NULL, Potion_Ingred_Loc_Found VARCHAR(50), Constraint HP_POTION_INGREDIENT_PK Primary Key (Potion_Ingredient_Name) ); --Wolfbane potion INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Aconite','Wild Places'); --Felix felicis INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Ashwinder Egg','Ashwinder'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Squill Bulb','Muggle Homes'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Murtlap Tentacle','Coastal Areas of Britain'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) 63
  • 64. VALUES ('Tincture of Thyme','Wild Places'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Occamy Eggshell','Occamy'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Powdered Common Rue','Mediterranean, Macaronesia and southwest Asia'); --Doxycide INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Bundimun Ooze','Worldwide.'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Streeler Shells','Africa, Europe, Asia, North America'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Dragon Liver','Dragon liver'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Hemlock Essence','Wild Places'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Tormentil Tincture','Wild Places'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Cowbane Essence','Wild Places'); --Laughing potion INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Spring Water','Worldwide'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Alihotsy Leaves','Hyena tree'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Billywig Wings','Australia'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Knarl Quills','North Europe, North America'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Puffskein Hair','Worldwide'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Horseradish Powder','Wild Places'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Laughter','Worldwide'); --Forgetfullness Potion INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Lethe River Water','River Lethe'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Valerian Sprigs','Hargrids Garden'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Standard Ingredient','Wild Places'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Mistletoe Berry','Worldwide'); --PolyJuice Potion INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Lacewing Flies','Worldwide'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Leeches','Worldwide'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) VALUES ('Powdered Bicorn Horn','Snapes Office'); INSERT INTO HP_POTION_INGREDIENT (Potion_Ingredient_Name, Potion_Ingred_Loc_Found) 64