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

Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Hitesh Mohapatra
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
BG Java EE Course
 
Example for ER diagram part11
Example for ER diagram part11Example for ER diagram part11
Example for ER diagram part11
DrMohammed Qassim
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classificationgopal10scs185
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
Pooja Dixit
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and Heterogeneous
Faraz Qaisrani
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modelingSlideshare
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
Saqib Raza
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
Ajit Nayak
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 
Relational model
Relational modelRelational model
Relational model
Dabbal Singh Mahara
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
Syahriha Ruslan
 

What's hot (20)

Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Example for ER diagram part11
Example for ER diagram part11Example for ER diagram part11
Example for ER diagram part11
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classification
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and Heterogeneous
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Relational model
Relational modelRelational model
Relational model
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 

Similar to Erd practice exercises

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
 
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
 
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 ArtKelly Parker
 
Limacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra ActivitiesLimacon 2014 CC Algebra Activities
Limacon 2014 CC Algebra Activities
ereiser
 

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

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

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.