We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21
Unit -1
CONCEPTUAL DATA MODELING
Database environment – Database system
development lifecycle –Requirements collection –
Database design - Entity-Relationship model –
Enhanced-ER model – UML class diagrams.
• The Entity Relational Model is a model for identifying entities to be represented in the database and representation of how those entities are related. • ER model stands for an Entity-Relationship model. It is a high-level data model. This model is used to define the data elements and relationship for a specified system. • The Entity Relationship Diagram explains the relationship among the entities present in the database. Why Use ER Diagrams In DBMS? • ER diagrams are used to represent the E-R model in a database, which makes them easy to be converted into relations (tables). • ER diagrams provide the purpose of real-world modeling of objects which makes them intently useful. • ER diagrams require no technical knowledge and no hardware support. • These diagrams are very easy to understand and easy to create even for a naive user. • It gives a standard solution for visualizing the data logically. Symbols Used in ER Model ER Model is used to model the logical view of the system from a data perspective which consists of these symbols: • Rectangles: Rectangles represent Entities in the ER Model. • Ellipses: Ellipses represent Attributes in the ER Model. • Diamond: Diamonds represent Relationships among Entities. • Lines: Lines represent attributes to entities and entity sets with other relationship types. • Double Ellipse: Double Ellipses represent Multi-Valued Attributes. • Double Rectangle: Double Rectangle represents a Weak Entity. Components of ER Diagram • ER Model consists of Entities, Attributes, and Relationships among Entities in a Database System. Entity: • An Entity may be an object with a physical existence – a particular person, car, house, or employee – or it may be an object with a conceptual existence – a company, a job, or a university course. • Entity Set: An Entity is an object of Entity Type and a set of all entities is called an entity set. i) Strong Entity: A Strong Entity is a type of entity that has a key Attribute. Strong Entity does not depend on other Entity in the Schema. It has a primary key, that helps in identifying it uniquely, and it is represented by a rectangle. These are called Strong Entity Types. ii)Weak Entity:
• An Entity type has a key attribute that uniquely
identifies each entity in the entity set. But some entity type exists for which key attributes can’t be defined. These are called Weak Entity types.
Ex: Employee- strong, Dependent- Weak
2. Attribute • The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute. • For example, id, age, contact number, name, etc. can be attributes of a student. a. Key Attribute • The key attribute is used to represent the main characteristics of an entity. It represents a primary key. The key attribute is represented by an ellipse with the text underlined. b. Composite Attribute • An attribute that composed of many other attributes is known as a composite attribute. The composite attribute is represented by an ellipse, and those ellipses are connected with an ellipse. c. Multivalued Attribute: • An attribute can have more than one value. These attributes are known as a multivalued attribute. The double oval is used to represent multivalued attribute. • For example, a student can have more than one phone number. d. Derived Attribute • An attribute that can be derived from other attribute is known as a derived attribute. It can be represented by a dashed ellipse. • For example, A person's age changes over time and can be derived from another attribute like Date of birth. 3. Relationship • A relationship is used to describe the relation between entities. Diamond or rhombus is used to represent the relationship. a. One-to-One Relationship • When only one instance of an entity is associated with the relationship, then it is known as one to one relationship. • For example, A female can marry to one male, and a male can marry to one female. b. One-to-many relationship • When a single element of an entity is associated with more than one element of another entity, it is called a one-to-many relationship • For example, a customer can place many orders, but an order cannot be placed by many customers. c.Many-to-One Relationship: • When more than one element of an entity is related to a single element of another entity, then it is called a many-to-one relationship. • For example, students have to opt for a single course, but a course can have many students. d.Many-to-Many Relationship: • When more than one element of an entity is associated with more than one element of another entity, this is called a many-to-many relationship. • For example, you can assign an employee to many projects and a project can have many employees.