SlideShare a Scribd company logo
1 of 35
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

Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPTTamaghna Banerjee
 
Library management
Library managementLibrary management
Library managementfarouq umar
 
Library mangement system project srs documentation.doc
Library mangement system project srs documentation.docLibrary mangement system project srs documentation.doc
Library mangement system project srs documentation.docjimmykhan
 
Data Base System Application - Unit 7
Data Base System Application - Unit 7Data Base System Application - Unit 7
Data Base System Application - Unit 7Amit Chandra
 
Dbms in education sector
Dbms in education sectorDbms in education sector
Dbms in education sectorantuvane
 
Database Programming Project Assignment
Database Programming Project AssignmentDatabase Programming Project Assignment
Database Programming Project AssignmentMahesh Kodituwakku
 
Assignment 2 of Database (Database Security)
Assignment 2 of Database (Database Security)Assignment 2 of Database (Database Security)
Assignment 2 of Database (Database Security)Aey Unthika
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)yhen06
 
library management system in SQL
library management system in SQLlibrary management system in SQL
library management system in SQLfarouq umar
 
Entity Relationship Diagram of Library System
Entity Relationship Diagram of Library SystemEntity Relationship Diagram of Library System
Entity Relationship Diagram of Library SystemAbdul Rahman Sherzad
 

Viewers also liked (13)

Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPT
 
Library management
Library managementLibrary management
Library management
 
Library mangement system project srs documentation.doc
Library mangement system project srs documentation.docLibrary mangement system project srs documentation.doc
Library mangement system project srs documentation.doc
 
Data Base System Application - Unit 7
Data Base System Application - Unit 7Data Base System Application - Unit 7
Data Base System Application - Unit 7
 
Dbms in education sector
Dbms in education sectorDbms in education sector
Dbms in education sector
 
Database Programming Project Assignment
Database Programming Project AssignmentDatabase Programming Project Assignment
Database Programming Project Assignment
 
Assignment 2 of Database (Database Security)
Assignment 2 of Database (Database Security)Assignment 2 of Database (Database Security)
Assignment 2 of Database (Database Security)
 
ICT Students Presentations
ICT Students PresentationsICT Students Presentations
ICT Students Presentations
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)
 
Library Orientation
Library OrientationLibrary Orientation
Library Orientation
 
library management system in SQL
library management system in SQLlibrary management system in SQL
library management system in SQL
 
Entity Relationship Diagram of Library System
Entity Relationship Diagram of Library SystemEntity Relationship Diagram of Library System
Entity Relationship Diagram of Library System
 
Library research methods
Library research methodsLibrary research methods
Library research methods
 

More from wiljs

Lms best practices-What is yours?
Lms best practices-What is yours?Lms best practices-What is yours?
Lms best practices-What is yours?wiljs
 
CSM Mentor Presentation
CSM Mentor PresentationCSM Mentor Presentation
CSM Mentor Presentationwiljs
 
College Faculty Mentor Program
College Faculty Mentor ProgramCollege Faculty Mentor Program
College Faculty Mentor Programwiljs
 
Blackboard 9.1 Secret Sharer
Blackboard 9.1 Secret SharerBlackboard 9.1 Secret Sharer
Blackboard 9.1 Secret Sharerwiljs
 
Syllabi Secrets
Syllabi SecretsSyllabi Secrets
Syllabi Secretswiljs
 
Bite the Bullet(s)
Bite the Bullet(s)Bite the Bullet(s)
Bite the Bullet(s)wiljs
 
Enhance learning with PowerPoint or Everything we know about PowerPoint is wrong
Enhance learning with PowerPoint or Everything we know about PowerPoint is wrongEnhance learning with PowerPoint or Everything we know about PowerPoint is wrong
Enhance learning with PowerPoint or Everything we know about PowerPoint is wrongwiljs
 

More from wiljs (7)

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

Recently uploaded

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 

Recently uploaded (20)

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 

Access Database Library Assignment

Editor's Notes

  1. 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.
  2. Yes to this question.
  3. Again yes to this question.
  4. this side of the relationship is many and now we have to see what the other side of the relationship is.
  5. The next 3 questions are asked from the customer table looking at the book table. Here the answer is yes.
  6. Again yes!
  7. And yes again.
  8. Since a book could be checked out by more than one customer.
  9. 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!
  10. 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?
  11. 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.