in PowerPoint

Download Report

Transcript in PowerPoint

Creating a database - I
clicked on blank
database and am saving it
as books10.mdb.
For more
information
see
I am going to create
a table
in an Access
the practice
exampleabout
database that contains
information
#1.
the books that under
I haveweek
on software
and
programming.
The layout of the file is:
I am creating a new
table in design view.
The first field is isbn
which is 13 text
characters.
I added title as a text field
with a field size of 35.
Now I have
completed the
layout.
Now I am making the isbn the
primary key. Which means
that every record will have a
unique isbn.
Now I am going
to add the data.
Note that this shows the
field size of the five
fields.
Now I am going to move to
queries and create a query. I
can either click on create
query in design view or do as
I did here and click on new
and then select design view.
Now I am selecting the table
to use in the query. I will click
on Add to make it available.
Now I double clicked on the
three fields I wanted to bring
them to the form. This was
answering Problem #1.
Problem #1: I need to do a
query to list of all books with
their title, primary author and
ISBN#. Does this file have
the data/information available
that would allow me to do this
This shows the
results of the query.
Problem #2: I need to do a query to list
all books that were published in 2003.
Does this file have the data/information
available that would allow me to do this
query? If so, you should do the query. If
not, modify the query to something you
can do.
I entered =2003, because yr is
a text field, Microsoft will put
the quotes around 2003.
These
problems
could
not be done
because
of poor
design. I
added
publisher
and edition
Problem #3: I need to do a query to
list all books published by Course
Technology. Does this file have the
data/information available that would
allow me to do this query? If so, you
should do the query. If not, modify
the query to something you can do.
Problem #4: I need to do a query to
list all books with their title, edition,
and topic where the topic is CGI/Perl.
Does this file have the
data/information available that would
Here you can see fields for
publisher and edition. Note
there is no data keyed into the
fields.
Now I have
keyed in some
data.
This shows two
criteria in an AND
relationship. Both
of the criteria
have to be true for
the record
to be displayed.
These two
criteria are
in an OR
relationship.
One criteria
is on the
criteria line
This is the
logic
flowchart. If
the topic is
Oracle the
record will
display. If not
In this example I want 2003 to
always be true. I also want
either the topic to be Oralce or
the author to be > M.
The
results
.
This shows the
logic flowchart.
If yr is 2003
processing
continues. Then,
if topic is Oracle
This shows a different situation. Now I am
not repeating the year criteria on both the
criteria line and the or line (notice I also have
a typo in year - I did not notice before).
I am now looking for:
topic Oracle and yr 2003
OR
author > M
This shows the
logic
flowchart. Note
that I
asked the single
question first
because it is
easier.
Again note that I did not catch
the test for year 2203 - all of
these were displayed because
author > M
Next, I want to do the
criteria shown below.
Note two criteria on the
criteria line and two criteria on
the or line.