Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Please use speaker notes for additional information!

Similar presentations


Presentation on theme: "Data Please use speaker notes for additional information!"— Presentation transcript:

1 Data Please use speaker notes for additional information!

2 0-619-03440-8 CGI/Perl Zak, Diane CGI/Perl 2002 This is my file. The file is made up of 6 records. Each record contains information about a particular book. This is a record (record 1) from the file shown above: This is the ISBN Number field. This is the title field. This is the author field. This is the topic field. This is the year published field

3 Structure: Name of field length of field type of data ISBNNo 13 characters text/string title 35 characterstext/string author 25 characterstext/string topic15 characterstext/string yrPub4 charactersnumber The developer determines a name for each field, determines the type of data that will be stored in the field and how many characters will be needed to hold the data in the field. This structure applies to all records in the file.

4 The developer names fields when they create the structure of the file. The rules are: 1) NO EMBEDDED BLANKS 2) NO special characters unless specifically allowed by the language (many languages allow the hyphen or the underscore). 3) Some languages are case sensitive and some even require a particular case 4) Many developers use a change of case to indicate a new word payHour onHand yrPub

5 In this example, I have set up a file and I am defining the structure within the COBOL program so the program can read the file. Notice that I have the same fields that we have used in my previous example, but this time when I named them I used upper case and I used the hyphen to separate words. In COBOL X(13) means that it is a text/string/character field of 13 characters while 9(4) means it is a numeric field of 4 characters. Note that I could also have written 9999 to mean a numeric field of 4 characters.

6 Now I am going to set up the same example in Access. The data is set up in a table called booklist.

7 I named the ISBN # field isbn and made it text with a length of 13 characters. Notice that I also made it the key.

8 The field yrpub is numeric and specifically under field size I chose integer.

9 The rows in the table are records. The records are made up of fields. When you look at the records together in the table, you can see that the fields are directly under each other and form columns.


Download ppt "Data Please use speaker notes for additional information!"

Similar presentations


Ads by Google