0% found this document useful (0 votes)
3 views

Data Heirarchy and Data File Structure

The document outlines the data hierarchy in computer systems, starting from bits and bytes to fields, records, and files, ultimately forming databases. It discusses issues with traditional file environments, such as data redundancy and lack of flexibility, and explains the importance of keys in databases for maintaining data integrity. Additionally, it covers logical data concepts, file operations, and various file organization methods, including sequential, direct access, and indexed sequential access file organization.

Uploaded by

Nick Singha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Data Heirarchy and Data File Structure

The document outlines the data hierarchy in computer systems, starting from bits and bytes to fields, records, and files, ultimately forming databases. It discusses issues with traditional file environments, such as data redundancy and lack of flexibility, and explains the importance of keys in databases for maintaining data integrity. Additionally, it covers logical data concepts, file operations, and various file organization methods, including sequential, direct access, and indexed sequential access file organization.

Uploaded by

Nick Singha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Data hierarchy and data file structures

Data Hierarchy
• A computer system organizes data in a hierarchy that starts with bits and bytes and
progresses to fields, records and databases.

• BIT- Bit is the smallest unit of data a computer can handle. The term “bit” is short form for
binary digit. It can assume either of two possible

• states and, therefore, can represent either 0 or 1.

• BYTE- a group of BITS is called a byte, represents a single character, which can be a letter, a
number or a symbol.

• A byte of information is stored by using several bits in specified combination called “bit
patterns.” A widely used bit pattern for personal computers and data communication is the
American Standard Code for Information Interchange (ASCII).

FIELD-
• The next level in data hierarchy is a field or item of data. A field or item of data is one or
more bytes containing data about the attribute of an entity in an information system.

• A group of characters into words, a group of words, or a complete numbers( such as persons
name or age.) is called a field.

Data Record-
• A group of related fields, such as the student’s name, the course taken, the date and the
grade, comprises a record.

• A record is a collection of fields relating to a specific entity. For example, a payroll record
contains fields of data relating to a specific employee.

File-
• A file is a collection of related records. For example, the collection of payroll records of all
employees in a company is a payroll file. The concept of a computer file is very similar to a
manual file in a filing cabinet.

• A Group of related file makes up a database.

Hierarchy of Data
Hierarchy of Data

Problems With the traditional file environment


 Data Redundancy and inconsistency

-is the presence of duplicate data in multiple data files so that the same data are stored in
more than one place.

 Program-data dependence

-program data dependence refers to the coupling of data stored in files such that changes in
program require change in data.

 Lack of flexibility
 Poor security
 Lack of data sharing and availability.

Keys Related to databases


KEYS-

 The integrity of the information stored in databases are controlled by the keys.

 A key or key field is a column is used to either uniquely identify a row of a data in a table, or
establish a relationship with another table.

 Different types of Keys are Primary key, Foreign key, and candidate key.

Primary key
 It denotes the key that is primarily chosen by the database designer as the principal means
of uniquely identifying records within the table.

 The primary key should be chosen in such a way that its value must not change.

 Records can be uniquely identified by this key for easy retrieval, updated or sorted.

Foreign Keys.
 A foreign key is a combination of one or more columns in a table that references a primary
key in another table.

Candidate key-
 A combination of one-or more fields whose value uniquely identifies a record in a table, that
is , no two records in the table can have the same key value.

 Alternate key

 Composite key

 Secondary key
Logical data concepts
Entity

 An entity is an object that has its existence in the real world. It contains all the things about
which the data is collected.

Attribute

 Attributes are units that describe the characteristics or properties of entities.in a database ,
entities are represented by tables and attributes by columns.

Relationships

 Relationship is an association, dependency or link between two or more entities and is


represented by diamond symbol.

 Three components are

 Name

 Degree

 Cardinality

 One to one relationship

 One to many relationship

 Many to many relationship

File operations:
The fundamental operations that can be performed on files are the following:

 Creation of a file.

 Retrieval of records from a file.

 Insertion of records into a file.

 Deletion of records from a file.

 Modification of records .

 Updation(re organization) of a file.

File Organization
• The way the data is stored and organized in a storage medium is called file organization.

• The physical organization of data on backing storage device (e.g magnetic disks) can be
defined as the relationships between the values of the key field on consecutive records and
the position of the storage device.
• There are several different ways in which files are organized ,and for each, a separate
method of accessing the records must be defined.

Sequential file organization


• The Sequential file organization is a popular file organization in the database management
system (DBMS). It is a simple technique for file organization structure. This technique stores
the data element in the sequence manner that is organized one after another in binary
format.

• Sequential file organization are suitable for most master files in a normal batch processing
environment where all or most of the records have to be processed.

Director (Random) Access File Organization.


• The records are placed in a random order, with the related records being physically separate
from one another on the file.

• We can locate a record by:

• The desired record can be identified by relative track number and the relative record
number.

• The record can be identified by a relative block address.

• The record can be identified by a relative track and key field.

• The records can be identified by the physical address. These files are called dynamic files or
direct files.

 The computer can directly locate the key to find out the record without having to search
through any other records first. For example, employee records could be accessed by using
the employees number assigned to them.

 A direct file organization is best suitable in reservation systems.

Indexed Sequential Access File organization


 The indexed sequential access file organization combines both sequential and random
access organization of records. The records are maintained in such a way that sequential
processing can be done and one or more indexes will be maintained with direct keys so that
direct access also becomes possible.

You might also like