Chapter 16 Files and Streams (Ipower web hosting) 897 Randy Red
Chapter 16 Files and Streams 897 Randy Red 01001010 J u d y Judy Green Sally Black Tom Blue Judy Green Iris Orange File Record Field Byte (ASCII character J) 1 Bit Fig. 16.1The data hierarchy. 16. To facilitate the retrieval of specific records from a file, at least one field in each record is chosen as a record key. A record key identifies a record as belonging to a particular person or entity that is unique from all other records. In the payroll record described previously, the employee identification number normally would be chosen as the record key. There are many ways to organize records in a file. The most common organization is called a sequential file in which records are stored in order by the record-key field. In a payroll file, records are placed in order by employee identification number. The first employee record in the file contains the lowest employee identification number, and subsequent records contain increasingly higher employee identification numbers. Most businesses store data in many different files. For example, companies might have payroll files, accounts receivable files (listing money due from clients), accounts payable files (listing money due to suppliers), inventory files (listing facts about all the items handled by the business) and many other file types. Often, a group of related files is called a database. A collection of programs designed to create and manage databases is called a database management system (DBMS). 16.3 Files and Streams Java views each file as a sequential stream of bytes (Fig. 16.2). Each file ends either with an end-of-file marker or at a specific byte number recorded in a system-maintained administrative data structure. Java abstracts this concept from the programmer. A Java program processing a stream of bytes simply receives an indication from the system when the program reaches the end of the stream the program does not need to know how the underly
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.