Vous êtes sur la page 1sur 6

Question 1: Explain the role of Database administrator.

Database Administrator
The Database Administrator (DBA) who is like the super user of the system.

System Architecture of a DBMS Role of Database administrator: The role of the DBA is very important and is defined by the following functions. Defining the Schema: The DBA defines the schema. Schema contains the structure of the data in the application. The DBA determines what data needs to be present in the system and how this data has to be represented and organized. Liaising with Users: The DBA needs to interact continuously with the users to understand the data in the system and its use. Defining Security & Integrity Checks: The DBA finds about the access restrictions 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 backed 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.

Physical Storage Structure of DBMS


Physical Storage Structure 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.

Indexing
Indexing is a common method for making retrievals faster. Consider the example of CUSTOMER table used above. The following query is based on Customer's city. Retrieve the records of all customers
2

who reside in Delhi Here a sequential search on the CUSTOMER table has to be carried out and all records with the value 'Delhi' in the Cust_City 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 accesses depends on the volume of data. If the records are stored physically together, the number of pages depends on the size of each record also. If such queries based on Cust_City field are very frequent in the application, steps can be taken to improve the performance of these queries. Creating an Index on Cust_City is one such method. This results in the scenario as shown below.

A new index file is created. The number of records in the index file is same as that of the data file. The index file has two fields in each record. One field contains the value of the Cust_City field and the second contains a pointer to the actual data record in the CUSTOMER table. Whenever a query based on Cust_City 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 records with value 'Delhi' in the Cust_City field in the index file are 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 Database. Database System.

2. Services of a

Three Level Architecture of a Database


A commonly used view of data approach is the three level architecture suggested by ANSI/SPARC (American National Standards Institute/Standards Planning and Requirements Committee). ANSI/SPARC produced an interim report in 1972 followed by a final report in 1977. The reports proposed an architectural framework for databases. Under this approach, a database is considered as containing data about an enterprise. The three levels of the 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 (conceptual view) from the external data representation and from the physical data structure layout. A database system that is able to separate the three different views of data is likely to be flexible and adaptable.

Services of a Database System


Following are services which should be provided by any full scale Database System: 1. Data Storage, Retrieval and Update: A DBMS must furnish users with the ability to store, 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 mechanism, 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.
4

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 : 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 changes to the data follow certain rules. 9. Services to Promote 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 Notations

Basic Constructs of E-R Modeling


The ER model views the real world as a construct of entities and association between entities. 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. Special Entity Types: Associative entities which also known as intersection 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 attributes or relationships that apply only to the subset. Associative entities and generalization hierarchies are discussed in more detail below. Relationships: A Relationship represents an association between two or more entities. An example of a relationship would be: Employees are assigned to projects, projects have subtasks, and departments manage one or more projects Relationships are classified in terms of degree, connectivity, cardinality, and existence. These concepts will be discussed below. Attributes: Attributes describe the entity of which they are associated. A particular instance of an attribute is a value. For example, "Jane R. Hathaway" is one value of the attribute Name. The domain of an attribute is the collection of all possible values an attribute can have. The domain of Name is a character string. Classifying Relationships: Relationships are classified by their degree, connectivity, cardinality, direction, type, and existence. Not all modeling methodologies use all these classifications.
5

E-R Notations
All notational styles represent entities as rectangular boxes and relationships as lines connecting boxes. Each style uses a special set of symbols to represent the cardinality of a connection. The notation 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. Relationships are represented by a solid line connecting two entities. The name of the relationship is written above the line. Relationship names should be verbs. Attributes, when included, are listed inside the entity rectangle. Attributes which are identifiers are underlined. Attribute names should be singular nouns. Cardinality of many is represented by a line ending in a crow's foot. If the crow's 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 bar (looks like a 1) next to the entity for an instance is required. Optional existence is shown by placing a circle next to the entity that is optional.

Example: