Showing posts with label RDMS. Show all posts
Showing posts with label RDMS. Show all posts

Saturday, December 17, 2011

Database Administrator

Database Administrator:-Schema definition. -The DBA creates the original database schema by executing a set of data definition statements in the DDL.
-Storage structure and access-method definition.To define the storage structure and access methods.
- Schema and physical-organization modification.--The DBA carries out changes to the schema and physical      organization to reflect the changing needs of the organization, or to alter the physical organization to improve    performance.
-Granting of authorization for data access--
-Routine maintenance-
-To grant authorization for data access
-To specify integrity constraints

Hierarchical Model

Hierarchical Model - A hierarchical database is similar in nature to a file system, with a root or parent node and one or more children referencing the parent. This makes for a very fast
data-access path.
The hierarchical model organizes data elements as tabular rows, one for each instance of an entity. Consider a company's organizational structure. At the top we have a General Manager (GM). Under him we have several Deputy General Managers (DGMs). Each DGM looks after some departments and each department will have a manager and many employees. When represented in hierarchical model, there will be separate rows for representing the GM, each DGM, each department, each Manager and each Employee. The row position implies a relationship to other rows. A given employee belongs to the department that is closest above it in the list and the department belongs to the manager that is immediately above it in the list and so on.
it has the disadvantages of low flexibility, lack of an ad-hoc
query capability, and high application maintenance.


Data integrity Since the hierarchical model is based on the parent Childes relationship, there is always a link between the parent segment and the child segments under it The child segments arc always aromatically referenced to its parent.

File-processing system and a DBMS

File-processing system and a DBMS:-
a.)Both systems contain a collection of data and a set of programs which access
that data. A database management system coordinates both the physical
and the logical access to the data, whereas a file-processing system coordinates
only the physical access.
b.)A database management system reduces the amount of data duplication by
ensuring that a physical piece of data is available to all programs authorized
to have access to it,whereas data written by one programing a file-processing
system may not be readable by another program.
c.)A database management system is designed to allow flexible access to data
(i.e., queries), whereas a file-processing system is designed to allow predetermined
access to data (i.e., compiled programs).
d.)A database management system is designed to coordinate multiple users
accessing the same data at the same time. A file-processing systems usually designed to allow one or more programs to access different data files at
the same time. In a file-processing system, a file can be accessed by two
programs concurrently only if both programs have read-only access to the
file.

Entity Sets

Entity Sets:-An entity is a “thing” or “object” in the real world that is distinguishable from all
other objects. For example, each person in an enterprise is an entity. An entity has a
set of properties, and the values for some set of properties may uniquely identify an entity.

An entity set is a set of entities of the same type that share the same properties, or
attributes.The set of all persons who are customers at a given bank, for example, can be defined as the entity set customer.The individual entities that constitute a
set are said to be the extension of the entity set.Entity sets do not need to be disjoint.


A database thus includes a collection of entity sets, each of which contains any
number of entities of the same type.

Disadvantages of file processing system

Disadvantages of file processing system:-
a.)Data redundancy and inconsistency.:-Data redundancy means duplication of data.Non data base system maintain separate copy of data for each applied redundancy leads to higher storage and access cost.and also inconstancy.
b.)Difficulty in accessing data.:-file-processing environments do not allow needed data to be retrieved in a convenient and efficient manner.
c.)Data isolation.:- Because data are scattered in various files, and files may be in
different formats, writing new application programs to retrieve the appropriate
data is difficult.
d.)Integrity problems.:- The data values stored in the database must satisfy certain
types of consistency constraints.when new constraints are added, it is difficult
to change the programs.
e.)Atomicity problems.:-the funds transfer must be atomic—it must happen in its entirety or
not at all. It is difficult to ensure atomicity in a conventional file-processing
system.
f.)Concurrent-access anomalies.:-It not provide it.
g.)Security problems:-enforcing security constraints is difficult.

ACID properties

Properties of Transactions--
The following are the ACID properties:
1. Atomicity: A transaction is an atomic unit of processing; it is either performed in its entirety or not performed at all.Either all operations of the transaction are reflected properly in the
database, or none are.
2. Consistency preservation: A transaction is consistency preserving if its complete execution take(s) the database from one consistent state to another.Execution of a transaction in isolation (that is, with no other
transaction executing concurrently) preserves the consistency of the database.
3. Isolation: A transaction should appear as though it is being executed in isolation from other transactions. That is, the execution of a transaction should not be interfered with by any other transactions executing concurrently.
Even though multiple transactions may execute concurrently, the
system guarantees that, for every pair of transactions Ti and Tj , it appears
to Ti that either Tj finished execution before Ti started, or Tj started execution
after Ti finished. Thus, each transaction is unaware of other transactions
executing concurrently in the system.
4. Durability or permanency: The changes applied to the database by a committed transaction must persist in the database. These changes must not be lost because of any failure.
After a transaction completes successfully, the changes it has made
to the database persist, even if there are system failures.

Friday, December 16, 2011

Advantages of DBMS over Simply storing data

Advantages of DBMS over Simply storing data:-
A.)Data independence and efficient access.:-Database application programs are independent
of the details of data representation and storage.DBMS provides efficient storage and
retrieval mechanisms, including support for very large files, index structures and
query optimization.
B.)Reduced application development time.:-DBMS provides several important
functions required by applications, such as concurrency control and crash
recovery, high level query facilities, etc., only application-specific code needs to
be written.
C.)Data integrity and security. The view mechanism and the authorization facilities
of a DBMS provide a powerful access control mechanism. Further, updates to the
data that violate the semantics of the data can be detected and rejected by the
DBMS if users specify the appropriate integrity constraints.
D.)Data administration. By providing a common umbrella for a large collection of
data that is shared by several users, a DBMS facilitates maintenance and data
administration tasks. A good DBA can effectively shield end-users from the chores
of fine-tuning the data representation, periodic back-ups etc.
E.)Concurrent access and crash recovery.