Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:23:53+00:00 2026-06-17T10:23:53+00:00

I am trying to conceptualize a database layout and I have a theory question.

  • 0

I am trying to conceptualize a database layout and I have a “theory” question. I have a system that has for example:

  • users
  • books

The books are not unique, for instance Alice, Bob, and Carl can all have a copy of Moby Dick. Also, each user can have many books. This is a simple many-to-many relationship that I understand pretty well. However, where would I store information about Alice’s specific copy of Moby Dick?

I eventually want to be able to do the following:
– find all users who have a copy of Moby Dick
– change the information about an individual “instances” of a book :Alice’s copy of Moby Dick is “loaned out”
– change/add information for a book (i.e. everyone’s copies): Add publisher info to Moby Dick.

I can’t see how to efficiently lay this out. I could have 1 table of books, 1 table of users, and then n tables for n users, each containing information about his/her collection. This seems like it will be slow when I need to find every one with a copy of Moby Dick. Any suggestions would be helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:23:55+00:00Added an answer on June 17, 2026 at 10:23 am

    Assuming that it is a library database, I would start with the below design.
    Tables:

    1. users (who borrows a book copy)
    2. books (basic information about the book, title, author etc… Information on this level is logical)
    3. book copies (this one stores the phsyical printed book information)
    4. user book loans (who has borrowed which copy of the book)

    This table structure allows,

    1. A book can have many book copies and each of them can be identified.
    2. One user can have many book copies

    For a better understanding here is some pseudo SQL code.

    “find all users who have a copy of Moby Dick”

    SELECT users.user_name
      FROM users u, "user book loans" ubl, "book copies" bk, books b
     WHERE 1 = 1
       AND b.book_name = "Moby Dick"--find book
       AND b.book_id = bk.book_id--find copies of that book
       AND bk.book_copy_id = ubl.book_copy_id--find loan info for the book copy
       AND ubl.user_id = u.user_id--find user who borrowed the copy
    

    I think the above query explains the table structure, you can add attributes like date published to book copies, or information about the author on books, some date fields on user book loans for tracking the periods that use

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to loop thru a result that has items. Items have a type and
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I am trying to conceptualize how to set up UNION of 3 tables that
I was reading this winsock example . I am trying to conceptualize how you
Trying to construct a query such that I have multiple statement specifying joins, each
Trying to find folders that start with variables that are NOT case sensitive var
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
trying to figure out why this is happening - I have an input text
I know this question has been possed before, but the explanation was a little
Trying a simple project to create my own (very basic) data binding. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.