Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating a database - I clicked on blank database and am saving it as books10.mdb. For more information see the practice example under week #1. I am going.

Similar presentations


Presentation on theme: "Creating a database - I clicked on blank database and am saving it as books10.mdb. For more information see the practice example under week #1. I am going."— Presentation transcript:

1 Creating a database - I clicked on blank database and am saving it as books10.mdb. For more information see the practice example under week #1. I am going to create a table in an Access database that contains information about the books that I have on software and programming. The layout of the file is: ISBN # of Book Title of Book Primary Author of Book Topic Year Published

2 I am creating a new table in design view.

3 The first field is isbn which is 13 text characters.

4 I added title as a text field with a field size of 35.

5 Now I have completed the layout.

6 Now I am making the isbn the primary key. Which means that every record will have a unique isbn.

7 Now I am going to add the data.

8 Note that this shows the field size of the five fields.

9 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. Note that I do not want you to use the wizard.

10 Now I am selecting the table to use in the query. I will click on Add to make it available.

11 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 query? If so, you should do the query. If not, modify the query to something you can do.

12 This shows the results of the query.

13 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.

14

15 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 allow me to do this query? If so, you should do the query. If not, modify the query to something you can do. These problems could not be done because of poor design. I added publisher and edition to enable me to do the queries.

16 Here you can see fields for publisher and edition. Note there is no data keyed into the fields.

17 Now I have keyed in some data.

18 This shows two criteria in an AND relationship. Both of the criteria have to be true for the record to be displayed. The diagram is a logic flowchart showing two fields in an AND relationship.

19 These two criteria are in an OR relationship. One criteria is on the criteria line and one is on the or line. If either criteria is true then the record will display. This is the logic flowchart. If the topic is Oracle the record will display. If not there is a second chance. If the year is > 2002, the record will display. If there is a no to both, the record will not display.

20 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.

21 The results.

22

23 This shows the logic flowchart. If yr is 2003 processing continues. Then, if topic is Oracle the record will display, otherwise the second chance asks if author > M and if that is true the record will display.

24 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

25 This shows the logic flowchart. Note that I asked the single question first because it is easier.

26 Again note that I did not catch the test for year 2203 - all of these were displayed because author > M

27 Next, I want to do the criteria shown below.

28 Note two criteria on the criteria line and two criteria on the or line.

29


Download ppt "Creating a database - I clicked on blank database and am saving it as books10.mdb. For more information see the practice example under week #1. I am going."

Similar presentations


Ads by Google