Data & Files
CIS241
Basics of Data Access ::
1. Storage & Retrieval (Writing & Reading)
2. Internal/External
Internal Storage ::
1. Direct :: assignment to named memory location
- variable
- property value
2. Indirect :: passed as value of parameter, or
returned as value of function call
Internal Retrieval ::
1. Reference to named memory location
- variable
- property value
- parameter
2. Function call
Internal to External Data Flow ::
1. Data written to screen
2. Data sent to other output devices, e.g., speakers
3. Data written to disk (hard drive, floppy, etc.)
External to Internal Data Flow ::
1. Data typed at keyboard
2. Data sent via various input devices, e.g., microphone, sensor
3. Data read from disk
The Key to File I/O ::
For both input and output the program accessing the file must match the file organization.
Forms of Access ::
1. Bit by bit
2. Character by character
3. Value by value