SlideShare a Scribd company logo
ERD
Practice
Exercises
Database Design
Exercise 1
Problem
• A company database needs to store information
about employees (identified by ssn, with salary and
phone as attributes), departments (identified by
dno, with dname and budget as attributes), and
children of employees (with name and age as
attributes).
Exercise 1
Problem
• Employees work in departments; each department
is managed by an employee; a child must be
identified uniquely by name when the parent (who
is an employee; assume that only one parent works
for the company) is known. We are not interested in
information about a child once the parent leaves
the company.
• Draw an ER diagram that captures this information.
Exercise 1
Solution
• First, we shall design the entities and relationships.
o “Employees work in departments…”
o “…each department is managed by an employee…”
o “…a child must be identified uniquely by name when the parent (who is
an employee; assume that only one parent works for the company) is
known.”
Exercise 1
Solution
Exercise 1
Solution
o “…each department is managed by an employee…”
o “…a child must be identified uniquely by name when the parent (who is
an employee; assume that only one parent works for the company) is
known. “
o “We are not interested in information about a child once the parent
leaves the company.”
Exercise 2
Problem
• Although you always wanted to be an artist, you
ended up being an expert on databases because
you love to cook data and you somehow confused
database with data baste. Your old love is still there,
however, so you set up a database company,
ArtBase, that builds a product for art galleries. The
core of this product is a database with a schema
that captures all the information that galleries need
to maintain.
Exercise 2
Problem
• Galleries keep information about artists, their names
(which are unique), birthplaces, age,and style of
art. For each piece of artwork, the artist, the year it
was made, its unique title, its type of art (e.g.,
painting, lithograph, sculpture, photograph), and its
price must be stored. Pieces of artwork are also
classified into groups of various kinds, for example,
portraits, still lifes, works by Picasso, or works of the
19th century; a given piece may belong to more
than one group.
Exercise 2
Problem
• Each group is identified by a name (like those just
given) that describes the group. Finally, galleries
keep information about customers. For each
customer, galleries keep that person’s unique
name, address, total amount of dollars spent in the
gallery (very important!), and the artists and groups
of art that the customer tends to like.
• Draw the ER diagram for the database.
Exercise 2
Solution
• Like before, we begin with the entities and
relationships.
• “…artists, their names (which are unique),
birthplaces, age, and style of art.”
• “For each piece of artwork, the artist, the year it
was made, its unique title, its type of art … and its
price must be stored.”
Exercise 2
Solution
• “Pieces of artwork are also classified into groups of
various kinds, … Each group is identified by a name
(like those just given) that describes the group. “
• For each customer, galleries keep that person’s
unique name, address, total amount of dollars
spent in the gallery (very important!), and the artists
and groups of art that the customer tends to like.
Exercise 2
Solution
Exercise 2
Solution
• Now we look at constraints.
o Although not explicitly mentioned in the problem, we assume that each
piece of artwork had to be painted by an artist.
o We also assume that each piece of artwork was created by exactly one
artist.
Exercise 2
Solution
• Suppose we had several piece of artwork with the
same title, and we told them apart by artist?
• Example: “What is Love?” by Cheryl D, “What is
Love?” by Joe Brown, etc.

More Related Content

What's hot

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
koolkampus
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Rdbms
RdbmsRdbms
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
RIAH ENCARNACION
 
Database Chapter 3
Database Chapter 3Database Chapter 3
Database Chapter 3
shahadat hossain
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
Dr. C.V. Suresh Babu
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
bit allahabad
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Erd
ErdErd
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
sadique_ghitm
 
DATABASE CONSTRAINTS
DATABASE CONSTRAINTSDATABASE CONSTRAINTS
DATABASE CONSTRAINTS
sunanditaAnand
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
Bhargav Amin
 
Deductive databases
Deductive databasesDeductive databases
Deductive databases
Dabbal Singh Mahara
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
AbhinavPandey274499
 
Ordbms
OrdbmsOrdbms
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
sabah N
 

What's hot (20)

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Rdbms
RdbmsRdbms
Rdbms
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
 
Database Chapter 3
Database Chapter 3Database Chapter 3
Database Chapter 3
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Erd
ErdErd
Erd
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
DATABASE CONSTRAINTS
DATABASE CONSTRAINTSDATABASE CONSTRAINTS
DATABASE CONSTRAINTS
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Deductive databases
Deductive databasesDeductive databases
Deductive databases
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
 
Ordbms
OrdbmsOrdbms
Ordbms
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 

Similar to Erd practice exercises

Ap art
Ap artAp art
Ap art
jjneill
 
Components of an Art Critique_Contemporary Phi. Arts
Components of an Art Critique_Contemporary Phi. ArtsComponents of an Art Critique_Contemporary Phi. Arts
Components of an Art Critique_Contemporary Phi. Arts
hannahruthpayao1
 
Conceptualizing
ConceptualizingConceptualizing
Conceptualizing
Kaitlin Hanger, Ph.D.
 
Surrealismproject
SurrealismprojectSurrealismproject
Surrealismproject
Kara Wilson Smith
 
Year 7 ceramics families are unique totem-2020 wd
Year 7 ceramics  families are unique totem-2020 wdYear 7 ceramics  families are unique totem-2020 wd
Year 7 ceramics families are unique totem-2020 wd
JulietteWegdam1
 
Label work why
Label work whyLabel work why
Label work why
Les Bicknell
 
Zp term 1
Zp term 1Zp term 1
Zp term 1
gmoustaka
 
Marketing Workshop 2 Powerpoint Festivals, Pricing And Presentation
Marketing Workshop 2 Powerpoint  Festivals, Pricing And PresentationMarketing Workshop 2 Powerpoint  Festivals, Pricing And Presentation
Marketing Workshop 2 Powerpoint Festivals, Pricing And Presentation
Fresh Arts
 
Opencall rules
Opencall rulesOpencall rules
Opencall rules
ManamiIshimura
 
Chapter Four Art Criticism
Chapter Four Art CriticismChapter Four Art Criticism
Chapter Four Art Criticism
taraballenger
 
Wartime Marketing 1942 Smithsonian
Wartime Marketing 1942 SmithsonianWartime Marketing 1942 Smithsonian
Wartime Marketing 1942 Smithsonian
Telling America's Story (TAH)
 
KCC Art 211 Ch 5 Critiquing Art
KCC Art 211 Ch 5 Critiquing ArtKCC Art 211 Ch 5 Critiquing Art
KCC Art 211 Ch 5 Critiquing Art
Kelly Parker
 
Limacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra ActivitiesLimacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra Activities
ereiser
 
Art Criticism Instructions
Art Criticism InstructionsArt Criticism Instructions
Art Criticism Instructions
Jacques de Beaufort
 

Similar to Erd practice exercises (14)

Ap art
Ap artAp art
Ap art
 
Components of an Art Critique_Contemporary Phi. Arts
Components of an Art Critique_Contemporary Phi. ArtsComponents of an Art Critique_Contemporary Phi. Arts
Components of an Art Critique_Contemporary Phi. Arts
 
Conceptualizing
ConceptualizingConceptualizing
Conceptualizing
 
Surrealismproject
SurrealismprojectSurrealismproject
Surrealismproject
 
Year 7 ceramics families are unique totem-2020 wd
Year 7 ceramics  families are unique totem-2020 wdYear 7 ceramics  families are unique totem-2020 wd
Year 7 ceramics families are unique totem-2020 wd
 
Label work why
Label work whyLabel work why
Label work why
 
Zp term 1
Zp term 1Zp term 1
Zp term 1
 
Marketing Workshop 2 Powerpoint Festivals, Pricing And Presentation
Marketing Workshop 2 Powerpoint  Festivals, Pricing And PresentationMarketing Workshop 2 Powerpoint  Festivals, Pricing And Presentation
Marketing Workshop 2 Powerpoint Festivals, Pricing And Presentation
 
Opencall rules
Opencall rulesOpencall rules
Opencall rules
 
Chapter Four Art Criticism
Chapter Four Art CriticismChapter Four Art Criticism
Chapter Four Art Criticism
 
Wartime Marketing 1942 Smithsonian
Wartime Marketing 1942 SmithsonianWartime Marketing 1942 Smithsonian
Wartime Marketing 1942 Smithsonian
 
KCC Art 211 Ch 5 Critiquing Art
KCC Art 211 Ch 5 Critiquing ArtKCC Art 211 Ch 5 Critiquing Art
KCC Art 211 Ch 5 Critiquing Art
 
Limacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra ActivitiesLimacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra Activities
 
Art Criticism Instructions
Art Criticism InstructionsArt Criticism Instructions
Art Criticism Instructions
 

More from Jennifer Polack

Catalogued and student workers database(use cases diagram)
Catalogued and student workers database(use cases diagram)Catalogued and student workers database(use cases diagram)
Catalogued and student workers database(use cases diagram)
Jennifer Polack
 
Trainer use cases
Trainer use casesTrainer use cases
Trainer use cases
Jennifer Polack
 
Umw training program
Umw training programUmw training program
Umw training program
Jennifer Polack
 
Classroom scheduler update
Classroom scheduler updateClassroom scheduler update
Classroom scheduler update
Jennifer Polack
 
Temperature data analyzer requirements
Temperature data analyzer requirementsTemperature data analyzer requirements
Temperature data analyzer requirements
Jennifer Polack
 
Training Programming Description- Morning Section
Training Programming Description- Morning SectionTraining Programming Description- Morning Section
Training Programming Description- Morning Section
Jennifer Polack
 
Training Programming Description- Afternoon Section
Training Programming Description- Afternoon SectionTraining Programming Description- Afternoon Section
Training Programming Description- Afternoon Section
Jennifer Polack
 
Cataloged and student workers database
Cataloged and student workers databaseCataloged and student workers database
Cataloged and student workers database
Jennifer Polack
 
Temperature Analyzer Project
Temperature Analyzer ProjectTemperature Analyzer Project
Temperature Analyzer Project
Jennifer Polack
 
Database design
Database designDatabase design
Database design
Jennifer Polack
 
System Modelling
System ModellingSystem Modelling
System Modelling
Jennifer Polack
 
Software process
Software processSoftware process
Software process
Jennifer Polack
 
Agile software process
Agile software processAgile software process
Agile software process
Jennifer Polack
 
What is software engineering
What is software engineeringWhat is software engineering
What is software engineering
Jennifer Polack
 
Requirements engineering
Requirements engineeringRequirements engineering
Requirements engineering
Jennifer Polack
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
Jennifer Polack
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
Jennifer Polack
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
Jennifer Polack
 
Ccsc 2015 panel
Ccsc 2015 panelCcsc 2015 panel
Ccsc 2015 panel
Jennifer Polack
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
Jennifer Polack
 

More from Jennifer Polack (20)

Catalogued and student workers database(use cases diagram)
Catalogued and student workers database(use cases diagram)Catalogued and student workers database(use cases diagram)
Catalogued and student workers database(use cases diagram)
 
Trainer use cases
Trainer use casesTrainer use cases
Trainer use cases
 
Umw training program
Umw training programUmw training program
Umw training program
 
Classroom scheduler update
Classroom scheduler updateClassroom scheduler update
Classroom scheduler update
 
Temperature data analyzer requirements
Temperature data analyzer requirementsTemperature data analyzer requirements
Temperature data analyzer requirements
 
Training Programming Description- Morning Section
Training Programming Description- Morning SectionTraining Programming Description- Morning Section
Training Programming Description- Morning Section
 
Training Programming Description- Afternoon Section
Training Programming Description- Afternoon SectionTraining Programming Description- Afternoon Section
Training Programming Description- Afternoon Section
 
Cataloged and student workers database
Cataloged and student workers databaseCataloged and student workers database
Cataloged and student workers database
 
Temperature Analyzer Project
Temperature Analyzer ProjectTemperature Analyzer Project
Temperature Analyzer Project
 
Database design
Database designDatabase design
Database design
 
System Modelling
System ModellingSystem Modelling
System Modelling
 
Software process
Software processSoftware process
Software process
 
Agile software process
Agile software processAgile software process
Agile software process
 
What is software engineering
What is software engineeringWhat is software engineering
What is software engineering
 
Requirements engineering
Requirements engineeringRequirements engineering
Requirements engineering
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Ccsc 2015 panel
Ccsc 2015 panelCcsc 2015 panel
Ccsc 2015 panel
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 

Recently uploaded

MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docxMATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
AmabellePagalunanAcl
 
Production Technology of Mango in Nepal.pptx
Production Technology of Mango in Nepal.pptxProduction Technology of Mango in Nepal.pptx
Production Technology of Mango in Nepal.pptx
UmeshTimilsina1
 
Email Marketing in Odoo 17 - Odoo 17 Slides
Email Marketing  in Odoo 17 - Odoo 17 SlidesEmail Marketing  in Odoo 17 - Odoo 17 Slides
Email Marketing in Odoo 17 - Odoo 17 Slides
Celine George
 
Why study French Mackenzie Neale PowerPoint
Why study French Mackenzie Neale PowerPointWhy study French Mackenzie Neale PowerPoint
Why study French Mackenzie Neale PowerPoint
nealem1
 
classroom orientation/ back to school...
classroom orientation/ back to school...classroom orientation/ back to school...
classroom orientation/ back to school...
RoselleRaguindin
 
Pedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/TypesPedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/Types
SobiaAlvi
 
New Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo SlidesNew Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo Slides
Celine George
 
How to define Related field in Odoo 17 - Odoo 17 Slides
How to define Related field in Odoo 17 - Odoo 17 SlidesHow to define Related field in Odoo 17 - Odoo 17 Slides
How to define Related field in Odoo 17 - Odoo 17 Slides
Celine George
 
V2-NLC-Certificate-of-Completion_Learner.docx
V2-NLC-Certificate-of-Completion_Learner.docxV2-NLC-Certificate-of-Completion_Learner.docx
V2-NLC-Certificate-of-Completion_Learner.docx
302491
 
Plato and Aristotle's Views on Poetry by V.Jesinthal Mary
Plato and Aristotle's Views on Poetry  by V.Jesinthal MaryPlato and Aristotle's Views on Poetry  by V.Jesinthal Mary
Plato and Aristotle's Views on Poetry by V.Jesinthal Mary
jessintv
 
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
OH TEIK BIN
 
How to Configure Field Cleaning Rules in Odoo 17
How to Configure Field Cleaning Rules in Odoo 17How to Configure Field Cleaning Rules in Odoo 17
How to Configure Field Cleaning Rules in Odoo 17
Celine George
 
Microservices Interview Questions and Answers PDF By ScholarHat
Microservices Interview Questions and Answers PDF By ScholarHatMicroservices Interview Questions and Answers PDF By ScholarHat
Microservices Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo SlidesHow to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo Slides
Celine George
 
VRS An Strategic Approch to Meet Need of Organisation.pptx
VRS An Strategic Approch to Meet Need of Organisation.pptxVRS An Strategic Approch to Meet Need of Organisation.pptx
VRS An Strategic Approch to Meet Need of Organisation.pptx
Banker and Adjunct Lecturer
 
React Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHatReact Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHat
Scholarhat
 
NLC 2024 - Certificate of Recognition
NLC  2024  -  Certificate of RecognitionNLC  2024  -  Certificate of Recognition
NLC 2024 - Certificate of Recognition
Deped
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
nservice241
 
matatag classroom orientation school year 2024-2025
matatag classroom orientation school year 2024-2025matatag classroom orientation school year 2024-2025
matatag classroom orientation school year 2024-2025
florrizabombio
 
Lecture Notes Unit4 Chapter13 users , roles and privileges
Lecture Notes Unit4 Chapter13 users , roles and privilegesLecture Notes Unit4 Chapter13 users , roles and privileges
Lecture Notes Unit4 Chapter13 users , roles and privileges
Murugan146644
 

Recently uploaded (20)

MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docxMATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
MATATAG-MUSIC-and-ARTS_CG-2023_GRADE-4-and-7.docx
 
Production Technology of Mango in Nepal.pptx
Production Technology of Mango in Nepal.pptxProduction Technology of Mango in Nepal.pptx
Production Technology of Mango in Nepal.pptx
 
Email Marketing in Odoo 17 - Odoo 17 Slides
Email Marketing  in Odoo 17 - Odoo 17 SlidesEmail Marketing  in Odoo 17 - Odoo 17 Slides
Email Marketing in Odoo 17 - Odoo 17 Slides
 
Why study French Mackenzie Neale PowerPoint
Why study French Mackenzie Neale PowerPointWhy study French Mackenzie Neale PowerPoint
Why study French Mackenzie Neale PowerPoint
 
classroom orientation/ back to school...
classroom orientation/ back to school...classroom orientation/ back to school...
classroom orientation/ back to school...
 
Pedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/TypesPedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/Types
 
New Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo SlidesNew Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo Slides
 
How to define Related field in Odoo 17 - Odoo 17 Slides
How to define Related field in Odoo 17 - Odoo 17 SlidesHow to define Related field in Odoo 17 - Odoo 17 Slides
How to define Related field in Odoo 17 - Odoo 17 Slides
 
V2-NLC-Certificate-of-Completion_Learner.docx
V2-NLC-Certificate-of-Completion_Learner.docxV2-NLC-Certificate-of-Completion_Learner.docx
V2-NLC-Certificate-of-Completion_Learner.docx
 
Plato and Aristotle's Views on Poetry by V.Jesinthal Mary
Plato and Aristotle's Views on Poetry  by V.Jesinthal MaryPlato and Aristotle's Views on Poetry  by V.Jesinthal Mary
Plato and Aristotle's Views on Poetry by V.Jesinthal Mary
 
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
 
How to Configure Field Cleaning Rules in Odoo 17
How to Configure Field Cleaning Rules in Odoo 17How to Configure Field Cleaning Rules in Odoo 17
How to Configure Field Cleaning Rules in Odoo 17
 
Microservices Interview Questions and Answers PDF By ScholarHat
Microservices Interview Questions and Answers PDF By ScholarHatMicroservices Interview Questions and Answers PDF By ScholarHat
Microservices Interview Questions and Answers PDF By ScholarHat
 
How to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo SlidesHow to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo Slides
 
VRS An Strategic Approch to Meet Need of Organisation.pptx
VRS An Strategic Approch to Meet Need of Organisation.pptxVRS An Strategic Approch to Meet Need of Organisation.pptx
VRS An Strategic Approch to Meet Need of Organisation.pptx
 
React Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHatReact Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHat
 
NLC 2024 - Certificate of Recognition
NLC  2024  -  Certificate of RecognitionNLC  2024  -  Certificate of Recognition
NLC 2024 - Certificate of Recognition
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
 
matatag classroom orientation school year 2024-2025
matatag classroom orientation school year 2024-2025matatag classroom orientation school year 2024-2025
matatag classroom orientation school year 2024-2025
 
Lecture Notes Unit4 Chapter13 users , roles and privileges
Lecture Notes Unit4 Chapter13 users , roles and privilegesLecture Notes Unit4 Chapter13 users , roles and privileges
Lecture Notes Unit4 Chapter13 users , roles and privileges
 

Erd practice exercises

  • 2. Exercise 1 Problem • A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes).
  • 3. Exercise 1 Problem • Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company. • Draw an ER diagram that captures this information.
  • 4. Exercise 1 Solution • First, we shall design the entities and relationships. o “Employees work in departments…” o “…each department is managed by an employee…” o “…a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known.”
  • 6. Exercise 1 Solution o “…each department is managed by an employee…” o “…a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. “ o “We are not interested in information about a child once the parent leaves the company.”
  • 7. Exercise 2 Problem • Although you always wanted to be an artist, you ended up being an expert on databases because you love to cook data and you somehow confused database with data baste. Your old love is still there, however, so you set up a database company, ArtBase, that builds a product for art galleries. The core of this product is a database with a schema that captures all the information that galleries need to maintain.
  • 8. Exercise 2 Problem • Galleries keep information about artists, their names (which are unique), birthplaces, age,and style of art. For each piece of artwork, the artist, the year it was made, its unique title, its type of art (e.g., painting, lithograph, sculpture, photograph), and its price must be stored. Pieces of artwork are also classified into groups of various kinds, for example, portraits, still lifes, works by Picasso, or works of the 19th century; a given piece may belong to more than one group.
  • 9. Exercise 2 Problem • Each group is identified by a name (like those just given) that describes the group. Finally, galleries keep information about customers. For each customer, galleries keep that person’s unique name, address, total amount of dollars spent in the gallery (very important!), and the artists and groups of art that the customer tends to like. • Draw the ER diagram for the database.
  • 10. Exercise 2 Solution • Like before, we begin with the entities and relationships. • “…artists, their names (which are unique), birthplaces, age, and style of art.” • “For each piece of artwork, the artist, the year it was made, its unique title, its type of art … and its price must be stored.”
  • 11. Exercise 2 Solution • “Pieces of artwork are also classified into groups of various kinds, … Each group is identified by a name (like those just given) that describes the group. “ • For each customer, galleries keep that person’s unique name, address, total amount of dollars spent in the gallery (very important!), and the artists and groups of art that the customer tends to like.
  • 13. Exercise 2 Solution • Now we look at constraints. o Although not explicitly mentioned in the problem, we assume that each piece of artwork had to be painted by an artist. o We also assume that each piece of artwork was created by exactly one artist.
  • 14. Exercise 2 Solution • Suppose we had several piece of artwork with the same title, and we told them apart by artist? • Example: “What is Love?” by Cheryl D, “What is Love?” by Joe Brown, etc.