Thursday, November 11, 2010

Field, data types, key field/primary key, secondary key

Field:
Definition:An {ordered set} of {fields}, usually stored contiguously.  The term is used with similar meaning in several different contexts.  In a file, a "record" probably has some fixed length, in contrast to a "line" which may have any length and is terminated by some {End Of Line} sequence).  A {database} record is also called a "row".  In a {spreadsheet} it is always called a "row".  Some programming languages use the term to mean a type composed of fields of several other types ({C} calls this a "{struct}"). In all these cases, a record represents an entity with certain field values. Fields may be of a fixed width ({bit}s or {characters}) or they may be separated by a {delimiter} character, often {comma} ({CSV}) or {HT} ({TSV}). In a database the list of values of a given field from all records is called a column. (2002-03-22).
http://www.learnthat.com/define/view.asp?id=6799
Example:, a single VSAM file stores both employee and address records. The correct record interpretation is managed by associating the value of a record type field with a record layout. The following COBOL definition shows how a REDEFINES clause specifies an alternate record type for ADDRESS-INFORMATION. If RECORD-TYPE = "A" Classic Data Architect uses the layout for address data.
01  EMPLOYEE-ADDRESS-RECORD.
    05 EMP-ID            PIC X(6).
    05 RECORD-TYPE       PIC X.
       88 RECORD-IS-EMPLOYEE   VALUE 'E'.
       88 RECORD-IS-ADDRESS    VALUE 'A'.
    05 EMPLOYEE-INFORMATION.
       10 LAST-NAME      PIC X(20).
       10 FIRST-NAME     PIC X(20).
       10 DATE-OF-BIRTH  PIC 9(8).
       10 MONTHLY-SALARY PIC S9(5)V99 COMP-3.
       10 FILLER         PIC X(48).
    05 ADDRESS-INFORMATION REDEFINES EMPLOYEE-INFORMATION.
       10 ADDRESS-LINE-1 PIC X(30).
       10 ADDRESS-LINE-2 PIC X(30).
       10 ADDRESS-CITY   PIC X(20).
       10 ADDRESS-STATE  PIC XX.
       10 ADDRESS-ZIP    PIC 9(5).


 Picture:
        http://freepages.genealogy.rootsweb.ancestry.com/~donegalstrongs/ire_db.gif

Data Types:
Definition: The description of the kinds of data stored, passed and used.
http://www.ois.com/Products/glossary-of-terms.html#d

Example and Picture:
Qualitative vs Quantitative DataTopic Index | Algebra Index | Regents Exam Prep Center

Examine the differences between qualitative and quantitative data.
Qualitative DataQuantitative Data
Overview:
  • Deals with descriptions.
  • Data can be observed but not measured.
  • Colors, textures, smells, tastes, appearance, beauty, etc.
  • Qualitative → Quality
Overview:
  • Deals with numbers.
  • Data which can be measured.
  • Length, height, area, volume, weight, speed, time, temperature, humidity, sound levels, cost, members, ages, etc.
  • Quantitative → Quantit
Example 1:
Oil Painting
Qualitative data:
  • blue/green color, gold frame
  • smells old and musty
  • texture shows brush strokes of oil paint
  • peaceful scene of the country
  • masterful brush strokes
Example 1:
Oil Painting
Quantitative data:
  • picture is 10" by 14"
  • with frame 14" by 18"
  • weighs 8.5 pounds
  • surface area of painting is 140 sq. in.
  • cost $300
Example 2:
Latte
Qualitative data:
  • robust aroma
  • frothy appearance
  • strong taste
  • burgundy cup
Example 2:
Latte
Quantitative data:
  • 12 ounces of latte
  • serving temperature 150º F.
  • serving cup 7 inches in height
  • cost $4.95
Example 3:
Freshman Class
Qualitative data:
  • friendly demeanors
  • civic minded
  • environmentalists
  • positive school spirit
Example 3:
Freshman Class
Quantitative data:
  • 672 students
  • 394 girls, 278 boys
  • 68% on honor roll
  • 150 students accelerated in mathematics




Topic Index | Algebra Index | Regents Exam Prep Center

Created by Donna Roberts
Copyright 1998-2010 http://regentsprep.org
Oswego City School District Regents Exam Prep Center


http://www.regentsprep.org/Regents/math/ALGEBRA/AD1/qualquant.htm

Key field:
  Definition:  A field in a segment or record that holds the value of a key to that record.
  http://www.answers.com/topic/key-field
Primary Key:
   Definition:The primary key of a relational table uniquely identifies each record in the table. It can either be a normal attribute that is guaranteed to be unique (such as Social Security Number in a table with no more than one record per person) or it can be generated by the DBMS (such as a globally unique identifier, or GUID, in Microsoft SQL Server). Primary keys may consist of a single attribute or multiple attributes in combination.
    Example:Imagine we have a STUDENTS table that contains a record for each student at a university. The student's unique student ID number would be a good choice for a primary key in the STUDENTS table. The student's first and last name would not be a good choice, as there is always the chance that more than one student might have the same name. 
   http://databases.about.com/cs/administration/g/primarykey.htm
Picture:PrimaryKey.gif
   http://www.fgcu.edu/support/office2007/access/Images/PrimaryKey.gif

Secondary Key:
    Definition:A key that holds the physical location of a record or a portion of a record in a file or database, and provides an alternative means of accessing data. Also known as alternate key.
    http://www.answers.com/topic/secondary-key

No comments:

Post a Comment