DVD Rental MySQL Project Help

Greetings,

I'm currently working on a website for an assignment, and I'm reaching out for any help that is available at this point. The requirements for the website are that it's able to rent and return DVD rentals. Currently I'm practicing with the Sakila database (http://dev.mysql.com/doc/sakila/en/sakila-structure.html), and I've been able to connect the database and write the front end CRUD tables for managing customers and DVDs. However, I need help writing a front end that can manage renting the DVDs and returning the DVDs. I understand that this is a lot to ask, but I appreciate any insight that anyone can give me.
adamndoeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
We can help guide you with this, but you will need to create your tables and write code for your assignment.  

My hint would be a transaction table that is linked to a Sales Order

SalesOrder
SalesOrderID (Unique)
CustomerID
TimeStamp

LinkedSalesOrderTransaction
UniqueID
SalesOrderID
ProductID  (unique id for the dvd)
TimeStampOut
TimeStampIn

Create the sales order with customer info.  Add multiple dvd to the linked transaction table that add the time stamp out.  Then at check in, look up the unique product id to find the linked transaction and update the time stamp in.
adamndoeAuthor Commented:
Hi Scott,

Thanks for the reply. I've attached a picture that describes the database I'm basing the rental site off of. It shows the 'rental' table with 'inventory, customer, and staff IDs' as foreign keys. Again, the difficult part is more-so with the front end of the website. Thanks for your quick response.

-Adam
SakilaERD.png
Jason C. LevineDon't talk to me.Commented:
However, I need help writing a front end that can manage renting the DVDs and returning the DVDs.

So with the understanding that we cannot do your homework for you, what help do you specifically need?
Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

adamndoeAuthor Commented:
I'm not sure how to create a form for taking in the inventory id,customer id, and staff id in order to update the films inventory.

Similarly, I'm not sure how to create a form for returning the DVD.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Take it in pieces.   I would start by designing my form in something you can work quickly with like powerpoint or google presentation or paper and pencil.  Sketch out what you visually would need to get the info required to make a rental.  If you had to fill out an order form to get the required data, what would you need.  

You will need to at least fill in customer information.  How will you look that up? what if they are not in the database? Any safeguards if they are actually in the db but spelled wrong (caryn, karen, karin) or multiple names in first or  last name field?  How are you going to look up or scan the dvd title? Can people rent only one at a time or multiple? is there a limit? can they rent if they have items not turned in or past due? Can the database layout support what you came up with?

What I suggest is sketch out your over all plan and perhaps we can help.  Then for each subsequent part, you probably will want to ask separate questions to keep this easy and please make sure to note in your questions this is for an assignment as there are guidelines we follow.   http://support.experts-exchange.com/customer/portal/articles/1435136

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
If you're new to PHP, this article can help you find useful learning resources, and most importantly, steer you away from the many terrible PHP examples that litter the internet.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

All of the advice you'll get here at E-E is likely to be useful.  The most important I see in this thread is to take the problem apart into elements that are small enough to solve by themselves.  This is called the Single Responsibility Principle (the first and most important of the SOLID Principles).  When you're working with SRP-sized classes, your code will be able to grow with the addition of self-contained units that interact through formal interfaces.  By segregating the responsibilities and sharing data only on the interfaces, you will be able to write code that is very dependable and easy to test.

The rental-and-return designs have a feel (to me, at least) of something like a resource scheduling calendar.  This article has a section that shows the basics of something like that.  If you're new to date and time processing you might want to read the entire article.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.