Professional Documents
Culture Documents
File Management
File Management
Ilan BSIT II-A FILE MANAGEMENT Organization of Data DATA Bit Byte DESCRIPTION A binary digit Collection of bits 9 bits representing a character Collection of bytes Holds a single fact Typified by its length and type Collection of related fields Maybe fixed or varied in length Collection of related records Collection of files
Field
DOB (data of birth) field 060690 6numeric Student record which may contain student number, name, address, contact number, course Record of BSIT student Employee database containing Employee file, supplier file, buyer file, Department file
Record
File Database
Data are systematically organized in hierarchical form. File - a collection of related information. - Represents programs ( source and objects ) FILE TYPES File Type Executable Object Source Code Batch Extension Name exe., com, bin, dll O, so, elf Cxx, hxx, cpp, cx, c, cls, cob, java Vb, hpp Bat, sh Function Executable programs Compiled, not linked, machine language Source code in various language
Text, doc, docx, rtf, pages, pdax, odt, xml, html Db, dbf, frm, mdb, ldb, ora, myd, odb Lib, a Arc, zip, tar, arj, bke, dmg, gzip, rar, z, deb Jpeg, jpg, tiff, png, gif, bmp, cgm, pdf Html, xml, asp, aspx, adp, bml, jsp, php, cgi, mnht
Textual data, documents Database programs Libraries of routines for programmers Related files grouped into a file, sometimes compressed, for archiving or storage For storing images Web-based documents
File Manager Responsible for secondary storage. Gives the user and computer system the ability to work with files. Provides commands to allow the user to perform a variety of file-related functions. Responsible for maintaining the directory structure.
Acc. to Nutt
File is a named collection of data stored in a device. File manager implements abstraction and provides directories for organizing also provides a spectrum of commands to read and write the contents of a file, to set the file read/write position, to set and use the protection mechanism, to change the ownership to list files in a mechanism, to allow machine users to administer how processes executing on behalf of the different users can access the information in the files. File protection is a fundamental property of files.
Acc. to Brookshear
Directory or folder group or bundle of files. Subdirectories directories containing other directories.
File Management
Objectives 1. To meet user requirements regarding data management needs which includes storage of data and capability to perform file operations such as create, delete, read, change files. A minimal set of requirements maybe: a. Able to create, delete, read, and change file. b. Able to control access to other user s file. c. Able to control the type of access to other users file. d. Able to reformat the user file in a form suitable to the problem. e. Able to transfer data between files. f. Able to back-up and recovery files if damaged. g. Able to access files using a file name. 2. To assure that the data in the file are valid. 3. To maximize performance in terms of throughput and response time . 4. To give I/O support for different storage device types. 5. To minimize if not eliminate the possible destruction or loss of data. 6. To give a standard set of I/O interface routines. 7. To give I/O support for many users.
File System Is a method of keeping and managing files and their content for easy search, navigation, manipulation and retrieval. Classification / Types of File System Disk file systems Network file systems Special purpose file systems
File Organization
Refers to the logical structuring of the records as determined by the way in which they are accessed.
Criteria for choosing file organization: 1. 2. 3. 4. 5. Fast access Easy update Low cost storage Easy to maintain Reliability
Sequential
Hashed or Direct
Indexed
Partial organized index contains entries to record where field of interest Records in sequence using key field just like other than the key field exists sequential Index is organized as sequential file for east search file Additional features added: index file and an overflow Adding new records means updating all indexes Index to file added to support random access Used mostly in real time application Index file contains a key field ( same as the key field found in the main file) and a pointer to the main file Direct access toto any block of known address Overflow file used record any addition or update to an existing Key field fileis required but may not be in sequential order Use hashing key value Reduced time on to access single record without sacrificing sequential Often used for application nature of the life with the following characteristics Requires immediatethan access Greater performance sequential access. Uses fixed length records Multiple indexes used to achieve flexibility in searching for Access is doneare one record at a time fields other than the key field Records are accessed through indexes May have variable length Two types in indexes used: exhaustive index and partial index Exhaustive index contains an entry for every record in the main file
Name chosen by creator to identify the file must be unique Identifies the type of file if text source Identifies the file organization used Indicates device on which file is stored Provides physical location on secondary storage, ex Cylinder track sector Current size of the file in bytes Maximum size of file User assigned to control the file User determines access rights of other users with regard to this file Controls the reading, writing, executing, transmitting over a network Data when file was placed in Directory Date when file was placed in Directory Current owner of the file Date of the last time record was read Identify the user who last modified date of the last update insertion or deletion Identity the user who last modified Date when the file was last backed up on another storage device
Usage Information
Data Created Identity of creator Date Last Read Access Identity of Last Reader Date Last Modified Identity of Last Modifier Date Last back-up
Current usage
Current activity on file like processes that are currently using the file or if it was locked by a process or if the file has been updated in primary memory but not yet on secondary storage device.
Linked
Data blocks of file are scattered anywhere on disk Directory entry for each file contains the start block and file name Data block uses 4 bytes additional for the pointer to
External fragmentati on does not occur Any used space maybe used to enter a part of the file File may expand no need to declare a file size when file is 1st created
the next block of file. Indexed Index block is allotted for each file that is created Index block contains all point to the data blocks of the file Directory entry for each file contains the index block and the file name
No need of compaction Reliable because all pointers are groped in the index block Direct access is efficient
wrong file Entire block is allocated to hold all pointers even if few pointers are used hence internal fragmentatio n may occur