Professional Documents
Culture Documents
com
MENU
SIDEBAR
HOME
Business Process & Business Modeling:
Modeling Types
Modeling Methods
Business Process
Workflows
Advantages of BPM
Procurement BPO
DM Tools Erwin
DM Tools Xcase
Identifying Relationship
Comparison
Star Schema
Dimensions
Snowflake Schema
Fact Table
Interview Questions
DM Interview Questions
Database Objects
DML Statements
Database RDBMS
ETL Tools
Informatica Transformations
ETL Concepts
ETL Testing
Business Metadata
Technical Metadata
OLAP Analysis
Metadata Reports
BI Dashboards
BI Scorecards
LearnDataModeling.com
MENU
SIDEBAR
Primary Key:
If the attribute (column) has to be unique and should contain NON-NULL values, data modelers create primary key
constraint on that particular attribute and it is called the primary key attribute of that entity.
Foreign Key:
Attributes within same entity or attributes from different entities will be connected by a connector (foreign key) to the
primary key attribute.
Sample Data:
Data Modeler analyzes data, talks to business analysts or smart management experts in the client and understands the
requirements.
Following section describes business requirements.
Business Requirements:
One employee has only one manager and CEO doesnt have any manager.
Manager Numbers are also Employee Numbers.
One employee can work in only one department and one or more employees can work in the same department.
One or more employees can have the same title.
One employee can work in one or more projects and one project can have one or more employees.
Following sections, how business requirements are transformed to a data model.
Analysis:
Related Posts
Identifying Relationship
Non Identifying Relationship
Create Data Modeling Objects in Toad
Supertype and SubType
Data Modeling Tools: What to Learn?
Data Flow Modeling
(Visited 765 times, 1 visits today)
tagged with business requirements, Detailed analysis of data, Identifying and Non-Identifying Relationships, identifying
relationships, non-identifying relationships, relationships in data model, Self Referential Integrity
Data Modeling Relationships
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
LearnDataModeling.com
MENU
SIDEBAR
Table Structures:
Employee
Title
Department
Project
Employee_Project
Employee_No (PK)
Title_Code (PK)
Department_No (PK)
Project_Code (PK)
Employee_No (FPK)
Employee_Name
Title_Description
Department_Name
Software_Used
Project_Code (FPK)
Manager_No (FK)
Title_Code (FK)
Department_No (FK)
Constraint Name
DataType
Department_No
Primary Key
Integer
Department_Name
NOT NULL
VARCHAR2 (30)
Highlight table DEPARTMENT, right click edit from the sub menu.
Click Tab Attributes. Click Add. By default, an attribute is created. Click edit and from the new window
Change name and caption to Department_No.
Change the data type to Integer.
Department_No is the primary key of the table. So double click the space under the key column and you can see
the key symbol. Click apply and OK. Go to the keys tab and change the primary key name to Department_PK.
On the work area, you can see table DEPARTMENT with a column Department_No as the primary key.
Similarly create column Department_Name with data type as VARCHAR2 (30). It should not be the primary key and
it should be a column in the table. When you create, you can see a check box under NOT NULL. Check that check box
so that this column will be NOT NULL. Assign data type as VARCHAR2 (30).
Similarly create tables TITLE and PROJECT and add columns to those tables.
2. TITLE Table:
Column Name
Constraint Name
DataType
Title_Code (PK)
Primary Key
Integer
Title_Description
NOT NULL
VARCHAR2 (30)
3. PROJECT Table:
Column Name
Constraint Name
DataType
Project_Code (PK)
Primary Key
Integer
Software_Used
NOT NULL
VARCHAR2 (30)
Similarly create table EMPLOYEE with Employee_No as the primary key and Employee_Name as the column. Later we will
add other columns.
4. EMPLOYEE Table:
Column Name
Constraint Name
DataType
Employee_No (PK)
Column Name
Primary Key
Constraint Name
Integer
DataType
Employee_Name
NOT NULL
VARCHAR2 (30)
Related Posts
Comparison of Logical and Physical Data Modeling
Data Modeling Subject Area, Default, Domain, Rules & Constraints
Identifying and Non-Identifying Relationships
Identifying Relationship
Non Identifying Relationship
Supertype and SubType
(Visited 904 times, 2 visits today)
tagged with Create Data Modeling Objects in Toad, Data Model using Toad, How to create columns, Logical and Physical
Data Model using Toad, primary keys and assign NOT NULL constraint in a data model, table, Toad Data Model, Toad Data
Modeler, Toad Data Modeling Tool
Data Modeling Relationships
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
LearnDataModeling.com
MENU
SIDEBAR
Child Table
Mandatory
Mandatory
Cardinality
Parent
Child
Relationship
Department.Department_No
Employee.Department_No
Yes
Yes
1..1 to 1..n
Department.Department_No
Employee.Department_No
Yes
No
1..1 to 0..n
Department.Department_No
Employee.Department_No
No
Yes
0..1 to 1..n
Department.Department_No
Employee.Department_No
No
No
0..1 to 0..n
If you want to change the default foreign key index name, then change the name (EMPLOYEE_IDX01) in Index to
Foreign Key tab. You have to double click the relationship line and there is a tab named Index to Foreign Key.
Click apply and ok. You can see how tables are connected and a new column Department_No is included in the
Employee table.
Related Posts
Identifying Relationship
Supertype and SubType
Identifying and Non-Identifying Relationships
Data Modeling Frequently Asked Interview Questions And Answers Part 1
Create Data Modeling Objects in Toad
Fact Table
(Visited 1,189 times, 3 visits today)
tagged with Cardinality, Foreign key relationships in a data model, Non-Identifying relationship, One to Many relationship
examples, Self Referential or Recursive Relationship
Data Modeling Relationships
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
LearnDataModeling.com
MENU
SIDEBAR
IDENTIFYING RELATIONSHIP
July 16, 2015
learndmdwbi
Leave a comment
In some scenarios, if a primary key of the table is not able to identify uniqueness of a record in a table, then they add one
more column from another table as a primary key with identifying relationship.
Save the data model with a meaningful name and save it either in your local directory or in a shared directory.
This data model is stored as Data_Modeling_Relationship.txl. On the tool bar, you can see the save menu.
Finally an image of the completed data model Data_Modeling_Relationship looks like this.
Related Posts
Non Identifying Relationship
Supertype and SubType
Identifying and Non-Identifying Relationships
Create Data Modeling Objects in Toad
Data Modeling Frequently Asked Interview Questions And Answers Part 1
Fact Table
(Visited 793 times, 1 visits today)
tagged with creating objects in a database schema, creating or generating scripts from a data model using Quest's TOAD
DATA MODELER, Forward engineering a data model, validating a data model, verifying a data model
Data Modeling Relationships
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
LearnDataModeling.com
MENU
SIDEBAR
At times, few entities in a data model may share some common properties (attributes) within themselves apart from
having one or more distinct attributes. Based on the attributes, these entities are categorized as Supertype and Subtype
entities.
Supertype is an entity type that has got relationship (parent to child relationship) with one or more subtypes and it
contains attributes that are common to its subtypes.
Subtypes are subgroups of the supertype entity and have unique attributes, but they will be different from each subtype.
Supertypes and Subtypes are parent and child entities respectively and the primary keys of supertype and subtype are
always identical.
E.g. People, Bank Account, Insurance, Asset, Liability, Credit Card.
When designing a data model for PEOPLE, you can have a supertype entity of PEOPLE and its subtype entities can be
vendor, customer, and employee. People entity will have attributes like Name, Address, and Telephone number, which are
common to its subtypes and you can design entities employee, vendor, and consumer with their own unique attributes.
Based on this scenario, employee entity can be further classified under different subtype entities like HR employee, IT
employee etc. Here employee will be the superset for the entities HR Employee and IT employee, but again it is a subtype
for the PEOPLE entity.
A person can open a savings account or a certificate deposit (fixed deposit) in a bank. These accounts have attributes like
account number, account opening date, account expiry date, principal amount, maturity amount, account balance, interest
rate, checks issued, pre-cancellation fee etc. While designing a data model, you can create supertype parent entity as
Account and subtype entities as Savings Account and Certificate Deposit. Account entity will store attributes like account
number, interest rate that are common to savings account and certificate deposit entity. Savings account entity will have
attributes like account balance and checks issued. While fixed deposit entity will have attributes like account opening,
account expiry date, principal amount, maturity amount, pre-cancellation fee etc. When you design a logical data model in
this manner, it provides more meaning to the business and the attributes are not cluttered in one table.
More Examples:
Insurance entity can act as supertype and entities like health insurance, life insurance, auto insurance, liability insurance,
Related Posts
Identifying Relationship
Non Identifying Relationship
Business Process Reengineering
Identifying and Non-Identifying Relationships
Relational Data Modeling Example
Create Data Modeling Objects in Toad
(Visited 14,850 times, 21 visits today)
tagged with data modelling and subtype, data modelling and supertype, subtype, subtype entity, supertype, supertype
entity
Data Modeling Relationships
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
LearnDataModeling.com
MENU
SIDEBAR
6: Create another entity Bank with two attributes namely Bank Code and Bank Name by following steps 4 and 5.
7: In order to relate these two tables country, bank, a Foreign Key relationship must be created. To create a Foreign Key
relationship, follow these steps.
(a) Click the symbol Non Identifying Relationship.
(b) Place the cursor on the entity Country.
(c) Place the cursor on the entity Bank. Now you can see the relationship(a line drawn from Bank to Country)
between Country and Bank. Double click on that relationship line to open Relationships wizard and change the
option from Nulls Allowed to No Nulls since bank should have a country code.
The Logical Data Model created by following the above steps looks similar to the following diagram.
Related Posts
Erwin Tutorial
Creating a Physical Data Model using Erwin
How to add identifying, non-identifying, self-recursive relationship in ER Studio Data Architect?
How to create a physical data model from a logical data model using Embarcaderos Data Architect?
How To Create A Logical Data Model In ER Studio Data Architect?
Data Modeling Tools
(Visited 3,192 times, 3 visits today)
tagged with erwin logical data model, erwin logical data model example diagram, Erwin Logical data Modeling, How to
create a Logical Data Model using Erwin 4.1.4 version?, Logical Data Model using Erwin
Data Modeling Tools
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Post Comment
5/11/2016
Identifyingandnonidentifyingrelationships
PRODUCTS
DOWNLOADS
PURCHASE
SUPPORT
COMPANY
CONTACTUS
Support
Supportoverview
Contactsupport
IdentifyingandNonIdentifyingRelationships
Submitanincident
Anidentifyingrelationshipmeansthatthechildtablecannotbeuniquelyidentifiedwithouttheparent.Forexample,
Articlesandtutorials
youhavethissituationintheintersectiontableusedtoresolveamanytomanyrelationshipwheretheintersecting
table'sPrimaryKeyisacompositeoftheleftandright(parents)table'sPrimaryKeys.
Updates(LicensedUsers)
Videos
Knowledgebase
ProductInfo
Example...
DeZignforDatabases
Account(AccountID,AccountNum,AccountTypeID)
DatanamicDataDiff
PersonAccount(AccountID,PersonID,Balance)
DatanamicSchemaDiff
Person(PersonID,Name)
DatanamicDataGenerator
DatanamicMultiRun
TheAccounttoPersonAccountrelationshipandthePersontoPersonAccountrelationshipareidentifyingbecause
thechildrow(PersonAccount)cannotexistwithouthavingbeendefinedintheparent(AccountorPerson).Inother
words:thereisnopersonaccountwhenthereisnoPersonorwhenthereisnoAccount.
Anonidentifyingrelationshipisonewherethechildcanbeidentifiedindependentlyoftheparent(Account
AccountType)
Example...
Account(AccountID,AccountNum,AccountTypeID)
AccountType(AccountTypeID,Code,Name,Description)
TherelationshipbetweenAccountandAccountTypeisnonidentifyingbecauseeachAccountTypecanbeidentified
withouthavingtoexistintheparenttable.
Youcandefinetherelationshiptype(identifying/nonidentifying)intheDeZignforDatabasesintherelationship
dialog.Doubleclickontherelationshiplineinthediagramwindowtodisplaytherelationshipdialog.
http://www.datanamic.com/support/relationshiptypes.html
1/2
5/11/2016
databaseWhat'sthedifferencebetweenidentifyingandnonidentifyingrelationships?StackOverflow
signup
StackOverflowisacommunityof4.7
millionprogrammers,justlikeyou,
helpingeachother.
login
tour
help
JointheStackOverflowcommunityto:
Jointhemitonlytakesaminute:
Ask
programming
questions
Signup
Answerandhelp
yourpeers
Getrecognizedforyour
expertise
What'sthedifferencebetweenidentifyingandnonidentifyingrelationships?
Ihaven'tbeenabletofullygraspthedifferences.Canyoudescribebothconceptsanduserealworld
examples?
database databasedesign datamodeling
editedSep25'13at20:29
askedApr18'09at5:04
RobertHarvey
125k
27
213
LocNguyen
339
2,952
14
24
23 Thankyouforasking,hadthesamedoubttoo.AlixAxelOct11'11at19:08
33 Thanks.I'musingMySQLworkbenchandIhavethisquestionalso.marknt15Mar21'13at3:03
11Answers
Anidentifyingrelationshipiswhentheexistenceofarowinachildtabledependsona
rowinaparenttable.Thismaybeconfusingbecauseit'scommonpracticethesedaysto
createapseudokeyforachildtable,butnotmaketheforeignkeytotheparentpartofthe
child'sprimarykey.Formally,the"right"waytodothisistomaketheforeignkeypartof
thechild'sprimarykey.Butthelogicalrelationshipisthatthechildcannotexistwithoutthe
parent.
Example:A Person hasoneormorephonenumbers.Iftheyhadjustonephonenumber,
wecouldsimplystoreitinacolumnof Person .Sincewewanttosupportmultiplephone
numbers,wemakeasecondtable PhoneNumbers ,whoseprimarykeyincludesthe
person_id referencingthe Person table.
Wemaythinkofthephonenumber(s)asbelongingtoaperson,eventhoughtheyare
modeledasattributesofaseparatetable.Thisisastrongcluethatthisisanidentifying
relationship(evenifwedon'tliterallyinclude person_id intheprimarykeyof
PhoneNumbers ).
Anonidentifyingrelationshipiswhentheprimarykeyattributesoftheparentmustnot
becomeprimarykeyattributesofthechild.Agoodexampleofthisisalookuptable,such
asaforeignkeyon Person.state referencingtheprimarykeyof States.state . Person is
achildtablewithrespectto States .Butarowin Person isnotidentifiedbyits state
attribute.I.e. state isnotpartoftheprimarykeyof Person .
Anonidentifyingrelationshipcanbeoptionalormandatory,whichmeanstheforeign
keycolumnallowsNULLordisallowsNULL,respectively.
SeealsomyanswertoStillConfusedAboutIdentifyingvs.NonIdentifyingRelationships
editedJul5'13at20:11
answeredApr18'09at5:59
BillKarwin
267k
49
370
545
33 +1Greatexplanation,Bill.CesarGonMar6'10at13:34
4
+1:Bill,"it'scommonpracticethesedaystocreateapseudokeyforachildtable,butnotmaketheforeign
keytotheparentpartofthechild'sprimarykey"anylinksastowhythisis?Googleisfailingme.
hobodaveMar10'10at21:41
Itseemslike"properly"constructingidentifyingrelationshipswouldleadtoobnoxiouslyhugeprimarykeys.
e.g.BuildinghasFloorhasRoomhasBed.ThePKforBedwouldbe(bed_id,floor_id,room_id,
http://stackoverflow.com/questions/762937/whatsthedifferencebetweenidentifyingandnonidentifyingrelationships
1/5
5/11/2016
databaseWhat'sthedifferencebetweenidentifyingandnonidentifyingrelationships?StackOverflow
building_id).Itseem'sstrangethatI'veneverseenthisinpractice,norhearditsuggestedasawaytodo
anything.That'salotofredundantdatainthePK.hobodaveMar10'10at23:34
13 @hobodave:Ihaveseenmulticolumnprimarykeysthatareevenlarger.ButItakeyourpoint.Consider
thatmulticolumnprimarykeysconveymoreinformationyoucanquerythe Beds tableforallbedsina
specificbuildingwithoutdoinganyjoins.BillKarwinMar11'10at1:00
1
Thereisanotherexplanationfromtherealworld:
Abookbelongstoanowner,andanownercanownmultiplebooks.Butthebookcanexist
alsowithouttheowneranditcanchangetheowner.Therelationshipbetweenabookandan
ownerisanonidentifyingrelationship.
Abookhoweveriswrittenbyanauthor,andtheauthorcouldhavewrittenmultiplebooks.But
thebookneedstobewrittenbyanauthoritcannotexistwithoutanauthor.Thereforethe
relationshipbetweenthebookandtheauthorisanidentifyingrelationship.
editedSep6'13at9:40
answeredMar6'10at12:54
pixelistik
3,842
user287724
15
32
120 +1verysimpleandclearHernnEcheDec2'10at19:57
3
Thiswasaverygoodexplanation,thankyouverymuch!jraraMay22'11at10:02
Thishelpedalot.Thanks!JamesNov30'11at18:39
Plainandsimpleexample.Excellentandthanks!:)marknt15Mar21'13at3:11
11
Whathappensifthebookwaswrittenbymorethan1author?It'snotidentifyingrelationshipanymoreas
M:Ntype,why?NGixNov26'13at21:49
AnIdentifyingrelationshipspecifiesthatachildobjectcannotexistwithouttheparentobject
Nonidentifyingrelationshipsspecifiesaregularassociationbetweenobjects,1:1or1:n
cardinality.
Nonidentifyingrelationshipscanbespecifiedasoptionalwhereaparentisnotrequiredor
mandatorywhereaparentisrequiredbysettingtheparenttablecardinality...
answeredApr18'09at5:45
CMS
427k
118
730
746
4 Thissoundsmorelikeadescriptionoftotalparticipationinarelationship,thanofanidentifyingrelationship.
ThomasPadronMcCarthyApr18'09at6:03
You'reliterallycompetingwithaguywhohas218kreputation.Justthrowingthatouttherebecauseyouboth
definitelyknowmorethanIdo.MarcDiMilloFeb3'13at8:23
Idisagreewiththeabovedefinitions.Youmayhaveanobjectthatdependsonitsparentandyouwantthat
objecttobeconstrainedtobelinkedonlywith1parentrow.A House has Wall s.Youremovehouseand
youdon'thavewalls.Butawallbelongsonlytoahouse.Sodoingstrongrelationshipwon'twork:
PK(Wall.id,House.id) willallowyoutoinsertintothemodelthesamewalltoanotherhouse.Sebastian
Apr6'15at1:08
Here'sagooddescription:
Relationshipsbetweentwoentitiesmaybeclassifiedasbeingeither"identifying"or"non
identifying".Identifyingrelationshipsexistwhentheprimarykeyoftheparententityisincluded
intheprimarykeyofthechildentity.Ontheotherhand,anonidentifyingrelationshipexists
whentheprimarykeyoftheparententityisincludedinthechildentitybutnotaspartofthe
childentity'sprimarykey.Inaddition,nonidentifyingrelationshipsmaybefurtherclassifiedas
beingeither"mandatory"or"nonmandatory".Amandatorynonidentifyingrelationshipexists
whenthevalueinthechildtablecannotbenull.Ontheotherhand,anonmandatorynon
identifyingrelationshipexistswhenthevalueinthechildtablecanbenull.
http://www.sqlteam.com/article/databasedesignandmodelingfundamentals
Here'sasimpleexampleofanidentifyingrelationship:
Parent
http://stackoverflow.com/questions/762937/whatsthedifferencebetweenidentifyingandnonidentifyingrelationships
2/5
5/11/2016
databaseWhat'sthedifferencebetweenidentifyingandnonidentifyingrelationships?StackOverflow
ID(PK)
Name
Child
ID(PK)
ParentID(PK,FKtoParent.ID)noticePK
Name
Here'sacorrespondingnonidentifyingrelationship:
Parent
ID(PK)
Name
Child
ID(PK)
ParentID(FKtoParent.ID)noticenoPK
Name
answeredApr18'09at5:51
AndyWhite
45.9k
38
140
184
1 YouranswerconflictswiththatgivenbyBillKarwin,inthedifferencebetweenwhethertheForeignKey"is
not"or"mustnot"bepartofthePrimaryKeyintheChildrow.NickCAug1'09at15:47
@AndyWhiteButcouldtheprimarykeyoftheparentinanidentifyingrelationshipbenonmandatory,i.e.,
null,whenitispartofathreecolumncompositeprimarykey?FrederikKrautwaldApr29'15at21:21
Nonidentifyingrelationship
Anonidentifyingrelationshipmeansthatachildisrelatedtoparentbutitcanbeidentifiedby
itsown.
PERSONACCOUNT
=============
pk(id)pk(id)
namefk(person_id)
balance
TherelationshipbetweenACCOUNTandPERSONisnonidentifying.
Identifyingrelationship
Anidentifyingrelationshipmeansthattheparentisneededtogiveidentitytochild.Thechild
solelyexistsbecauseofparent.
Thismeansthatforeignkeyisaprimarykeytoo.
ITEMLANGUAGEITEM_LANG
=====================
pk(id)pk(id)pk(fk(item_id))
namenamepk(fk(lang_id))
name
TherelationshipbetweenITEM_LANGandITEMisidentifying.AndbetweenITEM_LANGand
LANGUAGEtoo.
answeredMay22'14at14:31
Skarllot
439
Theidentifingrelaionshipmeansthechildentityistotallydependontheexistanceofthe
parententity.Exampleaccounttablepersontableandpersonaccount.Thepersonaccount
tableisidentifiedbytheexistanceofaccountandpersontableonly.
Thenonidentifingrelationshipmeansthechildtabledoesnotidentifiedbytheexistanceofthe
parenttableexamplethereistableasaccounttypeandaccount.accounttypetableisnot
identifiedwiththeexistanceofaccounttable.
answeredApr1'11at18:47
chanchaldixit
31
http://stackoverflow.com/questions/762937/whatsthedifferencebetweenidentifyingandnonidentifyingrelationships
3/5