File Organization Notes
- Pages: 7
- Word count: 1632
- Category: College Example Management
A limited time offer! Get a custom sample essay written according to your requirements urgent 3h delivery guaranteed
Order Now1.SEQUENTIAL FILE ORGANIZATION – records are written consecutively – files are stored in ascending or descending order according to a key field. ADVANTAGE: – easier to maintain than other organizations â especially in terms of adding and deleting records
2.RANDOM FILE ORGANIZATION – implies a predictable relationship between the key used to identify an individual record and that record’s location in an external file.
3.INDEXED SEQUENTIAL FILE ORGANIZATION- combines sequential access and ordering with the capabilities of random access. Example: a simple linear search on a 1,000 record sequentially organized file. An average of 500 key comparisons is needed (and this assumes the search keys are uniformly distributed among the data keys). However, using an index evenly spaced with 100 entries, the total number of comparisons is reduced to 50 in the index file plus 50 in the data file: a five to one reduction in the operations count!
TWO PARTS OF INDEXED SEQUENTIAL FILE:
a.A collection of records stored in contiguous locations within blocks in a relative file and ordered by a key field. b.An index (a hierarchical structure of record keys and relative block numbers) to the file of ordered records.
4.MULTIKEY FILE ORGANIZATION – allows access to a data file by several different key fields. Example: Library file that requires access by author and by subject matter and title.
DATA FILE TYPES
1.MASTER FILE – contains records of permanent data that are updated by adding, deleting, or changing. Example: Payroll master file contains an employee’s social security number, the rate pay, marital status, number of exemptions claimed, and year-to-date deductions and earnings.
2.TRANSACTION FILE- contains records of changes, additions, and deletions made to a master file.
3.TABLE FILE – consists of a table of data, such as a price list, a tax rate table, or some other form or reference data that is static and is referenced by one of the other type of files. 4.REPORT FILE- contains information that has been prepared for the user. 5.CONTROL FILE – is small and contains information concerning a particular maintenance run, such as the date of the run; the number of master records read, added, deleted, and written; and the number of transaction records read, processed and in error 6.HISTORY FILE – consists of all the backup master files, transaction files, and control files from past runs.
FILE CHARACTERISTICS
1. Activity of a file is a measure of the percentage of existing master records changed during a maintenance run. 2. Volatility of a file is a measure of the number of records added and deleted compared to the original number of records.
FILE MANIPULATION
1. Queries involve searching a file for records containing certain values in particular key fields. 2. Merging
Hierarchy of File Organization
oBit âall data is stored in a computerâs memory or storage devices in the form of binary digits( 0,1) or ON or OFF. oByte âis a group of 8 bits. One byte can represent one character or in different contexts, other data such as a sound, part of a picture. oData Field â is a group of characters, holds a single fact oRecord â collection of related fields
oFile- collection of related records
oDatabase âan organized collection of data usually in digital form
Storage media- Physical material on which data, instructions, and information are stored
â¢Storage Devices- Records and retrieves items to and from a storage medium
ïShort-term data is stored in RAM (temporary memory)
ïLonger term storage requires another medium such as the hard drive or USB drive ïStorage devices are categorized by:
1.Magnetic storage devices
âUse oxide-coated plastic storage media called Mylar
âData stored on tracks
âEach track is labeled and the location kept in a file allocation table (FAT)
ï¶Types of magnetic storage:
ï¶Floppy diskMagnetic tape Hard disk
2.Optical storage devices
âUse laser technology to read/write on silver platters
âMost common types are CDs and DVDs
-Blu-ray is a new high-capacity storage medium that is expected to replace conventional DVDs.
A laser reads data on a CD or DVD
3.Solid-state storage media
âNon volatile, removable medium
âEverything processed electronically, no moving parts
âMiniature mobile media, USB flash drives
INTRODUCTION TO DATABASE SYSTEMS
Learning Objectives:
In this chapter, you will learn:
1.The difference between data and information
2.What a database is, about different types of databases, and why they are valuable assets for decision making
3.Why database design is important
4.How modern databases evolved from files and file systems
5.About flaws in file system data management
6.How a database system differs from a file system, and how a DBMS functions within the database system
ï¶DATA vs. INFORMATION
Data are raw facts; building blocks of information and unprocessed information while
Information are data processed to reveal meaning. It is also accurate, relevant, and timely information is the key to good decision making. Good decision making is the key to survival in global environment
ï¶Data Management
â¢Is a discipline that focuses on the proper generation, storage, and retrieval of data. â¢Is a core activity for any business, government agency, service organization or charity.
ï¶INTRODUCING THE DATABASE AND THE DBMS
Databaseâshared, integrated computer structure that houses:
â¢End user data (raw facts)
â¢Metadata (data about data)
DBMS (database management system):
â¢Collection of programs that manages database structure and controls access to data â¢Possible to share data among multiple applications or users â¢Makes data management more efficient and effective
METADATA
â¢Provide a description of the data characteristics and the set of relationships that link the data found within the database.
A database resembles a very well organized electronic filing cabinet in which powerful software known as DBMS, helps manage the cabinetâs contents..
ï¶DBMS (Database Management System)
Is a collection of programs that manages the database structure and controls access to the data stored on the database
ï¶DBMS Makes Data Management More Efficient and Effective
End users have better access to more and better-managed data
â¢Promotes integrated view of organizationâs operations
â¢Probability of data inconsistency is greatly reduced
â¢Possible to produce quick answers to ad hoc queries
ï¶Types of Databases
â¢Single-user â Supports only one user at a time
â¢Desktop â Single-user database running on a personal computer â¢Multi-user â Supports multiple users at the same time â¢Workgroup â Multi-user database that supports a small group of users or a single department â¢Enterprise â Multi-user database that supports a large group of users or an entire organization
ï¶Location of Databases
â¢Centralized â Supports data located at a single site
â¢Distributed â Supports data distributed across several sites
ï¶Uses of Databases
â¢Transactional (or production) âSupports a companyâs day-to-day operations â¢Data warehouse âStores data used to generate information required to make tactical or strategic decisions â¢Such decisions typically require âdata massagingâ
â¢Often used to store historical data
â¢Structure is quite different
The DBMS manages the interaction between the end user and data base.
ï¶DATABASE DESIGN
Design of the database structure that will be used to store and manage data, rather than the design of the database.
ï¶Why Database Design is important.
â¢A well-designed database facilitates data management and becomes a valuable information generator. â¢A poorly designed database is likely to become a breeding ground for redundant data. â¢A poorly designed database tends to generate errors that are likely to lead to bad decisions. Database is the source from which information is generated.
ï¶Historical Roots of the Database : FILES & FILE SYSTEMS
â¢Although managing data through file systems is largely obsolete â¢Understanding relatively simple characteristics of file systems makes complexity of database design easier to understand â¢Awareness of problems that plagued file systems can help prevent similar problems in DBMS â¢Knowledge of file systems is helpful if you plan to convert an obsolete file system to a DBMS
ï¶FILE SYSTEM DATA MANAGEMENT
Create the file structure.
Add data to the file
Delete data from the file.
Modify the data contained in the file.
List the file contents.
âThink before you doâ concept (All data access programs are subject to change when even minor changes in the file structure are made)
STRUCTURAL AND DATA DEPENDENCE
â¢Structural dependence
Access to a file depends on its structure
â¢Data dependence
Changes in database structure affect programâs ability to access data â¢Logical data format
How a human being views the data
â¢Physical data format
â¢How the computer âseesâ the data
Therefore, any program that accesses a file systemâs file must not only tell the computer what to do, but also how to do it.
FIELD DEFINITIONS AND NAMING CONVENTIONS
Reasons:
Selecting proper filed names is very important.
Field names should be reasonably descriptive.
With proper naming conventions, the file structure becomes self-documenting.
DATA REDUNDANCY
Unnecessarily duplicated data.
Often the source of difficult-to-trace information errors.
Uncontrolled data redundancy results to:
Data inconsistency is the lack of data integrity.
Data anomalies (abnormality)
â¢Modification anomalies
Occur when changes must be made to existing records
â¢Insertion anomalies
Occur when entering new records
â¢Deletion anomalies
Occur when deleting records
Database vs. File System
Problems inherent in file systems make using a database system desirable â¢File system
âMany separate and unrelated files
â¢Database
âLogically related data stored in a single logical data repository
The Database System Environment
Database system is composed of 5 main parts:
1. Hardware
2. Software
â¢Operating system software
â¢DBMS software
â¢Application programs and utility software
3. Data
4. Procedures
5. People
DBMS Functions
Performs functions that guarantee integrity and consistency of data â¢Data dictionary management
defines data elements and their relationships
â¢Data storage management stores data and related data entry forms, report definitions, etc. â¢Data transformation and presentation translates logical requests into commands to physically locate and retrieve the requested data â¢Security management enforces user security and data privacy within database
â¢Multi-user access control creates structures that allow multiple users to access the data â¢Backup and recovery management provides backup and data recovery procedures
â¢Data integrity/reliability management promotes and enforces integrity rules to eliminate data integrity problems â¢Database access languages and application programming interfaces provides data access through a query language
â¢Database communication interfaces allows database to accept end-user requests within a computer network environment