Академический Документы
Профессиональный Документы
Культура Документы
Objectives
• Give examples of jobs, salaries, and opportunities that are possible by
participating in the Academy
• Explain how your participation in the Academy can help you take
advantage of these opportunities
Try It / Solve It
1. This activity aims to develop your skills for locating, evaluating, and
interpreting IT career information. Use Internet resources provided by your
teacher to identify a specific job that interests you in the IT career field. Then,
answer the following:
2. Describe how taking one of the Academy courses and earning a certification
exam could help prepare you for a job in that career field.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners. 1
Section 1 Lesson 2: Data vs. Information
Objectives
• Distinguish between data and information, and provide examples of each
• Describe and give an example of how data becomes information
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. List specific data that the school collects about each student. What information could
be gathered using all the student data?
a. Write examples of data and information related to the site you choose.
b. State why you believe data collections of this type could be important.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. Choose a website that displays data that might be stored in a database; find 10 data
items on the site and list 5 pieces of information that could be gleaned from the data.
4. Give examples of how data becomes information for these two industries:
• film/movie
• hospital/healthcare
5. Using this Lunch Room Data Report, answer the questions that follow.
c. What information does this table provide from the data collected?
d. How do you think this information is used by those reading the report?
f. Generate at least two questions that you would ask about the data provided.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 1 Lesson 3: History of the Database
Objectives
• Describe the evolution of the database and give an example of its role in the
business world
• Name important historical contributions in database development and design
• List and explain the three steps in the database development process
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Complete the diagram by listing the important events in the evolution of the database.
Draw a line from each event to the era in which it falls.
2. True or False: The Personal Digital Assistant (PDA) was an important historical
contribution in database development and design
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners. 1
3. Name two important historical contributions in database development and design.
4. If Building the database is the third major task in the database development process,
then what are the first two major tasks?
5. (Optional) List at least three timeline events in the evolution of the database.
6. (Optional) To most of us, the Internet has become an essential element in the way we
communicate, the way we do business, and the way we learn. Surprisingly, few people
really know the names of the people and the events that have contributed to its
phenomenal growth.
In this activity, you and your classmates will construct a wall mural timeline of the
major historical events in Internet history. Using Internet resources, your group will be
assigned one topic from the research list below. Your group's task is to gather
information to add to the classroom timeline:
Find at least four events that illustrate your topic. Each event must have a person,
place, and/or thing associated with it. Add your group's information to the timeline.
Research List:
• Historical thinkers: people without whose inventions computers and
communication as we know it today could not be possible
• Enablers: universities, government agencies, and businesses that contributed to
the idea of the Internet and birth of the Internet
• Communicators: people who developed computer languages, computer
networks, and the technology for one computer to communicate with another
• Innovators: people and businesses that enabled the average person to be able
to use a computer and communicate on the Internet
• Movers and shakers: people and companies that transformed the Internet into a
virtual mall of information and services
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners. 2
Section 1 Lesson 4: Major Transformations in Computing
Objectives
• List the major transformations in computing that have occurred since the
1970’s
• Define and give examples of these terms: hardware, operating system,
software
• Identify examples of e-businesses that use database software and explain
how it is essential to their success
• Explain the overall mission of the Oracle Corporation
Vocabulary
Identify the vocabulary word for each definition below.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Try It / Solve It
b. Operating system
c. Software
3. List three e-businesses that use database software and describe how the
database software is being used.
4. Write down the steps of a simple credit-card transaction. How many places
does the information go, and what happens if the transaction is not complete
at any one of the steps? What role does a database play in this process?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Section 2 Lesson 1: Conceptual and Physical Models
Objectives
• Describe the importance of describing information requirements
• Distinguish between a conceptual model and its physical implementation
• List five reasons for building a conceptual data model
• List examples of conceptual models and physical models
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
• One student describes his/her “dream house” while the other student
attempts to draw it.
You can discuss specific details, but the student describing the house is
not allowed to see what is being drawn until after time is called.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
2. Review the scenario below. Identify the conceptual model and the physical
model from the scenario.
Zoe was about to go into a store to purchase drinks for the birthday party
scheduled for that evening. Zoe knows that she needs drinks for 48
people and is expecting the store to accept a check for payment and to
provide her with some assistance carrying the product to her car. Zoe
wants to have carbonated drinks, non-carbonated drinks, and sugar free
drinks. She is expecting to purchase eight six-packs. Zoe enters the store
and discovers the entire drink distribution system is automated. She also
discovers that the drinks come in varying package sizes and that she must
choose the correct vending option for the products to be disbursed. Drinks
are packaged in four-packs, six-packs, and ten-packs.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Section 2 Lesson 2: Entities, Instances, Attributes, and
Identifiers
Objectives
• Define and give an example of an entity
• Distinguish between an entity and an instance of an entity
• Name and describe attributes for a given entity
• Distinguish between an attribute and its value
• Distinguish between mandatory and optional attributes, and between
volatile and nonvolatile attributes
• Select and justify a unique identifier (UID) for an entity
Vocabulary
Identify the vocabulary word for each definition below.
Required
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Try It / Solve It
1. Consider the entity STUDENT. You are all students in a class. However,
each one of you is a unique instance of that entity. Your teacher will lead you
through an exercise to demonstrate this.
2. Think about the last time you went to get a haircut, permanent, manicure, or
other service from a barbershop or hair salon.
Discuss the business of a barbershop or hair salon. Name the entities that are
the “main things” about this business. Give examples of instances for each
entity.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
4. The goal of this practice is to recognize attributes for an entity.
The three entities that play a role in a DJ business: SONG, EVENT, and
CUSTOMER are listed as the first three column headings of the table below.
The fourth column contains a collection of attributes. Use a check mark to
indicate if the attribute listed could be an attribute for the entities listed. (For
example, could Title be an attribute for Song, for Event, and for Customer?)
5. From the list of attributes provided, identify which attribute could be the
unique identifier of each entity.
Entity: STUDENT
Attributes: student id, first name, last name, address
Entity: MOVIE
Attributes: title, date released, producer, director
Entity: LOCKER
Attributes: size, location, number
6. Read the given business scenario and walk through the steps below.
“I’m the owner of a small movie rental store. We have over 3,000 movies
that we need to keep track of.
“Each of our movies has a DVD or VHS tape number. For each movie, we
need to know its title and category (e.g., comedy, suspense, drama,
action, war, or sci-fi).
“We give each movie a specific ID, and then track which DVD or VHS
contains the movie. A movie can be either DVD or VHS format.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
“We always have at least one DVD or VHS tape for each movie we track,
and each DVD or VHS tape is always a copy of a single, specific movie.
“Our DVDs and VHS tapes are very long. We don’t have any movies that
require multiple DVDs or VHS tapes.”
“We are frequently asked for movies starring specific actors. John Wayne
and Julia Roberts are always popular. So we’d like to keep track of the
star actors appearing in each movie. Not all of our movies have star
actors. Customers like to know each actor’s “real” birth name and date of
birth. We track only actors who appear in the movies in our inventory.”
“We have lots of customers. We rent videos only to people who have
joined our ‘video club.’ To belong to our club, they must have good credit.
For each club member, we’d like to keep their first and last name, current
phone number, and current address. And, of course, each club member
has a membership number.
“Then we need to keep track of what movie each customer currently has
checked out. A customer may check out multiple video tapes at any given
time. We just track current rentals. We don’t keep track of any rental
histories.”
We are a small fast food business. Our menu features food items that can
be ordered by a customer. A customer places an order at the counter and
indicates what food items he/she would like on that order.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
a. Using the restaurant entities ORDER, FOOD ITEM, AND CUSTOMER,
identify the attributes for each entity.
b. Where possible, indicate whether the attribute is mandatory or optional.
c. Where possible, pick out the UIDs for each entity
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Section 2 Lesson 3: Entity Relationship Modeling and ERDs
Objectives
• Define the meaning of implementation-free as it relates to data models and
database design implementation
• List the four goals of entity relationship modeling
• Identify an entity relationship diagram (ERD)
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 3 Lesson 1: Identifying Relationships
Objectives
• Interpret and describe relationship optionality
• Interpret and describe relationship cardinality
• Relate entities by applying the rules of cardinality and optionality
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Read the given business scenario. Name the relationships between EMPLOYEE
and JOB. Include appropriate optionality and cardinality.
“We have a lot of employees who handle one or more different jobs. We’d like to
keep track of who is working on which job. Although employees can help each
other, a job is assigned to one employee and is the ultimate responsibility of that
employee. All of our employees have at least one job. However, jobs exist that
are not yet assigned to anyone.”
2. Read the given business scenario. Name the relationships between ORDER and
WAITER. Include the appropriate optionality and cardinality.
“We assign our waiters to certain areas, except for our trainees who just observe
and are not responsible for taking any orders yet. A waiter takes the orders for
the tables in his area. All areas have one assigned waiter. A customer places an
order with a waiter. If the customer has a question or wants to make a change to
the order, he needs to request this with the assigned waiter.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. Read the given business scenario. Name the relationships between PARENT
and CHILD. Include the appropriate optionality and cardinality.
“At the end of each day, parents need to pick up their children at our day-care
center. All children must be picked up by 6 p.m. A child may have two parents,
but we need only one of them to come and pick up the child. We cannot release
a child to anyone but that child’s parent.”
4. Read the given business scenario. Name the relationships between TEACHER
and STUDENT. Include the appropriate optionality and cardinality.
“Some students request remedial help in certain subjects, such as math. We can
assign a tutor who can work with the student after class. Some of our teachers
agree to be tutors. If several students need tutoring in one subject, then we
assign them to the same teacher. If a student needs tutoring in several subjects,
then he will probably be assigned to several different tutors.”
5. Draw two entities that you are familiar with from your own experience (use
colored pens and markers on hand). Write down the relationships between these
two entities, including cardinality and optionality. Share your entities with the
class.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 3 Lesson 2: ER Diagramming Conventions
Objectives
• Construct ER diagram components that represent entities and attributes according
to diagramming conventions
Vocabulary
Identify the vocabulary word for the definition below.
Try It / Solve It
1. Read the given business scenario. Draw the entities HAIRSTYLIST and CLIENT. List
the attributes associated with each entity and specify whether they are mandatory or
optional. Identify the UIDs. Write out the relationship in English, including optionality
and cardinality. Follow the diagramming conventions discussed.
“In our salon, we have a number of hairstylists. They are all salaried employees, so
we keep a record of their first name, last name, address, phone number, social-
security number, and salary. During the course of a day, a hairstylist may see
several clients. On a slow day, a hairstylist may not work on anyone at all. We have
several walk-in clients, and they each get assigned to one hairstylist. We just ask
for their first name. We also have customers who call to make an appointment.
When they do this, we ask for their first name, last name, and phone number. We
also ask if they would like a specific hairstylist. If they have no preference, we
assign one for them. Of course, they are allowed to switch to another hairstylist for
their next visit to the salon. We are interested in tracking the daily appointments --
which stylist works on which client during a given day.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Read the given business scenario. Draw the entities BAND and MUSICIAN. List the
attributes underneath each entity. Specify whether they are mandatory or optional.
Identify the UIDs. Write out the relationship in English, including optionality and
cardinality.
3. Read the given business scenario. Draw the entities TEACHER and COURSE and
CLASS. List the attributes underneath each entity. Specify whether they are mandatory
or optional. Identify the UIDs. Write out the relationship in English, including optionality
and cardinality.
“We have several teachers at our school. A teacher can be assigned up to three
classes per semester. If a teacher is on sabbatical, he doesn’t teach that semester.
We keep a record of the teacher’s first name, last name, address, phone number,
and email address.”
“Our school offers many courses -- such as Data Modeling, Introduction to SQL,
Trigonometry, Physics, and Biology. Each course has a code. For example: Data
Modeling would be DM001, Trigonometry would be TR004, etc. During each
semester, a course may be taught in several classes -- so there could be two
classes of Physics, three classes of Biology, etc. Each class can be taught by only
one teacher. We assign a unique ID for each class, and we also keep track of the
day it is taught, the time, and the classroom.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 3 Lesson 3: Speaking ERDish and Drawing Relationships
Objectives
• State relationships between entities in precise words (ERDish)
• Draw and label relationships correctly on an ERD
Vocabulary
Identify the vocabulary word for the definition below.
Try It / Solve It
1. The goal of this practice is to read a relationship. Which text corresponds to the diagram?
4. Read the relationship in the diagram below. Write the ERD statement for the relationship.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
5. Read each relationship in the model below. For each relationship, write the ERD
statement and your comments. Use your knowledge of normal people and towns in your
comments.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 3 Lesson 4: Matrix Diagrams
Objectives
• Identify relationships using a matrix diagram
• Draw an ERD from a matrix diagram
Vocabulary
Identify the vocabulary word for the definition below.
Try It / Solve It
1. Read the business scenario and review the ERD. Using the matrix diagram, make up two
or more possible relationships between PHOTOGRAPH and the other entities that make
sense for the business.
“I’m an amateur photographer. I own several cameras and am always taking pictures
of different subjects. I’m trying to keep track of which camera and type of film perform
best under certain conditions—indoor light, outdoor light, etc.—so when I have my
films developed, I note down which camera I used. When the pictures come back, I
note the subject and conditions. Each picture always features one subject. A subject
could be a view, a person or group of persons, or an object or group of objects.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
CAMERA PHOTOGRAPH SUBJECT
CAMERA
PHOTOGRAPH
SUBJECT
2. Complete the matrix diagram below, and construct an ERD from it.
City For
Race
Race Type
Running
Event
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Section 4 Lesson 1: Supertypes and Subtypes
Objectives
• Define and give an example of a subtype
• Define and give an example of a supertype
• State the rules relating to entities and subtypes; give examples of each
• Apply the rules of supertype and subtype by evaluating the accuracy of ER diagrams
that represent them
• Apply the rules of supertype and subtype and include them in a diagram when
appropriate
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Identify the supertype and the subtypes of the entity listed below.
Amputation = _____________________
Visual Impairment = _____________________
Hearing Impairment = _____________________
Disability = _____________________
Paralysis = _____________________
2. For each rule, indicate whether the rule is applicable to supertypes or subtypes.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
3. Name three things you consider when modeling supertypes and subtypes.
4. Find the incorrect subtypes in the illustration. Explain why you think the subtype is
incorrect. Adjust the model to improve it.
5. Read the following scenario and construct an ERD that contains at least two subtypes of
the entity PRODUCT. Show clearly which attributes belong to the entity supertype, and
which belong to the subtypes. Identify a UID for the entity.
“Our shops sell several kinds of women’s clothing, including dresses, skirts and
blouses. Of course each product has a name, a description, and a price. Oh, and
sizes too: all products have a waist size. Dresses and skirts have a hem length but
blouses don’t. Dresses and blouses have a chest size, but skirts don’t.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Section 4 Lesson 2: Documenting Business Rules
Objectives
• Define and compose a structural business rule
• Define and compose a procedural business rule
• Recognize that some business rules will require programming
• Diagram business rules when they can be represented in an ER model
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Members of your design team have been working with the local hospital to develop a data
model for their need to store information about patients, the patient's room number, the
patient's doctor, drug prescriptions given, and specific drug information.
However, they all went on vacation and left you to figure out the model. They also failed to
give you any of their documentation other than the entities and attributes illustrated here.
Instead of going back to the hospital, which could reflect poorly on your company, you’re
going to have to think about everything you know about hospitals!
Your task is to generate a list of business rules you think were used to arrive at the
information shown here. Use your imagination. List 10 structural rules, 5 procedural rules,
and 2 programmatic rules (rules to be addressed by computer applications in the future).
State each rule as a single sentence.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Section 5 Lesson 1: Relationship Transferability
Objectives
• Describe and give an example of relationship transferability
• Understand the difference between transferable and nontransferable relationships
• Illustrate nontransferable relationships on ERDs
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Draw ERDs for each of the following. Draw softboxes, relationship lines, and labels for
each relationship in both directions. Indicate non-transferability when appropriate.
a. Each town may be the birthplace of many people. Each person must be born in one
and only one town.
b. Each room may house one or more guests. Each guest may stay in one and only one
room.
c. Each employee must work for one and only one department. Each department may
have one or more employees.
d. Each hotel may be the host of one or more guests. Each guest may be hosted in one
or more hotels.
e. Each message must be addressed to one or more persons. Each person may be the
addressee of one or more messages.
f. Each garment must have one and only one price. Each price may be for one or more
garments.
g. Each airline coupon must be used for one and only one destination. Each destination
may be visited with one or more coupons.
h. Each automobile must use one and only one tire size. Each tire size may be used by
one or more automobiles.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
i. Each child must have one and only one mother. Each mother must be the parent of
one or more children.
j. Each person must be of one and only one blood type. Each blood type may classify
one or more persons.
k. A person may be on one or more junk-mail lists. Each junk list may contain one or
more persons.
l. Each student may learn from one or more teachers. Each teacher may educate one or
more students.
m. Each school may be attended by one or more honor students. Each honor student
must attend one and only one school.
n. Each fingerprint must belong to one and only one person. Each person must have one
and only one fingerprint.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 5 Lesson 2: Relationship Types
Objectives
• Recognize and give examples of a one-to-one relationship
• Recognize and give examples of a one-to-many relationship
• Recognize and give examples of a many-to-many relationship
• Recognize redundant relationships and remove them from the ERD
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
Type Statement
A snowboard instructor may instruct one or more
snowboarders
A bicycle may be owned by a child
Classroom crayons may be used by students in a classroom
A passport belongs to a person
A female elephant gives birth to an elephant
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. Draw an entity relationship diagram to represent the following:
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 5 Lesson 3: Resolving Many-to-Many Relationships
Objectives
• Identify attributes which belong to many-to-many relationships
• Demonstrate the steps to resolve a many-to-many relationship using an intersection
entity
• Identify the UID of an intersection entity and represent it in the entity relationship
diagram
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Resolve the M:M between TEACHER and CLASS as well as INTERPRETER and
LANGUAGE. For each intersection entity, think of additional attributes like a UID.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 5 Lesson 4: Understanding CRUD Requirements
Objectives
• Create ER models that reflect all business rules gathered during the interview process
• Identify the create, retrieve, update, and delete (CRUD) requirements of the business
• Validate your ER model by performing a CRUD analysis
Vocabulary
Part One: Define the vocabulary words below.
1. Consultant
2. Functions
3. Obsolete
4. CRUD analysis
Part Two: Based on the lecture, list the tasks that will apply to the parts of CRUD analysis.
(Examples: bring up, find, modify, read, etc.)
1. Create
2. Retrieve
3. Update
4. Delete
Alter
Bring up
Change
Discard
Enter
Find
Import
Input
Load
Look up
Modify
Print
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Purge
Read
Record
Remove
Report
Trash
View
Try It / Solve It
b. Retrieve:
c. Update:
d. Delete:
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 6 Lesson 1: Artificial, Composite, and Secondary UIDs
Objectives
• Define the different types of unique identifiers (UIDs)
• Define a candidate UID and explain why an entity can sometimes have more than one
candidate UID
• Analyze business rules and choose the most suitable primary UID from the candidates
• Recognize and discuss the issues of identification in the real world
Vocabulary
Identify the vocabulary word for each definition below.
Unique identifier
A UID that does not occur in the natural world but is created for
identification purposes in a system
One of several UIDs that could identify something
Try It / Solve It
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Consider an entity for Library Member. Sometimes an entity can have more than one
candidate UID. Describe a scenario where you would want more than one candidate UID
for a Library Member – why would you want to find the member in the database using
alternative information?
3. Describe how you would identify the entities listed below, making up any attributes and
relationships you consider appropriate. For example, for the Student entity you may say
that the UID is comprised of the first name, last name, and address. Or you might suggest
that the Student entity contains an artificial UID called student number.
a. A city
b. A contact person for a customer
c. A train
d. A road
e. A financial transaction (for example: transfer funds)
f. An award (for example: movies)
g. A painting
4. Identify one of the issues with respect to a national identification system. Provide your
point of view on the issue.
5. You have previously reviewed the video store business requirements stated below:
“I’m the owner of a small video store. We have over 3,000 DVDs that we need to keep
track of.
“Each of our DVDs has a disk number. For each movie, we need to know its title and
category (e.g., comedy, suspense, drama, action, war, or sci-fi). Yes, we do have
multiple copies of many of our movies. We give each movie a specific ID, and then we
track which movie a disk contains. A disk may be either High Definition (HD) or
BlueRay format. We always have at least one disk for each movie we track, and each
disk is always a copy of a single, specific movie. Our disks are very big, although we
don’t have any movies that require multiple disks.”
For this activity read the new business requirements below and resolve the M:M
relationship. Identify UIDs for all the entities that require multiple tapes.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
“We are frequently asked for movies starring specific actors. John Wayne and
Katherine Hepburn are always popular. So we’d like to keep track of the star actors
appearing in each movie. Not all of our movies have star actors. Customers like to
know each actor’s “real” birth name and date of birth. We track only actors who appear
in the movies in our inventory.
“We have lots of customers. We only rent DVDs to people who have joined our DVD
club. To belong to our club, they must have good credit. For each club member, we’d
like to keep the first and last name, current phone number, and current address. And,
of course, each club member has a membership number.
“Then we need to keep track of what DVDs each customer currently has checked out.
A customer may check out multiple DVDs at any given time. We just track current
rentals. We don’t keep track of any rental histories.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 6 Lesson 2: Normalization and First Normal Form
Objectives
• Define the purpose of normalization in database models
• Define the rule of First Normal Form in the normalization process
• Determine if an entity conforms to the rule of First Normal Form
• Convert an entity to First Normal Form if needed
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. When checking a database model for first normal form, what are you doing exactly?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. Check to see if each ERD is in 1NF. If not, make the necessary changes to correct it.
a.
b.
c.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 6 Lesson 3: Second Normal Form
Objectives
• Define the rule of Second Normal Form in the normalization process
• Examine a nonnormalized entity and determine which rule, or rules of normalization
are being violated.
• Apply the rule of Second Normal Form to resolve a violation in the model
Vocabulary
Identify the vocabulary word for the definition below.
Try It / Solve It
1. The UID of a library book includes its BOOK number and SHELF number. Does this ERD
follow the rules of Second Normal Form? If you spot a violation, correct it.
2. Class Enrollment is the intersection entity that resolves the M:M between STUDENT and
CLASS. Does the ERD follow the rules of Second Normal Form? If you spot a violation,
correct it.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. A store can be located in several shopping malls, and a shopping mall may house several
stores. To locate a particular store in a specific neighborhood, you will need to know the
name and address of the nearby shopping mall, plus the name of the store. Does the
ERD follow the rules of Second Normal Form? If you spot a violation, correct it.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 6 Lesson 4: Third Normal Form
Objectives
• Identify transitive dependencies in a data model
• Define the rule of Third Normal Form in the normalization process
• Examine a non-normalized entity and determine which rule, or rules of normalization
are being violated
• Apply the rule of Third Normal Form to resolve a violation in the model
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Identify the transitive dependency in the model below. State which attributes violate Third
Normal Form.
3. A color scheme for a car includes specifications for paint color for the body and the
interior colors and materials. For example: The “Desert” color scheme includes silver paint
and gray leather interior; the “Sunburst” color scheme includes gold paint and cream
leather interior. Does the model below follow the rules of Third Normal Form? If you spot
a violation, correct it.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
4. Assume the following business rules:
Does the model below contain one or more transitive dependencies? Identify the
attributes involved in the transitive dependencies.
5. Now that you have an idea of what makes a good UID, you need to be aware of the
controversy, benefits, and difficulty of uniquely identifying someone. Consider the idea of
a national ID card. What kinds of problems would the card create and what kinds of
problems would it solve? If your country already uses a national ID card, what are the
benefits and issues associated with this? In your opinion, could DNA mapping become
the national ID card? Why or why not?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 7 Lesson 1: Arcs
Objectives
• Define the term “constraint” as it applies to data modeling
• Identify an exclusive OR relationship in a business scenario
• Diagram an arc constraint to represent an exclusive OR relationship
• Distinguish between the use of an arc and a subtype in the data model
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. A show ticket is purchased from an agent, the box office, or the Internet. A ticket has a
description, an event, a date and a price. An agent has a name and a phone number. The
box office has an address and a phone number. The Internet has a URL address.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Draw the MENU entity as a supertype of the PROMOTIONAL, REGULAR, and OTHER
entities. The UID of MENU is code. MENU is related to FOOD ITEM through this
relationship: each MENU may contain one or more FOOD ITEMs, and each FOOD ITEM
must be listed on one and only one MENU. The UID of FOOD ITEM is a barred UID using
its attribute “number”. Add appropriate attributes to the other entities and be ready to
defend your choices.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 7 Lesson 2: Hierarchies and Recursive Relationships
Objectives
• Define and give an example of a hierarchical relationship
• Identify the UIDs in a hierarchical model
• Define and give an example of a recursive relationship
• Represent a recursive relationship in an ERD given a scenario
• Construct a model using both recursion and hierarchies to express the same
conceptual meaning
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Develop two ER diagrams to represent the following situation. Develop one using a
hierarchical structure and one using a recursive structure.
“Our company sells products throughout the United States. So we’ve divided the U.S.
into four major sales regions: the Northern, Eastern, Southern, and Western regions.
Each sales region has a unique region code. Each sales region is then divided into
sales districts. For example, the Western region is divided into the Rocky Mountain,
Northwest, Pacific Coast, and Pacific districts. Each district has a unique district code.
Each district is made up of sales territories. The Rocky Mountain district is composed
of three territories: Wyoming-Montana, Colorado, and Utah-New Mexico. The
Northwest district is made up of two territories: the Washington and Oregon-Idaho
territories. The Pacific Coast district is composed of two territories: the California and
Nevada territories. The Pacific District includes the Hawaii territory and the Alaska
territory. Each territory has a unique territory code.
Then each sales territory is broken down into sales areas. For example, Colorado is
made up of two sales areas: the Front Range and the Western Slope sales areas.
Each sales area has a unique sales-area code.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Each salesperson is responsible for one or more sales areas and has a specific sales
quota. We also have sales managers who are responsible for one or more sales
districts, and sales directors who are responsible for one or more sales regions. Each
sales manager is responsible for the territories with his/her districts. We don’t overlap
our employees’ responsibilities. Each sales area is always the responsibility of a single
salesperson, and our managers' and directors' responsibilities don’t overlap.
Sometimes our salespersons, managers, and directors will have special assignments
and will not be responsible for sales. We identify all our sales personnel by their
employee IDs.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 7 Lesson 3: Modeling Historical Data
Objectives
• Identify the need to track data that changes over time
• Construct ERD models that incorporate elements of “data over time”
• Identify the UID of an entity that stores historical data; explain and justify the choice of
UID
• Construct a conceptual model based on a given scenario
• Apply the rules of entity-relationship diagramming to create an ERD that reflects the
business rules
• Present and interpret the data model to an audience
• Compose written documentation to accompany the oral presentation and an ERD
Try It / Solve It
1. In the scenario below, what words or phrases indicate to you the need to track data that
changes over time?
Actors at the local theater sign contracts that specify their pay and working conditions.
These contracts are renewed annually. Each year the contracts may change through new
language and pay rates. In order to resolve labor disputes, the theater must sometimes go
back several years in order to see the contract provisions in place on a particular date.
The Seville, Spain soccer association is renovating their soccer arena. They are adding
luxury boxes that will be offered to companies. These boxes contain varying numbers of
seats. Each box is assigned a section number and level. The boxes are leased by the
year, and the prices are set individually according to the location and number of seats in
the box. The soccer association needs to keep track of the company name, address,
phone, and contact person. Sometimes the companies also provide a logo. Companies
that lease a box have the right to renew their leases each year, but they often do not.
When a lease for a box opens up, the association contacts companies that previously
held leases to see if they want to lease one again.
3. Modify the Video Store ER model below to accommodate the following additional
requirements:
“You know, we really need to keep a history of all our rentals. Each time a customer
rents a DVD, we would like to keep the rental date/time and the return date/time. All
our DVDs are due back the next day, so we don’t need to keep a due date. Keeping
this rental history will allow us to analyze the pattern of our rentals. We will be able to
determine how many DVDs each customer rents and how many times a customer has
returned a DVD late. We will also know how many times a particular DVD has been
used and will then know when to retire each DVD. We will also be able to analyze our
customers’ movie preferences.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
4. Read through the IOUG Case Study listed below. As a group develop an ER diagram for
the situation. Be sure to tag each attribute with its optionality. Each group will be given 10
minutes to present its solution in the next Section. You will be required to prepare each of
the following:
• Statement of the problem: Why has the IOUG approached you? What help do they
need?
• Statement of the proposed solution: How can you help them solve their problem?
What are your recommendations?
• The information requirements of the business/organization clearly stated: What data
do they need to track and what information do they need to get out of the data?
• The business rules as they apply to the information requirements of the
company/organization stated as single sentences: What business rules can you
formulate from the given scenario?
• The assumptions clearly stated that had to be considered in developing the solution:
What assumptions did you have to make in developing your solution?
• Entity relationship model
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
IOUG CASE STUDY
Our regional Oracle User’s Group has grown to include over 200 members.
We’re an all-volunteer organization of working adults and secondary-school
students, and our records are a mess. We need an information system to help
us keep track of our business.
We definitely need to automate our membership records. For each member, we
need to keep the member’s name, title, mailing address, office or home phone
number, type of membership (individual or corporate), and whether or not the
member has paid the dues (is the member “current”?). We collect dues on a
yearly basis, and they are due in January.
We also like to know which company a member works for or which school he
attends, but keeping this information current is difficult because our members
are always changing companies or addresses or graduating from school. We
track only the current employer for each member. Our members come from
many different companies, including Sony, EG&G, and Storage Tech, as well
as several different local high schools. A few of our members are unemployed.
For each company, we keep the company name, address, and type of
business. For each secondary school, we keep the school name and address.
We have a standard set of types of businesses and high-school codes. We
keep only the main company address for each company.
We hold various events during the year, and we’d like to track information about
each event. Some of our annual events include the September Meeting, the
November Meeting, the annual Training Day in January, and our April Meeting.
We also hold special events each year.
We also track which members attended which events. Some of our members
are really active, and others attend very infrequently or just enjoy receiving our
newsletter.
We also need to track what type of computer platforms our members are using.
We have a unique, three-digit system identification tag for each type of platform.
For example, 001 is for UNIX; 002 is for RAC & HA; 003 is for Oracle on
Windows; 020 is for Oracle Spatial; 030 is for Oracle & .NET; 050 is for DBMS;
and 080 is for Business Intelligence & Reporting Tools.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
We also like to track which application areas each member is interested in.
Sample application areas include accounting, human resources, entertainment,
oil and gas, pharmaceuticals, and health systems. The applications should be
portable, so we don’t need to know which platforms they run on.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 8 Lesson 1: Presentation of the ERD to the Client
Objectives
• Share and translate the ER model with the client in an engaging way
• Use non-technical terms when describing the ER model to the client
• Document design revisions requested by the client
Vocabulary
Identify the vocabulary word for each definition below.
Part Two: Identify which step of the interview process each action is associated with.
(Preparation, interview, end of interview, follow-up)
5. Review notes
6. Set goals
8. Take notes
Try It / Solve It
1. Produce a format you could use to document design revisions uncovered during a
presentation. Detail what would be included in each section of the document.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 9 Lesson 1: Modeling Change: Time
Objectives
• Distinguish between using date as an attribute and DAY as an entity in a data model,
depending on business requirements
• Solve the problem of keeping characteristics of a date by constructing a model that
uses DAY as an entity
• Identify at least three time-related constraints that can result from a time-sensitive
model
• Define and give an example of conditional non-transferability in a time-constrained
model
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Speeding Tickets
Each police officer may issue speeding tickets to motorists in an assigned area. Originally,
the attribute date was modeled as part of the SPEEDING TICKET entity. However, the
city police department wants to see if there is a relationship between weather and the
frequency of speeding tickets -- do people drive faster on nice sunny days? Are there
more tickets in hot weather or cool weather?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Examine the ERD that represents classroom assignments for different exams.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 9 Lesson 2: Modeling Change: Price
Objectives
• Solve the business requirement of tracking changes in price or values by constructing
a model that uses a historical entity
• Describe the meaning of journaling/logging
• Identify the business need for journaling/logging and construct a model that addresses
this requirement
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Comic-book collectors need to know the price history of different types of comics. This
helps them decide what to purchase/collect and how much to sell their collection for.
2. When a student’s grade is changed, we need to record information on the teacher who
changed the grade and the reason for the change.
Start with the ENROLLMENT entity, which is the resolution of the M:M between
STUDENT and CLASS.
3. (Optional) When vintage-car aficionados shop for additions to their collections, it helps to
know the price history of the cars they are interested in. It may also make them consider
selling one of their cars if it has greatly increased in value since they bought it.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 9 Lesson 3: Adding the Time Element to an ERD
Objectives
• Successfully apply the rule of using DATE as an entity
• Modify the animal-shelter ERD to accommodate new design requirements
• Identify and design possible reports that can be produced from the data; explain
how the information from these reports could be useful to the business
Try It / Solve It
CONTAINER
ID LOCATION CONTENTS DESTINATION DEPARTURE ARRIVAL
32215 Singapore fabric Hong Kong 23-Mar-2006 28-Mar-2006
21187 Seattle lumber Taiwan 18-Apr-2006 02-May-2006
11007 Los Angeles medical Cape Town 23-Mar-2006 18-Apr-2006
32200 Singapore lumber Barcelona 23-May-2006 02-Jun-2006
21187 Taiwan fireworks Seattle 01-May-2006
11007 Cape Town food Barcelona 18-Jul-2006
a. List 2 ways this data could be used to provide useful information to the shipping
company (2 reports that could be made using the data)
b. Based on the business rules inferred from the table, identify one piece of data that
must be in error.
c. Based on this data, how many containers were in transit on April 10th?
e. Assuming no gaps in the data, where was container 11007 on July 1, 2006?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 10 Lesson 1: Drawing Conventions for Readability
Objectives
• Apply the Oracle drawing conventions to a data-model diagram
• Identify high-volume entities in a data-model diagram and explain their significance to
the business
• Redraw a given data-model diagram to increase clarity and readability
• Recognize the usefulness of dividing a complex ERD into a number of functional sub-
diagrams
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Create an ERD based on the following Summit Sporting Goods scenario. Be sure to
follow drawing conventions for readability and clarity.
We may track an address (including the city, state, zip code, and country) and phone
number. We maintain warehouses in different regions to best fill the orders of our
customers. For each order, we must track an ID. We may track the date ordered, date
shipped, and payment type when the information is available.”
“Right now we have the world divided into five regions: North America, South America,
Africa/Middle East, Asia, and Europe. That’s all we track; just the ID and name. We try
to assign each customer to a region so we’ll generally know the best location from
which to fill each order. Each warehouse must have an ID. We may track an address
(including the city, state, zip code, and country) and phone number. We currently have
only one warehouse per region, but we’re hoping to have more soon.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
I manage the order-entry functions for our wholesale sporting-goods business. My
department is responsible for placing and tracking the orders when our customers call.
For each department, we must track the ID and name. Sometimes, our customers just
mail us the orders when they are not in a rush, but most often they call us or fax us an
order. We are hoping to expand our business by providing immediate turnaround of
order information to our clients. Do you think we can put this application on the Web?”
“We can promise to ship by the next day as long as the goods are in stock (or
inventory) at one of our warehouse locations. When the information is available, we
track the amount in stock, the reorder point, maximum stock, a reason as to why we
are out of stock, and the date we restocked the item. When the goods are shipped, we
fax the shipping information automatically through our shipping system. No, I don’t
manage that area. My department just ensures that our customers have the correct
billing information and verifies that their accounts are in good credit standing. We also
record general comments about a customer.
We do make sure that all the items they have requested are in stock. For each item,
we track an ID. We may also track the item price, quantity, and quantity shipped if the
information is available. If they are in stock, we want to process the order and tell our
clients what the order ID is and how much their order total is. If the goods are not in
stock, the customer tells us whether we should hold the order for a full shipment or
process the partial order.”
Our order-entry personnel are well versed in our product line. We hold frequent
meetings with marketing so they can inform us of new products. This results in greater
customer satisfaction because our order-entry operators can answer a lot of questions.
This is possible because we deal with a few select customers and maintain a specialty
product line. For each product, we must know the ID and name. Occasionally we must
also know the description, suggested price, and unit of sale. We would also like the
ability to track very long descriptions of our products and pictures of our products,
when it is necessary.”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 10 Lesson 2: Generic Modeling
Objectives
• Define generic modeling
• Evaluate and describe the advantages and disadvantages of generic modeling
• Construct a generic version of a more specific data model
Vocabulary
Identify the vocabulary word for each definition below.
Point of view.
Try It / Solve It
2. Recall the STAFF entity in the Global Fast Foods model. Create two generic models: one using
recycling of attributes and the other using attributes modeled as property instances.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 11 Lesson 1: Introduction to Relational Database Concepts
Objectives
• Define a primary key
• Define a foreign key
• Define a column-integrity rule
• Identify row, column, primary key, unique key, and foreign key given a diagram of a
table containing these elements
• Identify violations of data-integrity rules
Vocabulary
Identify the vocabulary word for each definition below.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Try It / Solve It
Examine the sample data for these tables in the DJs on Demand database. Check for
entity, referential, and column integrity. Identify any data-integrity violations. Assume that
all date columns should have a date format and all amount (cost) columns should have a
number format.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 11 Lesson 2: Basic Mapping: The Transformation Process
Objectives
• Distinguish entity relationship models from database models
• Describe the terminology mapping between a conceptual model and a physical model
• Understand and apply the Oracle naming conventions for tables and columns used in
physical models
• Transform an entity into a table diagram
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Transform the following entities into table definitions using suitable naming conventions.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Match the ERD elements to their corresponding database elements.
Analysis Design
Attribute Column
Entity Foreign key
ER Model Physical design
Instance Primary key
Primary UID Row
Relationship Table
Secondary UID Unique key
• “pk”
• “fk”
• “uk”
• “*”
• “o”
4. Create short names for the terms below based on the naming conventions rules.
• Academic major
• Undergraduate
• Class
• 1997classes
• Schedule_of_classes_spring_2003
• Financial Aid deadlines!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 11 Lesson 3: Relationship Mapping
Objectives
• Apply the rule of relationship mapping to correctly transform 1:M and barred
relationships
• Apply the rule of relationship mapping to correctly transform M:M relationships
• Transform 1:1 relationships
• Apply the rule of relationship mapping to correctly transform relationships in an arc
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
Relationship Mapping
The following entities were mapped to tables in the previous lesson: SHIFT, REGULAR
MENU, PROMOTIONAL MENU, FREQUENT DINER CARD.
Refer to the completed Global Fast Foods model and map the following entities:
FOOD ITEM
ORDER
ORDER LINE
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2. Indicate if a check constraint or additional programming is needed to enforce the
relationship in the database. Under each table diagram, write the conditions that the
check constraint or program has to ensure.
For example:
“To enforce exclusive relationships, a check constraint is needed to make sure that
(column A is not null and column B is null) OR (column A is null and column B is not
null).”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 11 Lesson 4: Subtype Mapping
Objectives
• State and apply the table, column, identifiers, relationship, and integrity constraint
rules for mapping:
o supertype implementations
o subtype implementations
o supertype and subtype arc implementations
Try It / Solve It
1. Transform the PARTNER supertype in the DJs model, using the supertype or single-table
implementation.
2. Transform the STAFF supertype in the Global Fast Foods model, using the subtype or
two-table implementation.
3. Identify the database rules for each part of the database implementations below.
Supertype implementations
• Table
• Column
• Identifiers
• Relationship
• Integrity constraint rules
Subtype implementations
• Table
• Column
• Identifiers
• Relationship
• Integrity constraint rules
Arc implementations
• Table
• Column
• Identifiers
• Relationship
• Integrity constraint rules
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 12 Lesson 1: Introduction to Oracle Application Express
Objectives
• Log-in to Oracle Application Express
• Create the music table using the script provided
• Enter some sample data into the music table created in this lesson
• Query the music table to view the new data
• Refine the query
Try It / Solve It
You will be using an application called Oracle Application Express to log-in to the database,
create tables, and insert data. Your instructor will walk you through the process of logging in
and using the application.
1. You will be creating a database table called MUSIC. The table data is provided here.
Can you identify the column names? How many rows does the table have? What is the
unique identifier of this table? Can you give an example of an instance of the MUSIC
table?
Your instructor will step you through the process of creating the MUSIC table using Oracle
Application Express. You can use the music.sql script that your instructor will provide or
enter the CREATE TABLE statement yourself.
SQL statement:
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
After you create your table, you will populate it with data. You can use the music.sql script
that your instructor provides or enter the INSERT statements yourself.
What did we just do? We used SQL to create a table in the database and to insert data
into the table.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 12 Lesson 2: SQL Introduction: Querying the Database
Objectives
• Query the MUSIC table; apply the rules of SQL to display all columns and a subset of
columns specified by criteria
• Add new data with a different value in the “type” column to the MUSIC table
• Refine the SQL query to display only those rows in the MUSIC table that have the new
type
Vocabulary
Identify the vocabulary word for each definition below.
A change or revision.
Try It / Solve It
1. Your instructor will give you a copy of some basic SQL commands and will discuss them
with the class. Enter the commands in Oracle Application Express to see the results.
a. Enter two or three rows of data with a new type (CLASSICAL, NEW AGE, JAZZ – your
choice). Then retrieve only the rows of data with this new music type.
b. Experiment on your own with variations of the command – retrieve different columns
and different rows (specific artists, types, etc.).
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 12 Lesson 3: Basic Table Modifications
Objectives
• Add a new column to the MUSIC table
• Use the DELETE and ALTER TABLE commands to correct mistakes or make
revisions to a table
Try It / Solve It
1. Add at least five new rows and two new columns to the MUSIC table. If you make
mistakes, use the DELETE and ALTER commands to correct them.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 12 Lesson 4: System Development Life Cycle
Objectives
• List and describe the different stages of the system development life cycle
• Identify the role of data modeling in the system development life cycle
• Relate the project tasks to the different stages of the system development life cycle
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
Work with your groups to answer the following questions as they apply to your project:
1. Which parts of the system development life cycle have you been through so far? What
tasks took the most time to complete? (Getting business requirements, creating the
data model, validating the model, documenting business rules, or others.)
2. Once you are done with the analysis stage, what are the next two stages? What will
you do in these stages?
3. How much time does it take to fix an error in the data model compared to fixing the
error when the tables have already been built? What about when the tables have
already been populated? Try to imagine how long it would take to fix an error if the
application (reports, web pages, etc.) have already been built. What does this tell you
about the importance of the early stages of the system development life cycle?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 13 Lesson 1: Project Overview and Getting Started
Objectives
• Identify a data-modeling project to solve a business information need
• Demonstrate essential skills in solving business problems using technology and
professionally presenting these solutions
Try It / Solve It
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 13 Lesson 2: Presentation Project Management
Objectives
• Track responsibility and progress on a project by using a project-management
document
• Show evidence of progress on the final presentation project by filling in the final project
tracking grid
Try It / Solve It
Use the class time to make progress on your final presentation. Revise and finalize
your ERD. Make sure you have all attributes defined, UIDs identified, relationships
named, and so on. Use subtypes, arcs, and hierarchies, if applicable.
2. Obtain a copy of the Final Presentation Project Tracking Form from your teacher. Fill
in the project tracking grid to document your current progress.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 13 Lesson 3: Final Presentation Components
Objectives
• Organize the final oral presentation content in logical outline order
• Identify appropriate content for each part of the presentation
• Assign presentation roles to each group member
Try It / Solve It
Presentation Sequence
1. Review the Final Presentation Rubric. This lists all of the elements that you need for
your presentation. Review the presentation sequence and discuss what you need to
write or produce for each step. Assign roles to each member of the team. Develop a
document that outlines the presentation sequence and identifies which team member
will be responsible for each part. Also indicate who will be responsible for writing or
producing each part.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 14 Lesson 1: Creating Tables for the Final Presentation
Objectives
• Create sample tables from the final project presentation ERD
• Add sample data to the created tables
• Produce query output using Oracle Application Express
Try It / Solve It
1. Map your ERD to an initial database design. Complete the table instance chart for
each table mapped.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 14 Lesson 2: Preparing Written Documentation
Objectives
• Compose well-organized written documentation to accompany your presentation
• Create a rough draft of, review, and finalize the written documentation
Try It / Solve It
1. Compose written documentation for the final project that meets the requirements outlined
in the Final Presentation Rubric.
2. Create a first draft and present to your instructor for feedback. Then, revise and finalize.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 14 Lesson 3: Preparing Visual Materials
Objectives
• Construct entity relationship diagrams that demonstrate industry conventions
• Prepare tables and visuals that support the database documentation
• Demonstrate and provide examples of table formatting for database documentation
Try It / Solve It
1. Take time to reflect on the progress of your group activity. In one paragraph describe your
group efforts to this point. Include information on the roles of each group member. Provide
feedback on group member activity and the impact it is having on the success of the
group’s visual material development.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 14 Lesson 4: Final Presentations
Objectives
• Present the final presentation project demonstrating use of arguments to persuade the
client
• Present a central message and supporting arguments
• Demonstrate logical analysis of the business rules, operations, and processes in a
way that is clear and easy for the client to understand
• Demonstrate appropriate business attire
• Demonstrate eye contact, upright posture, gestures, and other nonverbal
communication
• Compose answers to all questions using clear, concise communication
• Complete observation feedback for each presenter
• Deliver a successful presentation according to the rubric
Try It / Solve It
Presenting Team:
• Deliver a successful presentation according to the rubric.
Audience (Observers):
• Write down three effective presentation techniques exhibited by each presenter.
• Identify one area for improvement.
• Participate in the question-and-answer part of the presentation. Write down at least
one question for the presenter.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 15 Lesson 1: Anatomy of a SQL Statement
Objectives
• Match projection, selection, and join with their correct functions capabilities
• Create a basic SELECT statement
• Use the correct syntax to display all rows in a table
• Use the correct syntax to select specific columns in a table, modify the way data is
displayed, and perform calculations using arithmetic expressions and operators
• Formulate queries using correct operator precedence to display desired results
• Define a null value
• Demonstrate the effect null values create in arithmetic expressions
• Construct a query using a column alias
Vocabulary
Identify the vocabulary word for each definition below.
A mathematical equation.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Try It / Solve It
2. Write a query that displays the last_name and email addresses for all the people in the
DJs on Demand d_client table. The column headings should appear as “Client” and
“Email Address.”
3. The manager of Global Fast Foods decided to give all employees at 5%/hour raise + a
$.50 bonus/hour. However, when he looked at the results, he couldn't figure out why the
new raises were not as he predicted. Ms. Doe should have a new salary of $7.59, Mr.
Miller's salary should be $11.00, and Monique Tuttle should be $63.50. He used the
following query. What should he have done?
4. Which of the following would be the easiest way to see all rows in the d_songs table?
a. SELECT id, title, duration, artist, type_code
b. SELECT columns
c. SELECT *
d. SELECT all
5. If tax = 8.5% * car_cost and license = car_cost * .01%, which value will produce the
largest car payment?
a. Payment = (car_cost * 1.25) + 5.00 - (tax) - (license)
b. Payment = car_cost * 1.25 + 5.00 - (tax - license)
6. In the example below, identify the keywords, the clause(s), and the statement(s):
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
9. How will the column headings be labeled in the following example?
10. Which of the following words must be in a SELECT statement in order to return all rows?
a. SELECT only
b. SELECT and FROM
c. FROM only
d. SELECT * only
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 15 Lesson 2: Oracle Database Environment
Objectives
• Explain the features and benefits that the Oracle 11g Database Environment provides
for businesses
• Locate information about Oracle Corporation and its products and services
• Relate the steps in the system development life cycle (SDLC) to the development and
design of the Oracle 11g Database product and the data-modeling process
Try It / Solve It
1. Use the Internet to access the following sites and answer the questions below.
a. Compare and contrast Oracle's grid database design to that of the local power
company or the phone company.
b. Record two ways in which they are the same and two ways in which they are different.
2. The SDLC is a step-by-step, systematic way for “getting the job done.” Because the SDLC
is such an effective way to solve problems, the process can be applied to many situations
other than database design. For the businesses listed, give an example of how each
might incorporate the SDLC.
Fast-food company
Airplane manufacturer
Bridge-building company
Rock-star concert promoter
Clothing designer
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 15 Lesson 3: Using Applications
Objectives
• Distinguish between application software and system software and give an example of
each
• Demonstrate use of Oracle Application Express to enter SQL statements that retrieve
data
Vocabulary
Identify the vocabulary word for each definition below.
Part Two: Identify each software program below as an application program or a system
program.
Try It / Solve It
1. Log into Oracle Application Express and complete the following tasks. Write a check mark
next to each task once you’ve reached success in completing the task.
Show the drop-down menu for the Schema window and the schema name.
Locate the SQL statement window to enter SQL commands.
Enter the following command
SELECT *
FROM d_cds;
Click the SAVE button and enter a name for the file.
Notice the Archive tab is highlighted, and saved SQL commands appear in the window.
Click the History tab to view the past 200 SQL commands.
2. Name one application software package and one system software package. Then provide
an example of each.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
3. (Optional) Research the job titles of analyst, designer, programmer, and a user-support
manager. These are jobs associated with application design, development, and
maintenance. Search the Internet using the keywords “software applications jobs” or
http://www.monster.com with search keyword “application software designer.” List your
findings.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 15 Lesson 4: Relational Database Technology
Objectives
• Define and give an example of a relational database
• Identify table-key terms, including row, column, field, primary key, and foreign key
• Relate the importance of databases to everyday life
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. The Global Fast Foods database consists of how many tables? ____ tables
4. How many rows of data have been entered in the F_PROMOTIONAL_MENUS table?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
5. In the F_FOOD_ITEMS table, column _________ is a foreign-key column. What table and
column is this key referencing?
6. List the primary key to foreign key relationships required to go from the F_SHIFTS table to
the F_REGULAR_MENUS table.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 16 Lesson 1: Working with Columns, Characters, and Rows
Objectives
• Apply the concatenation operator to link columns to other columns, arithmetic
expressions, or constant values to create a character expression
• Use Column Aliases to rename columns in the query result
• Enter literal values of type character, number, or date into a SELECT statement
• Define and use DISTINCT to eliminate duplicate rows
• Display the structure of a table using DESCRIBE or DESC
• Edit, execute, and save SQL statements in Oracle Application Express
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. The manager of Global Fast Foods would like to send out coupons for the upcoming sale.
He wants to send one coupon to each household. Create the SELECT statement that
returns the customer last name and a mailing address.
2. Each statement below has errors. Correct the errors and execute the query in Oracle
Application Express.
a.
SELECT first name
FROM f_staffs;
b.
SELECT first_name |" " | last_name AS "DJs on Demand Clients"
FROM d_clients;
c.
SELECT DISCTINCT f_order_lines
FROM quantity;
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
d.
SELECT order number
FROM f_orders;
3. Sue, Bob, and Monique were the employees of the month. Using the f_staffs table, create
a SELECT statement to display the results as shown in the Super Star chart.
Super Star
*** Sue *** Sue ***
*** Bob *** Bob ***
*** Monique *** Monique ***
5. Global Fast Foods has decided to give all staff members a 5% raise. Prepare a report that
presents the output as shown in the chart.
6. Create a query that will return the structure of the Oracle database EMPLOYEES table.
Which columns are marked “nullable”? What does this mean?
7. The owners of DJs on Demand would like a report of all items in their D_CDs table with
the following column headings: Inventory Item, CD Title, Music Producer, and Year
Purchased. Prepare this report.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
10. There are four coding errors in this statement. Can you identify them?
SELECT employee_id, last_name
sal x 12 ANNUAL SALARY
FROM employees;
11. In the arithmetic expression salary*12 - 400, which operation will be evaluated first?
12. Which of the following can be used in the SELECT statement to return all columns of data
in the Global Fast Foods f_staffs table?
a. column names
b. *
c. DISTINCT id
d. both a and b
13. Using SQL to choose the columns in a table uses which capability?
a. selection
b. projection
c. partitioning
d. join
14. SELECT last_name AS "Employee". The column heading in the query result will appear
as:
a. EMPLOYEE
b. employee
c. Employee
d. "Employee:
16. Which statement below will return a list of employees in the following format?
Mr./Ms. Steven King is an employee of our company.
18. Which queries will return three columns each with UPPERCASE column headings?
a. SELECT "Department_id", "Last_name", "First_name"
FROM employees;
b. SELECT DEPARTMENT_ID, LAST_NAME, FIRST_NAME
FROM employees;
c. SELECT department_id, last_name, first_name AS UPPER CASE
FROM employees
d. SELECT department_id, last_name, first_name
FROM employees;
20. Click on the History link at the bottom of the SQL Commands window. Scroll or use the
arrows at the bottom of the page to find the statement you wrote to solve problem 3
above. (The one with the column heading SuperStar). Click on the statement to load it
back into the command window. Execute the command again, just to make sure it is the
correct one that works. Once you know it works, click on the SAVE button in the top right
corner of the SQL Commands window, and enter a name for your saved statement. Use
your own initials and “_superstar.sql”, so if your initials are CT then the filename will be
CT_superstar.sql.
Log out of OAE, and log in again immediately. Navigate back to the SQL Commands
window, click the Saved SQL link at the bottom of the page and load your saved SQL
statement into the Edit window. This is done by clicking on the script name. Edit the
statement, to make it display + instead of *. Run your amended statement and save it as
initials_superplus.sql.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 16 Lesson 2: Limit Rows Selected
Objectives
• Apply SQL syntax to restrict the rows returned from a query
• Demonstrate application of the WHERE clause syntax
• Explain why it is important, from a business perspective, to be able to easily limit data
retrieved from a table
• Construct and produce output using a SQL query containing character strings and
date values
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Using the Global Fast Foods database, retrieve the customer’s first name, last name, and
address for the customer who uses ID 456.
2. Show the name, start date, and end date for Global Fast Foods' promotional item “ballpen
and highlighter” giveaway.
Oldest
The 1997 recording in our database is The Celebrants Live in Concert
4. The following query was supposed to return the CD title “Carpe Diem" but no rows were
returned. Correct the mistake in the statement and show the output.
5. The manager of DJs on Demand would like a report of all the CD titles and years of CDs
that were produced before 2000.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
6. Which values will be selected in the following query?
SELECT salary
FROM employees
WHERE salary < = 5000;
a. 5000
b. 0 - 4999
c. 2500
d. 5
For the next three questions, use the following table information:
7. Write a SQL statement that will display the student number (studentno), first name
(fname), and last name (lname) for all students who are female (F) in the table named
students.
8. Write a SQL statement that will display the student number (studentno) of any student
who has a PE major in the table named students. Title the studentno column Student
Number.
9. Write a SQL statement that lists all information about all male students in the table named
students.
10. Write a SQL statement that will list the titles and years of all the DJs on Demand CDs that
were not produced in 2000.
11. Write a SQL statement that lists the Global Fast Foods employees who were born before
1980.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 16 Lesson 3: Comparison Operators
Objectives
• Apply the proper comparison operator to return a desired result
• Demonstrate proper use of BETWEEN, IN, and LIKE conditions to return a desired
result
• Distinguish between zero and the value of NULL as unavailable, unassigned,
unknown, or inapplicable
• Explain the use of comparison conditions and NULL
Vocabulary
Identify the vocabulary word for each definition below.
Including the specified limits and the area between them; the
numbers 1-10, inclusive
Selects rows that match a character pattern
Try It / Solve It
1. Display the first name, last name, and salary of all Global Fast Foods staff whose salary is
between $5.00 and $10.00 per hour.
2. Display the location type and comments for all DJs on Demand venues that are Private
Home.
3. Using only the less than, equal, or greater than operators, rewrite the following query:
4. Create a list of all the DJs on Demand CD titles that have “a” as the second letter in the
title.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
5. Who are the partners of DJs on Demand who do not get an authorized expense amount?
6. Select all the Oracle database employees whose last names end with “s”. Change the
heading of the column to read Possible Candidates.
8. Write a SQL statement that lists the songs in the DJs on Demand inventory that are type
code 77, 12, or 1.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 17 Lesson 1: Logical Comparisons and Precedence Rules
Objectives
• Evaluate logical comparisons to restrict the rows returned based on two or more
conditions
• Apply the rules of precedence to determine the order in which expressions are
evaluated and calculated
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. Execute the two queries below. Why do these nearly identical statements produce two
different results? Name the difference and explain why.
2. Display the last names of all Global Fast Foods employees who have “e” and “i” in their
last names.
3. “I need to know who the Global Fast Foods employees are that make more than
$6.50/hour and their position is not order taker.”
4. Using the employees table, write a query to display all employees whose last names start
with “D” and have “a” and “e” anywhere in their last name.
5. In which venues did DJs on Demand have events that were not in private homes?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
6. Which list of operators is in the correct order from highest precedence to lowest
precedence?
a. AND, NOT, OR
b. NOT, OR, AND
c. NOT, AND, OR
For questions 7 and 8, write SQL statements that will produce the desired output.
7. Who am I?
I was hired by Oracle after May 1998 but before June of 1999. My salary is less than
$8000 a year and I have an “en” in my last name.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 17 Lesson 2: Sorting Rows
Objectives
• Construct a query to sort a result set in ascending or descending order
• State the order in which expressions are evaluated and calculated based on the rules
of precedence
• Construct a query to order a result set using a column alias
• Construct a query to order a result set for single or multiple columns
Vocabulary
Identify the vocabulary word for each definition below.
Try It / Solve It
1. In the example below, assign the employee_id column the alias of “Number.” Complete
the SQL statement to order the result set by the column alias.
2. Create a query that will return all the DJs on Demand CD titles ordered by year with titles
in alphabetical order by year.
3. Order the DJs on Demand songs by descending title. Use the alias “Our Collection” for
the song title.
4. Write a SQL statement using the ORDER BY clause that could retrieve the information
needed. Do not run the query.
Create a list of students who are in their first year of school. Include the first name, last
name, student ID number, and parking place number. Sort the results alphabetically by
student last name and then by first name. If more than one student has the same last
name, sort each first name in Z to A order. All other results should be in alphabetical order
(A to Z).
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
5. Write a SQL statement using the employees table and the ORDER BY clause that could
retrieve the information in the following table. Return only those employees with
employee_id<125.
Extension Activities
2. You want to sort your CD collection by title, and then by artist. This can be accomplished
using:
a. WHERE
b. SELECT
c. ORDER BY
d. DISTINCT
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
5. The following query was written:
SELECT DISTINCT last_name
FROM students
7. Which of the following SELECT clauses will return uppercase column headings?
a. SELECT id, last_name, address, city, state, zip, phone_number;
b. SELECT ID, LAST_NAME, ADDRESS, CITY, STATE, ZIP, PHONE_NUMBER;
c. SELECT Id, Last_name, Address, City, State, Zip, Phone_number;
d. SELECT id AS ID, last_name AS NAME, address AS ADDRESS, city AS CITY, state
AS STATE, zip AS ZIP, phone_number AS PHONE_NUMBER;
8. Which SELECT clause will return the last names in alphabetical order?
a. SELECT last_name AS ALPHABETICAL
b. SELECT last_name AS ORDER BY
c. SELECT last_name
d. SELECT ASC last_name
9. Which SELECT clause will return a column heading for employee_id called “New
Employees”?
a. SELECT last_name AS "New Employees"
b. SELECT employee_id AS New Employees
c. SELECT employee AS "New Employees"
d. SELECT employee_id AS "New Employees"
Which results could not have been returned from this query?
12. What salary values will not be returned from this query?
SELECT last_name, first_name, salary
FROM employees
WHERE salary BETWEEN 1900 AND 2100;
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Section 17 Lesson 3: Introduction to Functions - Single Row Functions
Objectives
• Identify appropriate applications of single-row functions in query statements
• Classify a function as a single-row or multi-row function
• Differentiate between single-row functions and multirow functions and the result
returned by each
Try It / Solve It
1. For each task, choose whether a single-row or multiple row function would be most
appropriate:
2. The most common multiple-row functions are: AVG, COUNT, MAX, MIN, and SUM. Give
your own definition for each of these functions.
3. Test your definitions by substituting each of the multiple-row functions into this query.
SELECT FUNCTION(salary)
FROM employees
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.