You are on page 1of 6

Rohit.

Kumar Roll No: 520776763 BCA 2nd Semester BC0041 01 Fundamentals of Database Management

Question 1 - Explain the role of Data base administrator. Ans. The role of the DBA is very important and is defined by the following functions. Defining the Schema The DBA defines the schema which contains the structure of the data in the application. The DBA determines what data needs to be present in the system and how to be represented and organized. Liaising with Users The DBA needs to interact continuously with the users to understand the data in the system its use. Defining Security & Integrity Checks The DBA finds about the access restriction to be defined and defines security checks accordingly. Data integrity checks are also defined by the DBA Defining Backup/Recovery procedures The DBA also defines procedures for backup and recovery. Defining backup procedures includes specifying what data is to back up, the periodicity of taking backups and also the medium and storage place for the backup data. Monitoring Performance The DBA has to continuously monitor the performance of the Queries and take measures to optimize all the queries in the application.

Question 2 - Write notes about (1) Physical Storage Structure of DBMS (2) Indexing. Ans. Physical Storage Structure of DBMS:

It shows how the data is physically stored on the disk and some of the access mechanisms commonly used for retrieving this data. The Internal Level is the
1

level which deals with the physical storage of data. While designing this layer, the main objective is to optimize performance by minimizing the number of accesses during the various database operations. The following figure shows the process of database access in general. The DBMS views the database as a collection of records. The file manager of the underlying Operating System views it as a set of pages and the Disk Manager views it as a collection of physical locations on the disk. When the DBMS makes a request for a specific record to the File manager the latter maps the record to a page containing it and requests the Disk Manager for the specific page. The Disk manager determines the physical location on the disk and retrieves the required page. DATABASE ACCESS

Indexing: Indexing is another common method for making retrievals faster. Consider the example of CUSTOMER table. The following query is based on Customers city. Retrieve the record of all customers who reside Delhi Here a sequential search on the CUSTOMER table has to be carried out and all records with the value Delhi in the Causticity field have to be retrieved. The time taken for this operation depends on the number of pages to be accessed. If the records are randomly stored, the page access depends on the volume of data. If the records are stored physically together, the number of page depends on the size of each record also. If such queries based on Causticity field are very frequent in the application, steps can be taken to improve the performance of these queries. Creating an index on Causticity is one such method. This result in the scenario as shown below
2

A new index file is created. The number of records in the index file is same as that that of the data file. The index file has two fields in each record. One field contains the value of the Cuts-City field and the second contains a pointer to the actual data record in the CUSTOMER table. Whenever a query based on Causticity field occurs, a search is carried out on the index file. Here, it is to be noted that this search will be much faster than a sequential search in the CUSTOMER table, if the records are stored physically together. This is because of the much smaller size of the index record due to which each page will be able to contain more number of records. When the record with value Delhi in the Causticity field in the index files is located, the pointer in the second field of the records can be followed to directly retrieve the corresponding CUSTOMER records. Thus the access involves a sequential access on the index file and a direct access on the actual data file.

Question 3 - Write notes about (1) Three Level Architecture of a Database (2) Services of a Database System. Ans. Three level Architecture of a Database: The three level of a architecture are three different views of the data. 1.) External individual user view 2.) Conceptual community user view 3.) Internal physical or storage view The three level database architecture allows a clear separation of the information meaning from the external data representation and from the physical data structure layout. We now briefly discuss the different views. The External Level is the view that the individual user of the database has. This view is often a restricted view of database and the same database may
3

provide a number of different views for different classes of users. In general, the end users and even the application programmers are only interested in a subset of the database The conceptual view is the information model of the enterprise and contains the view of the whole enterprise without any concern for the physical implementation. This view is normally more stable than the other two views. In database, it may be desirable to change the internal view to improve performance while these has been no change in the conceptual view of the database and it includes all the information that is going to be represented in the database. The conceptual view is defined by the conceptual schema which includes definitions of each of the various types of data. The internal view is the view about the actual physical storage of data. It tells us what data is stored in the database and how. At least following aspects are considered at this level: 1.) Storage allocation e.g. B-trees, hashing etc. 2.) Access paths e.g. specification of primary and secondary keys, indexes and pointers and sequencing. 3.) Miscellaneous e.g. data compression and encryption techniques, optimization of the internal structures. Services of a Database System: Following are services which should be provided by any full scale DBMS: 1. Data storage, Retrieval and update DBMS must furnish users with the ability to stored, retrieve and update data in the database 2. A User Accessible Catalog. A DBMS must furnish a catalog in which descriptions of data items are stored which is accessible to users. 3. Transaction support A DBMS must furnish a mechanics, which will ensure that either all the updates corresponding to a given transaction are made, or that none of them is made. 4. Concurrency Control Services A DBMS must furnish a mechanism to ensure that the database is updated correctly when multiple users are updating the database at the same time. 5. Recovery Services A DBMS must furnish a mechanism for recovering the database if the database is damaged in any way 6. Authorization services A DBMS must furnish a mechanism to ensure that only authorized users can have access to the database. 7. Support for data Communication
4

A DBMS must be able to integrate with communication software. 8. Integrity Services A DBMS must furnish a mechanism to ensure that both the data in the database and change to the data follow certain rules. 9. Services to Provide Data Independence A DBMS must include facilities to support the independence of programs from the actual structure of the database. 10. Utility Services A DBMS should provide a set of utility services.

Question 4 - With a necessary example explain (1) Basic Constructs of E-R Modeling (2) E-R Notation. Ans. Basic Constructs of E-R Modeling The ER model views the real world as a construct of entities and association between entities. 1. Entities Entities are the principal data object about which information is to be collected. Entities are usually recognizable concepts, either concrete or abstract, such as person, places, things, or events which have relevance to the database. Entities are classified as independent or dependent. 2. Special Entity Types Associative entities are entities used to associate two or more entities in order to reconcile a many-to-many relationship. Subtypes entities are used in generalization hierarchies to represent a subset of instances of their parent entity, called the Super type, but which have attributive or relationship that apply only to the subset. 3. Relationships A Relationship represents an association between two or more entities. Relationships are classified in terms of degree, connectivity, cardinality, and existence. These concepts will be discussed below. 4. Attributes It describes the entity of which they are associated. A particular instance of an attribute is a value. It can be classified as Identifiers or descriptors. Identifiers, more commonly called keys, uniquely identify an instance of an entity. A descriptor describes a non-unique characteristic of an entity instance. 5. Classifying Relationships

Relationships are classified by their degree, connectivity, cardinality, direction, type and existence. Not all modeling methodologies use all these classifications. E-R Notation: There is no standard for representing data object ER diagrams. Each modeling methodology used its own notation. The original notation used by chew is widely used in academics texts and journals but rarely seen in either CASE tools or publications by non-academics. Today, there are number of notation used, among the more common are Bachman, crows foot, and IDEFIX. All notational styles represent entities as rectangular boxes and relationship as lines connecting boxes. Each style uses a special set of symbols to represent the cardinality of a connection. The used in this document is from martin. The symbols used for the basic ER constructs are: Entities are represented by labeled rectangles. The label is the name of the entity. Entity names should be singular nouns. Relationship is represented by a solid line connecting two entity. The name of the relationship is written above the line. Relationship names should be in verbs. Attributes, when included, are listed inside the entity rectangle. Attributes which are identifiers are underlined. Its name should be singular noun. Cardinality of many is represented by a line ending in a crows foot. If the crows foot is omitted, the cardinality is one. Existence is represented by placing a circle or a perpendicular bar on the line. Mandatory existence is shown by the bars next to the entity for an instance is required. Optional existence is shown by placing a circle next to the entity that is optional.

You might also like