Harry Potter Database Instructions X
Harry Potter Database Instructions X
Harry Potter Database Instructions X
For the Harry Potter database, you will create and customize objects in
Microsoft Access.
What is the name of
Mr. Filch's cat? The objects include:
1. Tables
2. Forms
3. Queries
4. Reports
Task to Complete:
Open the Harry Potter Database & look over to the left of the screen.
You will see “Objects”. Presently there are:
4 Tables
1 Query
Note – To the left of the screen, under “View”, click the down arrow next to “All Access Objects”
and select “All Access Objects” if you cannot view all objects at once.
ACCESS TABLES
HARRY POTTER Access Tables are made up of fields. Each field is made up of
TRIVIA: properties. Several field properties include:
Data Type – indicates what type of data the field will store
Example: short text, number, date, currency
What did Dumbledore
Field Size – indicates how many characters can be stored in the
leave in his will for
field
Ron?
Input Mask – allows the designer to state how the data will be
stored. This can be important for phone numbers.
Display Control – determines if the data will be entered without
restrictions or if a user must choose from a list.
Most tables have 1 primary key. A primary key will ensure all rows of data will be unique in a table. A primary key
can be important in queries. It can help prevent duplicate rows of data.
Task to Complete:
Open the Harry Potter Database & open the Characters table in Design View. Click on the
ID field. Review the ID field properties
1. Primary Key – ID is the primary key for the Characters table. The table will assign a unique number for each
row. This is to ensure each row is unique. A primary key is not imperative for this table because each
character will have different names. The key icon to the left of ID indicates it is the primary key.
2. Data Type – ID is an autonumber. Access will automatically assign each row a unique number.
3. Field Size – Long Integer
4. New Values – Access will increment the ID by 1. A user will not have to enter the number.
5. Caption – This property allows the designer to decide the label that will appear on forms, queries, and
reports. This value is blank for ID so it will default to ID.
6. Indexed – This value defaulted to “Yes”.
Now click on FirstName field and see how the field properties are
different than the ID field.
Task to Complete:
1. Open the Harry Potter Database
2. Double Click on Characters table
3. If necessary, change the view to Datasheet View
On the upper-left side of the screen, select “View”
Select “Datasheet view”
4. In ID 15 type the following Data in the corresponding fields
LastName: Weasley
PureBlood: Yes
Total Points: 10
TASK 2 OF 2 – CREATE A TABLE
Create a table in the Harry Potter Database
Requirements:
1. Table should have at least4 fields (including a primary key)
2. 5 rows of data
You can create your own table or you can create the following table:
Fields:
1. ID (Primary Key - this can be an autonumber)
2. PatronusForm
3. NoteableCharacter (can you make this pull from the Characters Table? – not required)
4. Notes
5 rows of data:
Row 1 ID: (Autonumber)
PatronusForm: Phoenix
NoteableCharacter: Albus Dumbledore
Notes: loyalty of bird must be won
Row 2 ID: (Autonumber)
PatronusForm: Otter
NoteableCharacter: Hermione Granger
Notes: The only spell Hermione has trouble with
Row 3 ID: (Autonumber)
PatronusForm: Stag
NoteableCharacter: Harry Potter
Notes: Same patronus as his father
Row 4 ID: (Autonumber)
PatronusForm: Hare
NoteableCharacter: Luna Lovegood
Notes: Used in Battle of Hogwarts
Row 5 ID: (Autonumber)
PatronusForm: cat
NoteableCharacter: Professor McGonagall
Notes: Sent patronus for help when Hogwarts was under attack
A primary key is important for this table because there can be duplicate Patronus. For example, a
stag could belong to Harry Potter and his father.
Total Points: 20
FORMS
HARRY POTTER EDITION
ACCESS FORMS
HARRY POTTER Forms are not necessary in Access, but they are extremely helpful. Data can
TRIVIA QUOTE:
be added directly into a table where it is stored, but it is easier to enter data
into a form. A user can type the data into a form and the data will be stored
What is the name of in a table.
the Weasley that
works with dragons? Forms are a benefit of Access that Excel spreadsheets do not have.
PROJECT 2 - FORMS
HARRY POTTER EDITION
For this task add the OutstandingStudent data using the HouseForm:
House: Gryffindor
OutstandingStudent: Harry Potter
House: Hufflepuff
OutstandingStudent: Cedric Diggory
House: Ravenclaw
OutstandingStudent: Luna Lovegood
House: Slytherin
OutstandingStudent: Draco Malfoy
QUERIES
HARRY POTTER
TRIVIA: A query is a small copy of a table or tables. Queries “ask” table(s) specific
questions about the data.
Task to Complete:
1. Open the Harry Potter Database
2. Double Click on the HouseNameQuery
Question: HouseNamesQuery only has 1 column of data. Any idea why or where this
query is being used?
Answer: This query is being used in the Characters Table in the House field. This field is a
combo box that restricts a user to only choose data from this query. Sometimes it is easier to
use a simple query than use a table.
PROJECT 3 - QUERIES
HARRY POTTER EDITION
REPORTS
HARRY POTTER
TRIVIA: Reports are similar to forms. A form makes a table easier to
understand; a report just makes a query easier to understand.
What is the name of A report just formats a query so it looks nice.
the platform the
Hogwarts Express
leaves from?
PROJECT 4 - REPORTS
HARRY POTTER EDITION