Posts

Showing posts with the label one to one

E - R Diagram

Image
The E – R Diagram consists of the following major components: Rectangles : represent entity sets  Ellipses : represent attributes Diamonds : represent relationship sets Lines : links attributes to entity sets and vice versa Double ellipses : represents multivalued attributes Dashed ellipses : represents derived attributes Double lines : represents total participation of an entity in a relationship set Double rectangles : represents weak entity sets Figure – 1: An illustration of E – R diagram corresponding to customers and loans Figure – 2 depicts two entity sets, customer and loans , related through relationship set borrower. The attributes associated with customer are customer_id, customer_name, customer_munber, customer_address, customer_pincode, customer_city .  The attributes associated with loan are loan_number, loan_amount . The customer_id and loan_number are primary keys. The relationship set borrower may have one-to-one, one-to-many, many-to-one, many-to-man

Constraints

Image
There are two types of constraints:  Mapping cardinalities,  Participation constraints 1. Mapping cardinalities Mapping cardinalities, also known as cardinality ratio, expresses the number of entities to which another entities can be associated via relationship set. The mapping cardinality must be one of the following types for describing a binary relationship set R between entity set A and B :  One to one : An entity in A is associated with at most one entity in B , and entity in B is associated with at most one entity in A .  One to many : An entity in A is associated with zero or more number of entities in B . While an entity in B can be associated with at most one entity in A .  Many to one : An entity in A is associated with at most one entity in B . While an entity in B , can be associated with zero or more number of entities in A .  Many to many : An entity in A is associated with zero or more number of entities in B , and an entity in B is associa