Use javascript to ensure that an entry has been made

Assignment Help Database Management System
Reference no: EM13317251

Introduction

This is an individual assignment in which you are required to develop a dynamic web application as described below using PHP, MySQL, JavaScript and CSS. Details of the weight of the assignment and due date are given in the course description.

Task Description

Database structure

The web application uses a 3-table relational database stored on a server that records the details of books borrowed from a library. The structure of the database is:

BORROWER(BORROWER_NUMBER, BORROWER_NAME, EMAIL)
BOOK(ISBN, TITLE, AUTHOR, PUBLISHER, YEAR_OF_PUBLICATION, NUMBER_OF_COPIES)
BOOK_BORROWED(BORROWER_NUMBER, ISBN, COPY_NUMBER, DATE_BORROWED)

Each record in the BOOK_BORROWED table refers to one book borrowed by one borrower on the date specified. Borrowers may borrow up to 6 books at a time. The field NUMBER_OF_COPIES in table BOOK stores the number of copies of a specific book owned by the library and available for borrowing. If the library owns a single copy only of any book, then 1 should be entered for the COPY_NUMBER whenever it is
borrowed. No nulls are permitted. The BOOK_BORROWED table has a primary key that combines the primary keys of the other 2 tables. Primary keys have been underlined.

The borrower number is a 5-digit number with no leading zeroes. The ISBN (International Standard Book Number) is a 13-digit number that uniquely identifies a published book. All copies of a given book have the same ISBN. The year of publication is a 4-digit number. The date borrowed has the format ‘ddmmyyyy'.

Initial data
When the database is set up it should be populated with the data that you have chosen. Display this data as part of your documentation. Each table should have from 3 to 6 records initially.

Borrowing forms
Before implementing the database, use PHP and CSS to create a form that enables a librarian to enter the details for the BOOK_BORROWED table when a borrower borrows one or more books by a student for one or more courses as part of a single program. Wherever appropriate you should use drop down boxes for user-friendly entry of data and to reduce entry errors.

Use JavaScript to ensure that an entry has been made in each element of the form and that the entries are valid. Check that numbers have been entered in fields that are numerical and that the numbers entered are within the specified range. Test the form by posting the values of the entries in the borrowing form to a separate php file that will display the borrowing details in full, including information obtained from the other two tables (once the database has been implemented).

Creating the database
Use MySQL commands from the command line to create a database on the server with the structure specified and populated with the initial data. Test the database by writing a query on the command line that displays all initial data as described on page 1. Write PHP code that will enable users to create an account giving them access to the database with permission to query the database and add new bookings. Account usernames will generally be email addresses. However include username ‘tutor' with password ‘guest' as one of the accounts. User passwords should be encrypted with an MD5() hash function.

Reference no: EM13317251

Questions Cloud

What will be the value of the vertical stress at the point : What will be the value of the vertical stress at this point immediately after the fill is placed, before any consolidation has occurred. What will it be after consolidation is completed.
What is the phase difference in the sound waves : Two compact sources of sound oscillate in phase with a frequency of 110 Hz where the speed of sound is 340 m/s. What is the phase difference in the sound waves from the two sources at that point
What is the magnetic field inside the cylinder : A thin wire of length 3.14 meters has a current of 6.00 Amperes running through it. what is the magnetic field (in Tesla) inside the cylinder
Analyze issues related to punishment-prevention : Analyze issues related to punishment and prevention. Then, comment on the following statement: If it can be shown that punishment fails to prevent crime, then, by utilitarian standards, we have no grounds on which to punish.
Use javascript to ensure that an entry has been made : When the database is set up it should be populated with the data that you have chosen. Display this data as part of your documentation. Each table should have from 3 to 6 records initially.
Important molecules and enzymes : You have discovered a new organism that has a mutant phosphofructosekinase-2/fructose 2,6-bisphosphatase-2. The mutant enzyme has a Km of 1 ?M for fructose 6-phosphate while the wild type enzyme has a Km of 10 ?M, the Km for F2,6P is unchanged.
At the time is the object at rest : x = 2 + 3t - t^2, Where x is in meters and t is in seconds, Determine At the time is the object at rest
What is the moment of inertia if the pulley is uniform : You have a pulley 13.8 cm in diameter and with a mass of 2.1 kg. You get to wondering whether the pulley is uniform. What is the moment of inertia if the pulley is uniform
Determine the hydraulic conductivity of the aquifer : Drawdown at an observation well 15 m from the pumped well is 3.0 m, and drawdown at a second observation well 150 m away is 0.30 m. find the hydraulic conductivity of the aquifer.

Reviews

Write a Review

Database Management System Questions & Answers

  Completing transaction using sql

Write down the complete transaction using SQL.

  How to use spool command

How to interactively query a database by using SQL statements and SQL*PLUS commands and how to use spool command to save an interactive session within SQL*PLUS.

  Would not this result in pure gibberish most of the time

In a "chosen ciphertext attack" the attacker has the option of choosing the ciphertext sample and having it decrypted by someone who knows the key. Wouldn't this result in pure gibberish most of the time?

  Write an essay on marketing management

The customer is always right -The customer doesn't know what's best. It's the baker's (marketer's) job to educate him. The above statements succinctly point out a subtle battle which rages within the marketing discipline.

  How many green books it has

Webster Library wants to know how many green books it has. Out of the 500 shelves of books, 3 shelves were selected. These shelves hold 150 books each. 54 of the books sampled were green.

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Database triggers are utilized to record logins by users

Several times, database triggers are utilized to record logins by users. Here is the example of login trigger that inserts row into table every time a user connects.

  Discuss the serious data redundancy problems

Identify and discuss the serious data redundancy problems exhibited by the file structure shown in Figure and looking at the EMP_NAME and EMP_PHONE contents in Figure, what change(s) would you recommend?

  Draw an e-r diagram

Draw an E-R Diagram and draw an E-R Diagram for Student Information System.

  Find average number of books borrowed per member

Find the average number of books borrowed per member. Take into account that if a member does not borrow any books, then that member does not appear in the borrowed relation at all.

  Explain how to create query in access query wizard

Describe how to create a query in Access Query Wizard equilvant to the query: SELECT first, last, department, hours FROM payroll WHERE hours>.

  Explaining business activity in new is with a database

Assume you manage business activity which needs a new IS with a database. The development team is divided on which DBMS you must use. One faction wishes to use oracle,a second wants to use MtSQL, and a third wants to use SQL server.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd