SlideShare a Scribd company logo
Library Assignment
Let's try to understand one
simple database
A library allows customers
to check out books
So what tables do we need?
Customer table: any data the
library needs to keep about its
customers
Customer table primary key:
Autonumber
Book table: store any data the
library needs to keep about its
books
Primary key for book table
Is there a relationship
between the book and
customer table?
To see if 2 tables have a
relationship you must ask 3
questions.
You have to ask 3 questions
for each side of the
relationship
Could you have a book in the
book table that no one has
checked out?
Could you have a book that 1
customer has checked out?
Could you have a book that
more than 1 customer has
checked out?
Since you can have a book
checked out by more than
one customer
                    M

   Book           Customer
Could you have a customer
in the customer table that
has not checked out a book?
Could you have a customer
that has checked out 1 book?
Could you have a customer
that has checked out more
than 1 book?
This side of the relationship is
also many!
       M

     Book              Customer
So we have a many to many
relationship!

    M             M

  Book           Customer
Each customer can check out
more than one book and each
book can be checked out by
more than one customer
We can’t track which book a
customer checks out without
adding a new table.
To create a bridge table you
start with the primary keys of
the related tables
What should be the primary
key for the bridge table?
Entity relationship diagram
shows the relationship

           1   M              M   1
customer           checkout           book
But a customer can check out
more than one book at a time!
So instead of creating a bridge
table between customer and
book tables we will create a
check out table to show each
time a customer checks out
books.
So we need a table to show
each time a customer checks
out books…
…and another table to show
exactly what books that
customer checked out that
day
The Checkout_Book table
would be the bridge or
junction table here for the
Book and Checkout tables
many to many relationship.
To enter data in this
database
You could not enter data about a
customer checking out a book if…
Questions?
Access Database Library Assignment
Access Database Library Assignment

More Related Content

Viewers also liked (13)

PPTX
Library Management System PPT
Tamaghna Banerjee
 
PDF
Library management
farouq umar
 
PDF
Library mangement system project srs documentation.doc
jimmykhan
 
PPT
Data Base System Application - Unit 7
Amit Chandra
 
PPTX
Dbms in education sector
antuvane
 
PPTX
Database Programming Project Assignment
Mahesh Kodituwakku
 
PDF
Assignment 2 of Database (Database Security)
Aey Unthika
 
PPTX
ICT Students Presentations
Mahesh Kodituwakku
 
PPTX
Importance of database design (1)
yhen06
 
PPT
Library Orientation
lrmslibrary98
 
PPTX
library management system in SQL
farouq umar
 
PDF
Entity Relationship Diagram of Library System
Abdul Rahman Sherzad
 
PPTX
Library research methods
rphillipsATswbts
 
Library Management System PPT
Tamaghna Banerjee
 
Library management
farouq umar
 
Library mangement system project srs documentation.doc
jimmykhan
 
Data Base System Application - Unit 7
Amit Chandra
 
Dbms in education sector
antuvane
 
Database Programming Project Assignment
Mahesh Kodituwakku
 
Assignment 2 of Database (Database Security)
Aey Unthika
 
ICT Students Presentations
Mahesh Kodituwakku
 
Importance of database design (1)
yhen06
 
Library Orientation
lrmslibrary98
 
library management system in SQL
farouq umar
 
Entity Relationship Diagram of Library System
Abdul Rahman Sherzad
 
Library research methods
rphillipsATswbts
 

More from wiljs (7)

PPTX
Lms best practices-What is yours?
wiljs
 
PPTX
CSM Mentor Presentation
wiljs
 
PPTX
College Faculty Mentor Program
wiljs
 
PPTX
Blackboard 9.1 Secret Sharer
wiljs
 
PPTX
Syllabi Secrets
wiljs
 
PPTX
Bite the Bullet(s)
wiljs
 
PPTX
Enhance learning with PowerPoint or Everything we know about PowerPoint is wrong
wiljs
 
Lms best practices-What is yours?
wiljs
 
CSM Mentor Presentation
wiljs
 
College Faculty Mentor Program
wiljs
 
Blackboard 9.1 Secret Sharer
wiljs
 
Syllabi Secrets
wiljs
 
Bite the Bullet(s)
wiljs
 
Enhance learning with PowerPoint or Everything we know about PowerPoint is wrong
wiljs
 
Ad

Recently uploaded (20)

PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PPTX
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
infertility, types,causes, impact, and management
Ritu480198
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
Introduction presentation of the patentbutler tool
MIPLM
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Horarios de distribución de agua en julio
pegazohn1978
 
epi editorial commitee meeting presentation
MIPLM
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
Ad

Access Database Library Assignment

Editor's Notes

  • #13: The first 3 questions are asked from the book table looking at the customer table. Here the answer is yes. You could have a new book for example.
  • #14: Yes to this question.
  • #15: Again yes to this question.
  • #16: this side of the relationship is many and now we have to see what the other side of the relationship is.
  • #17: The next 3 questions are asked from the customer table looking at the book table. Here the answer is yes.
  • #18: Again yes!
  • #19: And yes again.
  • #20: Since a book could be checked out by more than one customer.
  • #27: If this database only had 3 tables then there would have to be another entry for each book each customer checked out. We can do better than that!
  • #28: So instead of a bridge table we will create a checkout table and bring the customer primary key over as the foreign key and also include a Date_Checked_Out field. To reduce errors and to save time we will have Access enter a default time of today for this field.What would be a good primary key for this table?
  • #29: This is a bridge or junction table so we need both primary keys of the 2 tables in the many to many relationship to serve as foreign keys and here they both can be the primary key. We can never use just one of these two foreign keys as the primary key. And sometimes there are good reasons not to use both foreign keys as the primary key. But here we can totally eliminate errors like accidently entering the same book two times by using both foreign keys as the primary key.