This document discusses how to represent an entity-relationship schema as tables in a relational database. It describes how strong entity sets, composite attributes, multi-valued attributes, relationship sets, and generalizations are represented as tables with columns.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
51 views
ER Diagram To Relational Model
This document discusses how to represent an entity-relationship schema as tables in a relational database. It describes how strong entity sets, composite attributes, multi-valued attributes, relationship sets, and generalizations are represented as tables with columns.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 8
Reduction of E-R Schema to Tables
Tabular representation of a Strong Entity Set. A Strong Entity Set E will be
represented by a Table named “E”. The Table will have columns as follows:-
(i) Simple, Single-valued Attributes There will be a column for each simple, single-valued attribute of Entity Set E.
(ii)Composite Attributes There will be a column for each sub-part of a
Composite Attribute; no column needs to be assigned for composite attribute as such. For example for NAME comprising of First Name (FN), Middle Name ( MN) and Last Name (LN) there will be three columns for FN, MN and LN. No column needs to be assigned for NAME. If NAME needs to be produced, it can be done by combining the sub-parts. Reduction of E-R Schema to Tables
(iii) Derived Attributes No column needs to be assigned for the
derived attributes; since the values of these attributes are not stored in database.
(iv) Multi-Valued Attribute Each Multi-Valued Attribute (say M)
will be represented by a separate Table (say named E-M) which will have a column each for the primary key attributes of E and a column for Attribute M. Each value of the multi-valued attribute will be represented in a separate row in this table. Reduction of E-R Schema to Tables Reduction of E-R Schema to Tables
Tabular representation of Relationship Sets. Let R be a Relation
Set and let a1, a2,…..am be the set of attributes formed by the union of the primary keys of all the Entity Sets participating in Relation R and let the descriptive attributes of R (if any) be b1,b2,…..bn. Then the Relation R will be represented by a Table named say “R”, which will (m+n) columns, each column representing one of the attributes from the set {a 1, a2,……am} U {b1,b2,….bn}. Reduction of E-R Schema to Tables Reduction of E-R Schema to Tables Reduction of E-R Schema to Tables Reduction of E-R Schema to Tables For example, in the above case there will five tables i.e. ACCOUNT, SAVINGS- ACCOUNT, CURRENT-ACCOUNT, FD and RD. The table ACCOUNT will have columns Account-Number and Balance; and table SAVINGS-ACCOUNT will have columns Account-Number and Interest Rate; and table CURRENT-RATE will have columns Account-Number and Over-Draft. Same is applicable to the tables FD and RD.
Combining of Tables in Generalization If a generalization is “Total”, which
implies that each entity in the super-class (higher-level entity set) is a member of at least one sub-class (lower-level entity set), no table is required to be created for the higher-level entity set. Instead a table needs to be created for each lower-level entity set; and each such table will also include all the attributes of higher-level entity set, in addition to its own distinct attributes. For example, the table SAVINGS-ACCOUNT will also have columns Account-Number, Balance and Interest-Rate; and the table CURRENT-ACCOUNT will also have the columns Account-Number, Balance and Over-Draft. The same is applicable for FD and RD tables.
(Ebook) Teaching and Learning History: Understanding the Past 11-18 by Alison Kitson and Chris Husbands with Susan Steward ISBN 0335238203 pdf download