Sie sind auf Seite 1von 5

3.

Distinguish among terminology associated with files and databases

The following set of data can be stored in a set of 12 index cards. However, if we store them
using a Database Management System such as Microsoft Access, then this set of data is stored in
a file or a TABLE.

We can name the table below as PRODUCT to show that the data stored in the table is about
different products.
TABLE: PRODUCT

This is
a COLU
MN

Product ProductNa Supplier Category QuantityPer UnitPr UnitsInSto


ID me ID ID Unit ice ck
10 boxes x 20
1 Chai 1 1
bags
$18.00 39
24 - 12 oz
2 Chang 1 1
bottles
$19.00 17
Aniseed 12 - 550 ml
3
Syrup
1 2
bottles
$10.00 13
Chef
Anton's
4
Cajun
2 2 48 - 6 oz jars $22.00 53
Seasoning
Chef
5 Anton's 2 2 36 boxes $21.35 0
Gumbo Mix
Grandm ←Th
is is
a's 12 - 8 oz $25.0
6 3 2 120 a
berry jars 0 RO
Spread W
Uncle Bob's
12 - 1 lb
7 Organic 3 7
pkgs.
$30.00 15
Dried Pears
Northwoods
12 - 12 oz
8 Cranberry 3 2
jars
$40.00 6
Sauce
Mishi Kobe 18 - 500 g
9
Niku
4 6
pkgs.
$97.00 29
12 - 200 ml
10 Ikura 4 8
jars
$31.00 31
Queso
11
Cabrales
5 4 1 kg pkg. $21.00 22
Queso
10 - 500 g
12 Manchego 5 4
pkgs.
$38.00 86
La Pastora

Now, the data we have stored about the products are in horizontal ROWs. So, product Number
1, identifies the Chai, which was ordered from a supplier whose ID is 1. This Chai is part of a
category, category 1 in this example. The Chai is sold in a set 10 boxes which each contain 20
bags. This is sold for $18.00 and there are 39 of them is stock. Microsoft Access refers to a ROW
as a RECORD. Another term for a row is a TUPLE.

All of the ProductIDs (from 1 to 10) are in a COLUMN. Microsoft Access refers to a COLUMN
as a FIELD. Another term for a field is an attribute. So, the ProductName, SupplierID,
CategoryID, QuantityPerUnit, UnitPrice, and UnitsInStock are all fields.

How many fields and records are in the table below?

TABLE: SUPPLIER

SupplierID CompanyName ContactName ContactTitle


1 Exotic Liquids Charlotte Cooper Purchasing Manager
2 New Orleans Cajun Delights Shelley Burke Order Administrator
3 Grandma Kelly's Homestead Regina Murphy Sales Representative
4 Tokyo Traders Yoshi Nagase Purchasing Manager

The Supplier Table has five fields and four records.


Data Types

Each field contains different types of data. For example, in the Supplier table above, the
SupplierID contains numbers, while the Company Name, Contact Name, and Contact Title all
contain text. The Address field contains Alphanumeric data which means that each field can
contain both text and numbers.

Consider the Order table below:

TABLE: ORDER

SupplierID ProductID QuantityOrdered DateOrdered Shipped


1 2 150 12/12/2012 Yes
1 4 150 11/12/2012 No

5 2 55 12/12/2012 No

In this table we have five fields and three rows.

SupplierID, ProductID, and QuantityOrdered are all numeric fields.

DateOrdered is a date field.

Shipped is a logical field with two options only, Yes or No.

Recap:

Data types

Alphanumeric - both text and numbers

Numeric - numbers
Date - dates

Logical -Option for Yes or No, True or False

Das könnte Ihnen auch gefallen