logo

Converting ER Diagrams into Tables

When converting ER diagrams to tables, different rules apply based on the types of entities and relationships. Here are the rules in simple terms:

Rule 1: Strong Entity Set with Simple Attributes

A strong entity set with only simple attributes needs one table.

The table's columns will be the attributes of the entity set.

The table's primary key will be the key attribute of the entity set.

Data Models

Rule 2: Strong Entity Set with Composite Attributes

A strong entity set with composite attributes also needs one table.

Conversion: Only the simple attributes within the composite attributes are included in the table.

Data Models

Rule 3: Strong Entity Set with Multi-Valued Attributes

A strong entity set with multi-valued attributes requires two tables.

First Table: Contains all simple attributes and the primary key.

Second Table: Contains the primary key and the multi-valued attributes.

Data Models

Rule 4: Translating Relationship Set into a Table

Each relationship set requires one table.

Table Attributes: The table's columns include the primary key attributes of the participating entity sets and any descriptive attributes of the relationship.

Primary Key: Primary Key: The combined primary key attributes from the participating entities.

Data Models

Rule 5: Binary Relationships with Cardinality Ratios

Different cases for binary relationships (involving two entities):

Case 1: Binary Relationship with Cardinality Ratio m

Description: Many-to-Many relationship.

Tables Required: Three tables.

Data Models Case 2: Binary Relationship with Cardinality Ratio 1

Description: One-to-Many relationship.

Tables Required: Two tables.

Data Models Case 3: Binary Relationship with Cardinality Ratio m:1

Description: Many-to-One relationship.

Tables Required: Two tables.

Data Models Case 4: Binary Relationship with Cardinality Ratio 1:1

Description: One-to-One relationship.

Tables Required: Two tables.

Data Models

Rule 6: Binary Relationship with Both Cardinality Constraints and Participation Constraint

Cardinality constraints will be implemented as discussed in Rule-5.

The foreign key in the table cannot be null.

Case 1: For Binary Relationship with Cardinality Constraint and Total Participation Constraint from One Side

Tables Required: Two tables.

Data Models Case 2: For Binary Relationship with Cardinality Constraint and Total Participation from Both Sides.

Tables Required: One tables.

Data Models

Rule 7: Binary Relationship with Weak Entity Set

Description: A weak entity set always appears with an identifying relationship.

Tables Required:Two tables.

Data Models
Next ❯ ❮ Previous
discription of faastop website
logo