Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Topic Beyond Syllabus DBMS

Uploaded by

msreevanicse
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Topic Beyond Syllabus DBMS

Uploaded by

msreevanicse
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Topic Beyond syllabus

Explain various functions of DBMS? (V.V.IMP)


DBMS Functions:
A DBMS performs several important functions that guarantee the integrity
and consistency of the data in the database. They include:
1. Data dictionary management: The DBMS stores definitions of the data elements and their
relationships in a “data dictionary”. The DBMS uses the data dictionary to look up the required
component structures and relationships. Additionally, any changes made in the database structure are
automatically recorded in the data dictionary.
2. Data Storage Management: A modern DBMS provides storage not only for the data but also for
related data entry forms or screen definitions , report definitions, procedural code etc. Data storage
management is also important for database “performance tuning”. Performance tuning relates to the
activities that make the database perform more efficiently in terms of storage and access speed.
3. Data transformation and presentation: The DBMS transforms entered data to conform to required
data structures. The DBMS formats the physically retrieved data to make it conform to the user’s logical
expectations.
4. Security management: The DBMS creates a security system that enforces user’s security and data
privacy. Security ruler determines which users can access the database, which data items each user
can access and which data operations the user can perform. This is important in multiuser database
systems where many users access the database simultaneously.
5. Multiuser access control: To provide data integrity and data consistency, The DBMS uses
sophisticated algorithms to ensure that multiple users can access the database concurrently without
compromising the integrity of the database.
6. Backup and recovery management: The DBMS provides back up and data recovery to ensure data
safety and integrity. Recovery management deals with the recovery of the database after a failure, such
as a bad sector in the disk or the power failure.
7. Data Integrity Management: The DBMS promotes and enforces integrity rules, thus minimizing data
redundancy and maximizing data consistency. The data relationships stored in the data dictionary are
used to enforce data integrity.
8. Database access languages and Application programming Interfaces: The DBMS provides data
access through a query language, also provides data administrative utilities used by the DBA and the
database designer to create, implement, monitor and maintain the database.
9. Data Communication Interfaces: Current-generation DBMSs accept end-user request via multiple,
different network environments. For example, the DBMS might provide access to the database via
internet through the use of web browsers such as Mozilla Firefox etc.

Explain about different types of Data Models in DBMS? (V.V.IMP) ********


A Data Model is a collection of concepts that can be used to describe the Conceptual or Logical and
Physical Structures of a database. The structure of a database means that holds the data datatype, relations
and constructions.
 A data model is a communication tool (conceptual tool) for describing data, relationship and
constraints.
 Data modeling is the first step in designing a database.
 A data model can provide interaction among the designer, application programmer and end user.
 A good database is designed only when we develop good data model.
 A data model can be of two types.
1. Record Based data models
2. Object Based data models.
Record-based data models: In this model, data is represented in the form of fixed format records. The Record-
based data models are:
1. Hierarchical model
2. Network model
3. Relation model

Hierarchical model

A hierarchical data model is a data model in which the data is organized into a tree- like structure. The structure
represents information using parent/child relationships. Each parent can have many children but each child only
has one parent. The hierarchical model was developed in the 1960s to manage large amounts of data. The
hierarchical structure consists of levels, or segments. The root segment is the parent of the level1 segments, which,
in turn, are the parents of the level2 segments, etc. In short, the hierarchical model depicts a set of one-to-
many(1:M) relation ships between a parent and its children segments.(Each parent can have many children, but
each child has only one parent).
Advantages
 Promotes data sharing.

 Conceptual simplicity.
 Database security.
 Data Independence.
 Database integrity.
 Efficient with 1:M relationships.
Disadvantages
 Complex implementation.
 Difficult to manage.
 Structural dependency.
 Applications programming and use complexity.
 No support of DDL and DML.
 Implimentation limitations i.e no M:N relationships.

Network model
In the Network Model, a parent can have several children and a child can also have many parent records. Records
are physically linked through pointers. The network model was created to represent complex relationships more
effectively than the Hierarchical model. This model was developed in the late 1960s. In the network model, the
user perceives the network database as a collection of records in 1:M relationships. In network database
terminology, a relationship is called a set. Each set is composed of at least two record types: a parent record and a
child record. A set represents a 1:M relationship between the parent and the child.
Example: The following diagram is an example for network Model.

Advantages:
 Conceptual simplicity.
 Handels more relationship types such as M:N
 Data access flexibility.
 Promotes database integrity.
 Support of DDL and DML.

Disadvantages
 System complexity.
 Structural Dependency.
 Complex Implementation.

Relational Model
The relational model was introduced in 1970 by E.F.Codd. In the Relational Model, all data is maintained in the
form of tables consisting of rows and columns. Data in two tables is related through common columns and not
through pointers. This makes Querying much easy in a Relational DBMS. Unlike the Hierarchical and Network
Models, there are no physical links in a relational model. The relationship type is often shown in a relational-
schema. A table yields complete data and structural independence.
Example: The following set of tables is an example for Relational Model.

Table: Employee Table: DEPARTMENT

Empn Ename Job Salary Deptno deptno Dept name


o 10 Finance
1 Raju Manager 16000 10 20 Accounting
2 Rani Clerk 4000 20 30 Marketing
3 Anil Clerk 2500 10
4 Balu Accountant 5000 30

Advantages:
 Structural Independence
 Improved conceptual simplicity
 Easier database design, implementation, management, and use
 Ad hoc Query capability(SQL).
Disadvantages:
 Requires large hardware and system software overhead.
 Possibility of poor design and implementation.

Object-based data mode: These models Represents the data in the form of objects. The object-
based data models are:
1. Object-oriented data model
2. Entity-relationship model.
Object-oriented data model: This model was introduced in 1990’s. In this model, the data is represented in the
form of objects. In this model we can store not only data but also procedures (methods). Object-oriented data
model is based on following components.
Object: Object is a real time entity that must be existing in the world.
Attribute: It describes the properties/characteristics of an object.
Ex: STUDENT object contains attributes like sno, name, marks, etc. Method: It is a set of instructions
that performs a specific task.
Representation of an object
Entity-Relationship model: Entity-Relationship model is graphical representation of entities, attributes and
relationship.
 This model becomes very popular because it is easier to understand databases graphically than text.
 ER model was introduced by “Peter Chen” in 1976.
 ER model is based on the following components.
Entity: An entity is a person, place, object, event or concept in user’s environment, which we want to store in
database. It is represented in the ERD by a “rectangle”.
Attribute: It describes the properties/characteristics of an entity. It is represented by an “ellipse”.
Relationship: Relationship describes associations among data.
It is represented by a “ diamond”.

Functional Data Model: The functional data model makes it easier to define functions and call them
where ever necessary to process data.

What are the various situations where DBMS is not necessary?


In spite of the advantages of using a DBMS, there are a few situations in which a DBMS may
involve unnecessary overhead costs that would not be incurred in traditional file processing. The overhead costs
of using a DBMS are due to the following:
 High initial investment in hardware, software, and training
 The generality that a DBMS provides for defining and processing data
 Overhead for providing security, concurrency control, recovery, and integrity functions
 No multiple-user access to data
 Additional problems may arise, if the database designers and DBA do not properly design the
database or if the database systems applications are not implemented properly.
 An application may need to manipulate the data in a way not supported by the query language
Q) Define Is-A Relationship and attribute inheritance?

Is-A relationship supports attribute inheritance and relationship participation. In EE-R


diagram, the subclass relationship is represented by Is-A relationship. Attribute inheritance is the property
by which subclass entities inherit values for all attributes of the Superclass.

Example: The following example shows a representation of the EMPLOYEE Supertype with its three
subtypes using EER-Notations. Consider the following entities set having the attributes.
Supertype: EMPLOYEE  Emp_No, Emp_Name, Address.
Subtype: HOURLY_EMPLOYEE  Emp_No, Emp_Name, Address, Hourly_Rate.
SALARY_EMPLOYEE  Emp_No, Emp_Name, Address, Annual_Salary.
CONTRACT_EMPLOYEE  Emp_No, Emp_Name, Address, Cont_Number,
Billing_Rate.

In that above all of the EMPLOYEE types several attributes in common namely Emp_No, Emp_Name,
Address. In addition each type has one are more attribute distinct from the attributes of the types.

In the above figure shows a representation of the EMPLOYEE Supertype with the 3 subtypes using EER-Notation.
Attributes shared by all employees are associated with the EMPLOYEE entity type. Attributes that are peculiar to
each subtype are included with that subtype only

What is EER(Enhanced Entity Relationship) model? Explain the basic concepts of EER model?
An entity type is a collection of entities that share common properties or characters. Some entities are almost same
but have few distinct attributes. For this reason E-R model has been extended to include supertype/subtype
relationships. The enhanced version of ERM is nothing but EERM.
Enhanced Entity Relationship Model(EERM): The model that has resulted from extending the original E-R
model with new modeling constructs. The new modeling constructs introduced in the EER model are supertype
(superclass)/ subtype (subclass) relationships.
The supertype allows us to model general entity type where as the subtype allows us to model specialized entity
types.
Enhanced ER model= ER model + hierarchical relationships.
The extended ER model extends the ER model to allow various types of abstraction to be included and to express
constraints more clearly.
Supertype: A generic entity type that has a relationship with one or more subtypes. It contains shared attributes.
For example PLAYER is a generic entity type which has a relationship with one or more subtypes like cricket
player, football player, hockey player etc.
Subtype: A sub-grouping of the entities in an entity type and that shares common attributes or relationships
distinct from other sub-groupings. It has only unique attributes.
Consider the entity type STUDENT, which has two sub types UNDERGRADUATE and POSTGRADUATE.
Example: Assume that an organization needs to store the details of different types of employees such as full time
Employee and Part time employee.
FULLTIME EMPLOYEE(Emp_num,Emp_Name,Address, Salary,HRA)
PARTTIME EMPLOYEE(Emp_num,Emo_Name,Address,Hourly_salary)

Notice that all of the employee types have several attributes is common, i.e Emp_num,Emp_Name, Address. In
Addition each type has one or more attributes distinct from the attributes of other types.
 These types share some common properties such as Name, Employee number, Address .
 Full time Employee has distinct attributes “salary” and “HRA”.
 Par time Employee has a distinct attribute “Hourly_Salary”.
Now, let us draw EERM for EMPLOYEE super type with two sub types: “FULL TIME EMPLOYEE”,
“PARTTIME EMPLOYEE”.

In the above diagram shows the representation of the EMPLOYEE supertype with its two sub types,
FULLTIMEEMPLOYEE, PARTTIMEEMPLOYEE.
Thus, the new relations will be:
 EMPLOYEE(Emp_Num,Emp_NAME,Address)
->FullTIME_EMPLOYEE(Emp_Num,Emp_Name, Address,Salary,HRA)
->PARTTIME_EMPLOYEE(Emp_Num,Emp_Name, Address, Hourly_Salary)

Q)Explain Inheritance in Supertype/Subtype relationships.


 Inheritance Is a property by which subtype entities inherit attributes and relationships of the supertype.
 This can be seen in supertype/subtype relationships.
 With this, an instance of subtype entity will have attributes of its own and attributes of supertype entity.
 One important Inheritance Characteristic is that all entity subtypes inherit their primary key attributes from
their super type i.e. the PK of super type entity appears as PK(as well as FK) in all subtype entities.
Example: The following example shows a super type/subtype relationship. Here, the child Entity is ‘STUDENT’
and it will inherit the attributes of its parent entity ‘PERSON’. This, the STUDENT Instance will have the
attributes Name, Age from its super type and Marks, Rollnum of its own. This is nothing but Attribute inheritance.

Q) Explain Generalization and Specialization.


Generalization: Generalization is an object set that is a superset of another object set. This is a bottom-up process
of identifying a parent object from child objects.
 Generalization is a process of defining more general types from a set of more specialized.
 It forms a super type from a set of sub types.
Example: Assume that an organization needs to store the details of different types of vehicles such as CAR, and
TRUCK. The ER model for both entities can be represented as shown below.
These types share common properties such as Name, Number and Cost. Hence form these two entity types, we
can create a super type “VEHICLE” with the common properties.
Now, let us draw EER model with supertype/subtype relationship for VEHICLE super type with two sub types:
“CAR, and “TRUCK”.

Specialization: Specialization is an object set that is a subset of another object set. This is a top-down process of
deriving child objects from a parent object.
 Specialization is a process of defining one or more subtypes of the supertype.
 It forms sub types from a super type.

Example: Assume that an organization needs to store the details of products as a PRODUCT entity. The ER model,
for the above, can be represented as shown below.
Some of the attributes show are not necessary when we go for sub types such as PURCHASED PRODUCT and
MANUFACTURED PRODUCT. Using Specialization technique, we can form two sub-types form PRODUCT
entity.
Let us draw EER model with super/subtype relationship for PRODUCT super type with two sub types:
PURCHASED PRODUCT and MANUFACTURED PRODUCT.

Q) What is an Aggregation? Explain with an example.


Basically a relationship links two or more entities. In object oriented model, relationships can also be viewed as
objects and can have attributes and participate in other relationships. Such relationships are called aggregates. This
raises the need of grouping two or more entities along with their relationships. This grouped set can be perceived
as one object set. To achieve this we use a technique called ‘aggregation’.
Aggregation: Aggregation involves the use of an aggregate i.e. a relationship viewed as an object set. Aggregation
establishes higher-level relationship, which involves three or more object sets. Graphically, we represent an
aggregate by drawing a box around the relationship and its participating object sets.
Example: Consider two object sets EMPLOYEE and BRANCH with a relationship stating ‘a BRANCH has
EMPLOYEE’. Assume that there is an object ‘MANAGER’ who manages both the BRANCH and EMPLOYEES.
 One might represent this relationship as shown below. But this is an Incorrect model because it has a redundant
relationship ‘manages’. (i.e. the two relationships are not needed here)

The correct model is possible by using ‘aggregate’ technique. It removes the redundant relationship and
aggregates the relationship ‘has’ along with its entities BRANCH and EMPLOYEE. This aggregation can now be
perceived as a new object set ‘BRANCHOFFICE’ and the correct relationship is ‘MANAGER’ MANAGES A
branch office. Here, the aggregation is shown by a thick box drawn around the aggregate and its objects.

Composition:
It is a specialized form of Aggregation. It is a strong type og Aggregation. In this relationship child objects
does not have their lifecycle without parent object. If a parent object is deleted, all its child objects will also be
deleted. This represents “death” relationship. This is represented by a solid diamond followed by a line.
Let’s take an example of relationship between House and rooms. House can contain multiple rooms there is no
dependent life of room and any room cannot belongs to two different house if we delete the house will
automatically delete.
Let’s take another example of relationship between Questions and options. Single questions can have
multiple options and option cannot belong to multiple questions. If we delete questions options will be
automatically deleted.

You might also like