Introduction To Dbms Unit 1
Introduction To Dbms Unit 1
Systems
Course Objectives
• To understand purpose of database
management system
• Apply concepts like database design and
database languages in managing data
• Importance of normalization in dbms and SQL
in implementation of database access
• Knowledge of transaction control , recovery
strategies , storage and indexing etc
Course Outcomes
Text Book
1.Database Management Systems,
Raghurama Krishnan, Johannes Gehrke (2007),
3rd Edition,
Tata McGraw-Hill, New Delhi, India
• Requirement Analysis
• Conceptual database design
• Logical database design
• Schema refinement
• Physical database design
• Application and security design
E -R diagrams
• The E-R data model allows us to describe the
data involved in a real-world enterprise in
terms of objects and their relationships and is
widely used to develop an initial database
design.
entities
• An entity is an object in the real world that is
distinguishable from other objects.
• An Entity can be any object, place, person or
class.
• an entity is represented using rectangles.
Works
Employee for Department
Weak entity
Weak entity is an entity that depends on
another entity. Weak entity doesn't have key
attribute of their own. Double rectangle
represents weak entity.
attributes
• An Attribute describes a property or
characteristic of an entity. For example,
Name, Age, Address etc can be attributes of a
Student. An attribute is represented using
eclipse
Types of attributes
• Key attribute
• Composite attributes
• Derived attributes
relationships
• A Relationship describes relations between
entities. Relationship is represented using
diamonds
• Relationship is an association among 2 or more
entities
• There are three types of relationship that exist
between Entities.
• Binary Relationship
• Recursive Relationship
• Ternary Relationship
relationship sets
• Collection of set of similar relationships is
called a relationship set.
additional features of the E
-R model
• Key constraints
• Key constraints for ternary relationships
• Participation constraints(partial and complete)
• Class hierarchies
• Aggregation
conceptual design with the
E-R model
• Entity versus attribute
• Entity versus relationship
• Binary versus ternary relationships
• Aggregation versus ternary relationships
conceptual design for large enterprises
• A college contains many departments
• Each department can offer any number of courses
• Many instructors can work in a department
• An instructor can work only in one department
• For each department there is a Head
• An instructor can be head of only one department
• Each instructor can take any number of courses
• A course can be taken by only one instructor
• A student can enroll for any number of courses
• Each course can have any number of students
• Step 1 : Identify the Entities
• Stem 2 : Identify the relationships
• Step 3: Identify the key attributes
• Step 4: Identify other relevant attributes
• Step 5: Draw complete ER diagram
• Step 1 : Identify the Entities
What are the entities here?
From the statements given, the entities are
• Department
• Course
• Instructor
• Student
Stem 2 : Identify the relationships
• One department offers many courses. But one particular course can
be offered by only one department. hence the cardinality between
department and course is One to Many (1:N)
• One department has multiple instructors . But instructor belongs to
only one department. Hence the cardinality between department
and instructor is One to Many (1:N)
• One department has only one head and one head can be the head
of only one department. Hence the cardinality is one to one. (1:1)
• One course can be enrolled by many students and one student can
enroll for many courses. Hence the cardinality between course and
student is Many to Many (M:N)
• One course is taught by only one instructor. But one instructor
teaches many courses. Hence the cardinality between course and
instructor is Many to One (N :1)
• Step 3: Identify the key attributes
• "Departmen_Name" can identify a department
uniquely. Hence Department_Name is the key
attribute for the Entity "Department".
• Course_ID is the key attribute for "Course" Entity.
• Student_ID is the key attribute for "Student"
Entity.
• Instructor_ID is the key attribute for "Instructor"
Entity.
• Step 4: Identify other relevant attributes
• For the department entity, other attributes
are location
• For course entity, other attributes are
course_name,duration
• For instructor entity, other attributes are
first_name, last_name, phone
• For student entity, first_name, last_name,
phone
• A typical example could be entities Customer,
Order, and Product.
• An instance of the Customer entity is
identified by a unique customer number,
• an instance of the Order entity is identified by
a unique order number, and
• an instance of the Product entity is identified
by a unique product number.