Professional Documents
Culture Documents
Mi0025 Database Management
Mi0025 Database Management
Mi0025 Database Management
Assignment No:1
1Q.
Differentiate between Traditional File System & Modern Database System? Describe the
properties of Database & the Advantage of Database?
A.
· Hence, a data base management system is the software that manages a database, and is
responsible for its storage, security, integrity, concurrency, recovery and access.
· The DBMS has a data dictionary, referred to as system catalog, which stores data about
everything it holds, such as names, structure, locations and types. This data is also
referred to as Meta data.
2Q. What is the disadvantage of sequential file organization? How do you overcome it?
What are the advantages & disadvantages of Dynamic Hashing?
A. One disadvantage of sequential file organization is that we must use linear search or
binary search to locate the desired record and that results in more i/o operations. In this there
are a number of unnecessary comparisons. In hashing technique or direct file organization,
the key value is converted into an address by performing some arithmetic manipulation on
the key value, which provides very fast access to records.
Let us consider a hash function h that maps the key value k to the value h(k). The
VALUE h(k) is used as an address.
3) Hash key: Let ‘R’ be a record and its key hashes into a key value called hash key.
1. The main advantage is that splitting causes minor reorganization, since only the
records in one bucket are redistributed to the two new buckets.
3. The main advantage of extendable hashing is that performance does not degrade as the
file grows. The main space saving of hashing is that no buckets need to be reserved for
future growth; rather buckets can be allocated dynamically.
Disadvantages:
1. The index tables grow rapidly and too large to fit in main memory. When part of the
index table is stored on secondary storage, it requires extra access.
2. The directory must be searched before accessing the bucket, resulting in two-block
access instead of one in static hashing.
A. Relationships:- In the real world, items have relationships to one another. E.g.: A
book is published by a particular publisher. The association or relationship that exists
between the entities relates data items to each other in a meaningful way. A relationship
is an association between entities.
Relationship set :-A collection of relationships of the same type is called a relationship
set.
Relationship instance:- data model objects are objects within the relationship instance
data model that have attributes which contain the data which should be used for a lookup
relationship. The primary objects in the relationship model are RelationshipInstance,
InstanceData, RoleInstance, KeyAttributeValue, and PropertyValue.
E.g.: Consider a relationship type WORKS_FOR between two entity types - employee
and department, which associates each employee with the department the employee
works for. Each relationship instance in WORKS_FOR associates one employee entity
and one department entity, where each relationship instance is ri which connects
employee and department entities that participate in ri.
Employee el, e3 and e6 work for department d1, e2 and e4 work for d2 and e5 and e7
work for d3. Relationship type R is a set of all relationship instances.
Figure 5.4: Some instances of the WORKS_FOR
relationship