You are on page 1of 4

1.1.

DATA STRUCTURE

1.1.1. Introduction
There are several ways to organise the data. Data structure may be defined as the logical or mathematical
structure of a certain situation.

Data structure, also known as the abstract data types refer to the data class that is characterised on the basis of
organisation and operations defined on it.

The possible ways in which data has been processed and analysed is greatly affected by the data file structure.
Any changes to data file are difficult and time taking once the structure has been filled with data.

The internal structure of data file varies with the type of data file and a research project may have multiple
separate data files that are related to one another in different ways. Formatting the content of data file such as
organisation and types of variables may also determine the structure of data files. The information related to the
relationship among various elements and its content parts is also provided by the structure of data file.

Data file also includes an essential part of the metadata. For example, it may in the form of value labels,
variables and names, different kinds of supplementary content variables and notes. Thus the clarity of data
documentation is also determined by the structure of data.

Following are the three ways for structuring the file:


File System Structure

Byte Sequence
Record Sequence

Tree-Based Structure

1) Byte Sequence: The operating system at first only sees bytes and does not determine what is there in file
because file is an unstructured sequence of bytes initially. User level program can be used to impose any
meaning. This approach can be used by both Windows and UNIX.

Operating system provides maximum flexibility to the files as it only regards file as a byte sequence. User
programs name their file in any way which is significant for them and put anything they want in their file.

Figure 3.6 (a) shows the file in unstructured sequence of bytes.

2) Record Sequence: Record sequence is the second way to structure the file. It is a sequence of fixed-length
record each having internal structure. Read operation reads only one record and turns it back that is why file
is known as a sequence of records. One’s record has been overwrites by the write operation and connects
them.

Figure 3.6 (b) shows the record sequence structure:

3) Tree-Based Structure: Tree-based structure is the third way to structure data file. Different records have
different length containing a key field in fixed position in record. To enable the fast searching for a
particular key, the tree is sorted a key field.

Figure 3.6 (c) shows the tree-based file structure:


1 Byte 1 Record

Ant Fox Pig

Cat Cow Dog Goat Lion Owl Pony Rat Worm

Hen Ibis Lamb

(a) (b) (c)


Figure 3.6: Three Kinds of Files. (a) Byte sequence. (b) Record
sequence. (c) Tree-Based Structure

1.1.2. Uses of Files in Programming


Data can be stored in digital format such as image data, plain text or any other content by using the computer
file. Inside the different directories, computer files can be organised. Digital data can be kept by using the files.

Digital counterparts of paper document are known as computer files.

Programming language requires management of file. A person does some calculations and stores result in some
variables when s/he run program. Since the result will lose after finishing of execution because of variable
reside in main memory (RAM). Therefore, a permanent memory which is secondary (ROM) is required to store
the results. To store data permanently, file management is the management of secondary storage. Program helps
in both storing the calculation result and taking input from file. File management is defined as the process of
storing and retrieving data from or to file, and one goes to file whenever permanent storage of data is required.

One of the most prominent examples of file management application is Data Management System.

1.1.3. Relevance of Database Management System


Following are the relevance of database management system:
1) Reduction of Redundancies: Unwanted data repetition and of data can be avoided and total amount of
data storage can be effectively reduces with the help of database management system. Extra processing
required to trace the needed data in a large mass of data can also be eliminated with the help of this system.
DBMS controls any redundancies that exists and ensures the consistency of these multiple copies.

2) Shared Data: By any number of application programs or users, database allows the share of data under its
control.
3) Integrity: Not only the accuracy, but data integrity also ensures the consistency of data consists in
database. Therefore, data values are full within a specified range and their format is correct by checking
these data values entered in for storage. To provide data integrity, incorporation of adequate checks in
DBMS can also be ensured by the centralised control.
4) Security: It is important to maintain the confidentiality of the data as it is necessary for organisation.
Unauthorised persons are not allowed to access such confidential data. Proper access procedures are
followed including proper authentication schemes for access to the DBMS and extra checks before allowing
access to sensitive data must be ensured by the DBA who has the ultimate responsibility for the data in
DBMS. Implementation of different levels of security varies with the types of data and operations.
5) Conflict Resolution: DBS resolves the conflicting requirements of various users and applications as it
controls the database. Although with a relatively slower response, while allowing less critical applications
to use the database continuously, DBA selects the best file structure and method to access to get the
significant performance for the response critical application.

6) Data Independence: Physical data independence and logical data independence are the two bases to
consider the data independence. Organisation of the files or physical storage devices can be changed
without any change in the eternal views or conceptual view and thus in application programs using the
database with the help of physical independence.

1.1.4. Database Manager


A program module that provide interaction between the low level data stored in the database and application
programs and problems submitted to the system is refer to database manager. Interfacing with file system is
possible with the help of database manager.

Converting the queries of the users coming directly from the query processor or indirectly from an application
program from the logical view of the user to the physical file system is one of the main functions of database
manager. Moreover, the activity to enforce constraints in order to maintain the consistency and integrity of the
both data and security is also performed by the database manager.

Database manager controls the synchronisation of simultaneous operations performed by the users. Both backup
and recovery operations are performed by the data managers.
Database Management System

Database Manager

Operating System

Computer Hardware

Following are the tasks managed by the database manager:


1) Interface with the File Manager: Storing of raw materials on disk using the file system provided by a
conventional operating system facilitates the interaction between the database manager and file manager of
the operating system. The Data Manipulation Language statement is translated into the sequence of low-
level file system commands for storing, retrieving and updating data in the database by the database
manager.
2) Integrity Enforcement: Database manager checks that the consistency constraints do not violets by the
update in the database. For example, in banks, database manager ensures that no account balance is below
`1000 otherwise the consistency constraints in violated.
3) Security Enforcement: The security of database is ensured by the database manager by defining the
security checks and constraints. The database manager has the right whether to allow the user to use
database or to deny it. Only database manager is responsible to allow the user to access the database.
4) Backup and Recovery: Database manager must ensure that the database is not lost or damaged by taking
its back-up regularly. It provides required recovery procedure to resurrect the database in case of damaged
or lost database, if any.

1.1.5. Characteristics of Data Communication


Following are the characteristics of data communication:
1) Delivery: The data communication ensures the effective delivery of the data to its destination. It also
ensures that data is received by the intended user or device through intended user or device.

2) Accuracy: Data communication system also ensures the accurate delivery of the data. It eliminates the
unusable data that have been altered in transmission and left uncorrected.

3) Timeliness: Data communication system also ensures the timely delivery of the data. When it comes to
video and audio, timely delivery implies sending data as soon as it is created, in the same sequence as it is
created, and without substantial delay. Real-time transmission is the term for this type of distribution.
4) Jitter: The fluctuation in packet arrival time is referred to as jitter. It is the transmission of audio or video
packets with an uneven delay. Assume that video packets are delivered every 3D-ms, for example. If some
packets come with a 3D-ms delay while others arrive with a 4D-ms delay, the video quality will be
inconsistent.

You might also like