Jump to content

Recommended Posts

Hello everyone, I want to code a Books Library management system using php and mysql, this book library should allow me to:

 

1- Search for books by name, category etc..

2- Add new books to the library

3- Record books state, whether they are: present on the library or rented by a student

4- Record the date the book was out of the library and the date it was returned,

5- Finally, it should give a notification if a certain book was not returned for more than 2 days

 

How many tables should I need to achieve the above goals? and how should the table structures and fields look like? Is there any ideas?

 

Any help would be appreciated indeed.. 8)

Link to comment
https://forums.phpfreaks.com/topic/187050-php-books-library-management-system/
Share on other sites

Books:

ISBN

dewey

type //public or reference

format // HC-PB-periodical

author

title

desc

num_copies

check_out_date

status //in/out

 

Users:

ID

name

email

overdue_ban

access_level

whatever else you want to keep

 

Now you will also need to make a new table every day like 01012010 or whatever you decide for the date format. This is to keep track of checked out and returned books and so you have a record of the in/out. You could just keep track in the books table but then you would have to loop through all your books to send notices and track overdues. You could alternately just have a "out" table and keep a daily copy of it for records/log purposes. It should be like this

 

out or date or whatever

ISBN

ID / user who has book out

due_date

 

I wont build your SQL file for you but will tell you to get a forum script and look at the SQL file to give you an idea of what you need to do. This is because if you are going to make a library catalog you will have to know this stuff yourself. Here is a good start and inline with what you want to do.

http://www.sitepoint.com/blogs/2009/03/12/mysql-foreign-keys-quicker-database-development/

I would suggest. Most people would tell you to use the user ID for a primary. I would suggest for this instance you look at using the ISBN. You should also want to consider how you handle periodicals. You might want to make a table for them instead of keeping them under books. Just one more thing, if you have texts that have supplements you should decide if you want them stored. I would suggest you consider keeping them in their own table and foreign them to the book.

 

 

HTH

Teamatomic

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.