Exp 1
Exp 1
Exp 1
01
THEORY:
Data:
Data may be defined as a known fact that can be recorded and that have implicit meaning.
Data are isolated facts from which the required information is produced. Data are distinct
pieces of information, usually formatted in a special way. They are binary computer
representations of sorted logical entities. A single piece of Data represents a single fact
about something in which we are inserted.
Information:
Data and information are closely related and are often used interchangeably. Information
is processed, organized or summarized data. It may be defined as collection of related data
than when put together, communicate meaningful and useful message to a recipient who
uses it, to make decision or to interpret the data to get the meaning. Data are processed to
create information, which is meaningful to the recipient.
Records:
A record is a collection of related of logically related fields or data items, with each field
possessing a fixed number of bytes and having a fixed data type. A record consist of values
for each field. It is an occurrence of a named collection of zero, one, or more than one data
items or aggregates. The data items are grouped together to from records. The grouping of
data items can be achieves through different ways to from different records for different
purposes. These records are retrieved or updated using programs.
Files:
A file is a collection of related sequence of records. In many cases, all records in a file are of
the same record type (each record having an identical format). If every record in the file
has exactly the same size (in bytes), the file is said to be made up of fixed-length records. If
Page 1 of 8
different records in the file have different size, the file is said to be made of variable-length
records.
Metadata:
A metadata (also called the data dictionary) is the data about the data. It is also called the
system catalog which is the self-describing nature of the database that provides the
programme data independence. The system catalog integrated the metadata. The Meta
data is the data that describe objects in the data base and makes easier for those objects to
be accessed or manipulated. It describes the database structure, constrains, application,
authorization, size of data types and so on. These are often used as an integral for
information resource management.
Database:
A data is defined as a collection of logically related data stored to gather. A database is
organized in such a way that a computer program can quickly select desired of data.
The names, addresses, telephone and so on, of the people we maintain in an address book,
store in the computer storage(such as floppy or hard disk), or in the excel worksheet of
Microsoft and so on, are the examples of a database. Since, it is a collection of related data
(addresses of people we known) with an implicit meaning, it is a database.
A database consists of the following four components
Data item
Relationships
Constraints and
Schema
Schema:
The plan of the database is known as schema. Schema gives the names of the entities and
attributes. it specifies the relationships among them. It is a framework into which the
values of the data items are fitted. The plans or the format of schema remains same. but the
values fitted into this format changes from instance to instance. in other terms, schema
means an overall plan of all the data item type and record types stored a database. Schema
includes the definition of the database name, the record type and the components that
makes those records.
Subschema:
A subschema is a subnet of the schema and inherits the same property that a schema has
the plan for a view is often called subschema. Subschema refers to the application
programmer’s views of the data item types and record types, which he or she uses. It gives
the users a window through which he or she can view only that parts of the database, which
is interested to him. In other words, subschema defines the portion of database as “seen”
by the application programs that actually produced the desired information from the data
contained within the database. Therefore, different application programs can have
different view of data.
Page 2 of 8
Instances:
When schema framework is filled in the data items values or the contents of the database at
any point of time, it is referred to as an instance of the database. The term instance is also
called stage of the database or snapshot.
Each variable has a particular value at a given instance. The value of the variables in a
program at a point in time corresponds to an instance of a database schema.
Structure of a DBMS:
Page 3 of 8
DDL (Data Description Language):
It allows users to define the database, specify the data types, and data structures, and the
constraints on the data to be stored in the database, usually through data definition
language. DDl translates the schema written in a source language into the object schema,
thereby creating a logical and physical layout of the database.
Advantage of DBMS:
Minimal data redundancy
Program-data independence
Efficient data access
Improved data sharing
Improved data consistency
Improved data integrity
Improved security
Increased productivity of application development
Enforcement of standards
Economy of scale
Balance of conflicting requirements
Improved data accessibility and responsiveness
Page 4 of 8
Disadvantages of DBMS:
Increased complexity
Requirement of new and specialized manpower
Large size of DBMS
Increased installation and management cost
Additional hardware cost
Conversion cost
Need for explicit backup and recovery
Page 5 of 8
Three-level ANSI_SPARC database architecture:
The architecture of most commercial DBMS available today is based to some extent on
ANSI-SPARC three tier database architecture consist of following three levels:
- Internal level
- Conceptual level
- External level
Internal level:
Internal level is physical representation of the database on the computer and this view as a
found at the lowest level of abstraction of database. This level indicates how the data will be
stored in the database and describes the data structure, file structure and access method to
be used by database. It describes the way the data in the database. The internal schema
contain the definition of the stored record, the method of representing the data fields,
index and hashing schemas and the access method used. Internal level provides coverage
to the data structure and file organization used to store data on storage device. Internal
level is concerned with the following activities:
Storage space allocation for data and storage.
Record description for storage with stored sizes for data items.
Record placement
Data compression and encryption techniques.
The process arriving at a good internal schema is called physical database assign. The
internal schema is written using SQL or internal data definition language (DDL).
Conceptual level:
The conceptual level is the middle level in the three tier architecture. At this level of
database abstraction, all the database entities and relationship among them are included.
Conceptual level provides the community view of the database and describes what data is
stored in the database and relationship among the data. It contains the logical structure of
Page 6 of 8
the entire database as seen by the DBA. One conceptual view represents the entire database
of on organization. It is a complete view of the data requirement of the organization that is
independent of any storage consideration. The conceptual schema defines conceptual
view.it is also called the logical schema for database.
Conceptual level is concern with the following activities:
All entities, their attributes and their relationship
Constrains on the data
Semantic information about the data
Checks to retain data consistency and integrity
Security information
The conceptual schema is written using conceptual data definition language.
External level:
The external level is the users view in the database. This level is at the highest level of data
abstraction where only those portions of the database of concern to a user or application
programs are included. In other word this level describes that part of the database that is
the relevant to the user any no. of user views, even identical, may exist for a given
conceptual or global view of the database.
Data independence:
Data independence is a major objective of implementing DBMS in an organization. It may
be defined as the immunity to application and access techniques. Alternatively data
independence is the characteristic of a database system to change the schema at one level
without having to change the schema at the next higher level. In other words, application
program do not depend on only one particular physical representation or access technique.
This characteristic of DBMS insulates the application program for change in the way the
data is structure and stored. The data independence achieved by DBMS through the use of
the 3-tier archi. of data abstraction.
1. Physical data independence
2. Logical data independence
Page 7 of 8
Logical data independence:
Immunity of the external schemas to changes in the conceptual schema is to as logical data
independence. In logical data independence, the user are shielded from changes in the
logical structure of the data or changes in the conceptual schema such as the addition and
deletion of entities , addition and deletion of attributes or addition and deletion of
relationship ,must be possible without changing existing external schemas or having to
rewrite application programs. Only the view definition and the wrapping need be changed
in a DBMS that support logical data independence.
Database Architecture:
The architecture of a database system is a greatly influenced by the underlying computer
system on which the database system runs. Database systems can be centralized or client
server, where one server machine executes work on behalf of multiple client machine.
Database systems can also be defines to explicit parallel computer architectures distributed
database span multiple geographically separated machines.
Most users of a database system today are not present at the site of the database system,
but cannot connect to it through a network we can therefore differentiate between client
machines, on which remote database users work and server machines, one which the
database system.
Database applications are usually partitioned into 2 or 3 parts. In a 2-tier architecture, the
application is partitioned into a component that resides at the client machine, which
invokes database system functionality at the server machine through query language
Statements. Application programs interface standard like ODBC and JDBC are used for
interaction between the client and server. In contrast, 3-tier architecture, the client
machine acts as merely a front end and does not contain any direct database calls instead
the client and communication with a database system to access data, the business logic of
the application which says what action to carry out under what action to carry out what
conditions is embedded in the application server, instead of being distributed across
multiple client. Three –tier applications are more appropriate for large application and for
application that run on the world wild web.
Page 8 of 8