You are on page 1of 9

DBMS ONLINE ASSIGNMENT | 2007

ONLINE ASIGNMENT

Submitted To: Submitted By:

Er.K.S.Dhindsa Shashwat Jai Singh 19/05


Amanpreet Kaur 20/05
Gurjot Singh 17/05

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

Q1Explain the physical data independence and logical data independence


with at least two examples?

Logical data independence: capacity to change conceptual schema without


having to change external schema for example adding a new field to a
record. An application program's view hides this change from the program,
Columns could be added to tables without changing the existing external
schema or application programs Changes here necessitate changes to the
physical level

Physical data independence: capacity to change internal schema without


changing conceptual schema for example changing from unblocked to
blocked record storage, or from sequential to random-access files, the
internal schema may be changed when certain file structures are
reorganized or new indexes are created to improve database performance,
DBA decides it is more efficient to store the data in a B+ tree instead of a
heap, so changes the internal schema then he changes the mapping to the
conceptual schema and conceptual schema remains unchanged.

Q2 What are the roles of dba?

Ans:
Database Administrator
Database administration involves activities related to database management and
control. Broadly, a database administrator must ensure that the database
is available to users at all times. Database administration includes data
back-up and recovery, performance tuning and analysis and to some
extent may include database design. The exact administration tasks
would depend on the kind of database being administered and prevailing
information technology policies of the organization.

The latest trends in database administration would suggest that most of the
routine tasks of back-up is being accomplished by the software itself.
However disaster recovery and performance tuning, still remains within
the scope of human involvement.

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

A Database administrator's primary task is to install database server and other


application tools associated with databases. This may entail knowledge of
the kind of hardware on which the database is to be installed. It is
important to understand the hardware requirements since it would
directly impact on the uptime of the database. Data requires enormous
amount of storage capacity. There is a constant need to add storage
capacity as the volume of data increases. This is one of the prime tasks of
a database administrator. A good database design would take into
consideration future storage requirements and accordingly cater for it. A
database administrator has to create primary database storage structures
after application developers have designed an application.

Database administrators have to work in a dynamic environment. Database


security may be compromised either by malicious intrusions or
inadvertently. To ensure maintainability and uptime database
performance tuning has to be carried out. One of the major tasks is to
take constant back-up of data. Back-up can be performed both at the
hardware level as well as from the database itself. More frequent the
backups, more the validity of the restored data. Database recovery in case
of emergency is critical to any business and commercial database.

Database administration is a critical operation in database management. Some


of the routine administration tasks are being automated and performed
automatically by the system itself. Performance monitoring and tuning is
a continuous ongoing task of a database administrator. Data after all is at
the heart of any database management system. Data corruption or data
loss may be malicious or unintentional. Constant backup of data is
necessary to restore data in case of disasters.

Database administrator duties


· DBA primary job to make disaster recovery plans like taking and testing
backups, performance analysis and take part in database design.

· DBA job is to install new editions of DBMS software in order to maintain


and keep the system up to date.

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

· DBA should work with system administrator in order to configure hardware


and software.

· One of the major responsibilities of DBA is to secure the database from


unauthorized access. He can add or remove the users and consistently
check security problems.

· The DBA will regularly check and analyze the data and make appropriate
suggestions with respect to efficiency and performance of the data
storage.

· When the database design is in its initial stage then DBA can play a
significant role. Because of his participation through out the design phase
of database most of the problems that might take place can be removed.

· Perform other responsibility as necessary such as database tuning, Database


Cold and Hot backup and implementation of the database structure of
table.

· Develop and enforce both database and OS-level security policies for data
protection.

· create and improve database administrative programs, which are both written
in perl, and/or UNIX bash shell.

· Research and recommend optimal hardware configurations for new server


purchases.

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

Q3 Explain the distinctions among the terms primary key, foreign key,
candidate key, composite key and super key?

ANS::
Super keys- A superkey is a set of one or more attributes that, taken
collectively, allow us to uniquely identify a tuple in the relation.
E.g.—The customer-id attribute of the relation customer is sufficient to
distinguish one customer tuple from another. Thus customer-id is a superkey.
Also the combination of customer-name and customer-id is a superkey.
Customer name cannot be a superkey since several people may have same
name.
A superkey may consist of extraneous attributes.

Candidate keys- Super keys for which no proper subset is a superkey are
called candidate keys. Several distinct sets of attributes can serve as a
candidate key. Suppose the combination {customer-name, customer-street}
uniquely identifies a relation in a table.
{Customer-id} can also identify a relation uniquely. Then, the combination
{customer-name, customer-id} is not a candidate key because customer-id
itself alone is a candidate key.

Primary key- It is a candidate key that is chosen by the database designer as


the principle means of identifying tuples within a relation. The primary key
should be chosen such that its values are never, or rarely changed.

Foreign key- A relational schema, say r1, may include among its attributes
the primary key of another relation schema, say r2. This attribute is called a
foreign key from r1, referencing r2. The relation r1 is also called the
referencing relation of the foreign key dependency, and r2 is called the
referenced relation of the foreign key.

SUPERKEYS CANDIDATE KEYS


It consists of extraneous Minimal superkeys are called
Fields. Candidate keys.
It can be a combination
of more than 1 key

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

Q4 Construct an E-R diagram for a car-insurance company whose customers


own one or more cars each. Each car has associated with it zero to any
number of recorded accidents

Q5 Explain the concept of aggregation and generalization with examples?

Ans: GENERALIZATION:
A generalization hierarchy is a form of abstraction that specifies that
two or more entities that share common attributes can be generalized into a
higher level entity type called a super type or generic type. The lower levels
of entities become the subtype or categories, to the super type. Sub types are
independent entities.

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

EXAMPLE:

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

Account is the higher level entity set and savings account and current
account are lower level entity sets.

AGGREGATION:-
It is the process of compiling information on an object , thereby abstracting a
higher level object.

Dept. of Computer Science | FGS |


DBMS ONLINE ASSIGNMENT | 2007

AFTER AGGREGATION

Q6 List any 10 significant differences between file processing system and


DBMs ?
Ans
FILE MANAGEMENT SYSTEM DATABASE MANAGEMENT
Small Systems Large Systems
Relatively Cheap Relatively Expensive
Few Files Many Files
Files are ‘FILES’ Files are ‘TABLES’
Simple structure Complex Structure
More redundancy Reduced redundancy
Chances of inconsistency Consistent
Isolated data Data can be shared
No security Rigorous security
Simple and primitive Complex and sophisticated
backup/recovery backup/recovery
Often Single user Multiple users

Dept. of Computer Science | FGS |

You might also like