1 / 14

DATA TYPES

DATA TYPES. FILE TABLE FIELD ITEM RECORD KEY FIELD / PRIMARY KEY SECONDARY KEY FOREIGN KEY. database. Sequential file – arranged according to the Primary Key Serial file – no particular order Difficult to find record Index to locate randomly stored records Direct access file.

briana
Download Presentation

DATA TYPES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DATA TYPES

  2. FILE • TABLE • FIELD • ITEM • RECORD • KEY FIELD / PRIMARY KEY • SECONDARY KEY • FOREIGN KEY database

  3. Sequential file – arranged according to the Primary Key • Serial file – no particular order • Difficult to find record • Index to locate randomly stored records • Direct access file Types of file

  4. Updates / amendments of records • Addition of new records • Deletion of records FILE MAINTENANCE

  5. Numeric • Integers (counting) • Real numbers (measurement, etc) • Date • Alphanumeric • Logical / Boolean • Currency Data typeSTo constrain the data to a certain kind of information and range of values

  6. Human error • False information • Information entered incorrectly • Validation check – set rules / format to the data type Checking Data ENtry

  7. Length check • Character check • Format check • Is it possible for data to still be incorrect even though it has passed all validation check above? • Data verification – input data twice and compare VALIDATION CHECKe.g. date

  8. All data stored in only one single file • requires a lot of memory • reduces speed of accessing the data FLAT FILES

  9. Task: Find the Class Teacher’s Phone Number for Student X • Step 1: Search the Students File until it gets the correct Student • Step 2: Get the Class Teacher’s Name • Step 3: Search the Teachers File until it gets the correct Teacher • Step 4: Get the Teacher’s Phone Number Consider a school database that contains a STUDENTS FILE & TEACHERS FILE

  10. Consider a school database that contains a STUDENTS FILE • Normally, Primary Key = Student ID • But students normally don’t remember their ID! • So Search by their Name - Secondary Key SECONDARY KEY

  11. Data are stored in Tables • When data in different Tables are connected together,they form Relational Tables RELATIONSHIPS

  12. Recall • Primary Key / Key Field • Secondary Key • Foreign key • A field in one file that is also a key field in another file FOREIGN KEY

  13. Analogue • Can be any value within a defined range • E.g. • height of a person • Pressure • Light intensity • Digital • Discrete patterns of 0s and 1s • Only 2 states of single bit data • E.g. • On / Off • True / False • Yes / No ANALOGUE & DIGITAL DATA

  14. Use A-D Converter • Burglar alarm / room thermostat  take sample every second • Convert music to digital data  128 000 samples per second (kbps) • Use D-A Converter • Control lights during a concert  complex switching, etc ANALOGUE & DIGITAL DATA CONVERSION

More Related