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

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

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.