Replace the db contents by simply running the new script

Assignment Help Basic Computer Science
Reference no: EM13985064

Web Design for E-Commerce Project 2 – Due: see eLearning 

We're now going to start with a small website! Four things need to be done: 

1.       Set up the basic site structure

2.      Define the basic DB structure

3.      Start filling the DB

4.      Outline the basic design for our welcome page

For more information look at the text book, Chapter 3, p. 48ff as well as Chapter 7, pp. 162ff. We'll use a slightly simpler model than the second site and you will have some more freedom to make your design choices. 

Lots of examples and inspiration can be found on the book's companion site:

https://www.larryullman.com/books/effortless-e-commerce-with-php-and-mysql/ 

1.  Our products 

We're going to sell computers (we all know something about that, I hope) in the following three categories: 

1.       Desktops

2.      Laptops

3.      Tablets 

2.  Server layout (1st version) 

The book in Chapters 3 and 7 describes the basics of the directory structure – we'll use a slightly less complicated middle way here: 

/htdocs

/includes

/css

/images

/admin

/products

/customers

 

3.  Deliverable 1: DB Schemata and some data  

The design will evolve over the next couple of projects, so make sure you can quickly modify the database schemata and replace the DB contents by simply running the new script. 

3a. The DB design for the product side should have (at the moment) the following tables: 

1.      Categories (one record for each of the three categories above)

with a name, a short description and the URL of a representative icon1 (jpg) 

2.      Products (one record for each product we're going to sell)

with a name, the category (foreign key!), a short description, a price, a current stock supply  and the URL of a representative icon (jpg) 

For each table, make sure you have a surrogate primary key! (8 pt/ea = 16) 

Produce INSERTs for the three categories and at least two products in each category (you can make the data up. (3+6 = 9 pt) 

The jpgs should all be 128x128 and stored in the /images subdirectory of htdocs. (1/ea = 9 pt) You can use any kind of fake images you want; https://www.codefear.com/icons-2/25-free- computer-icons-sets/ seems to have some free ones2. You might have to resize them – GIMP (https://www.gimp.org/) is much more than good enough for that! 

3b. Create two SQL Queries for your products; place them into your .sql file. (3 pt/ea = 6) 

1.  All tablets (products in the “Tablet” category) that cost less than 400$ (make sure you have at least one) 

2.  All available laptops (those with a stock supply > 0)  

3c. For the customer side for the moment we're happy with just one table: 

1.  Customers

with first/last name, one address field, city, state and ZIP 

Create INSERTs for at least two customers! 

The resulting script should be stored directly in the /xampp directory, so you can easily find it and use phpmyadmin to run it against your database. Placing it inside the /htdocs directory would be a bit of a security risk, because someone could use the server to download it.

 
 


1       If you store an icon under /htdocs/images/a.jpg, the URL would be https://localhost/images/a.jpg.

2       Neither me nor UWF, nor any of its divisions can be held responsible for information contained in pages reachable over any external link provided. This includes views expressed on these websites or content that might be harmful or illegal. Ultimately, it's in the user's responsibility to assess risks and legal consequences of using these links. (We'll talk about disclaimers a little further down!)

 

4.   Deliverable 2: Sketch of the Welcome and Contact page 

Here's where your creativity comes in: Look at the welcome page of any online hardware/computer store and find the most important aspects they share. 

The name of the welcome page should be index.php

1.    Provide a company name and header – make up a company name and style it nicely 

2.    Provide links to the following functions (3 pt/ea = 15) 

1.               Home – will always bring the visitor back to this page

2.             Contact– company and contact information (make it up)

3.             Browse categories

4.             Browse products

5.              Shopping cart 

Except for the first two (Home & Contact) do not implement any of these pages, this will come over the next exercises and projects! 

3.    Somewhere close to the top of each page provide a login form (user name & password). Don't implement the login process yet, the form should just sit there. To learn more about that, look for example @ https://www.html-form-guide.com/php-form/php-login-form.html. 

4.    Somewhere prominent on each page place a dummy search box which we'll use later to allow searching for products – this also doesn't have to be implemented right now. 

5.   Use (an) external style sheet(s) (https://www.w3schools.com/css/css_howto.asp) and place them (it) in the /css subdirectory. 

6.    Build a “Contact” page, containing the (made up) company information and a (dummy!) email address. Also provide a legal “disclaimer” that absolves you from any liability claims that might originate in the use of your site3. Use the same layout for the contact page as you did for the home page. 

5. Submission

As in the last exercise, pack your whole htdocs directory into a zip archive and drop it into the eLearning dropbox. Also submit your .sql file separately (it's not supposed to be in your htdocs, remember?) 

 

3       Here's a pretty comprehensive one: https://www.freenetlaw.com/free-website-disclaimer/

Reference no: EM13985064

Questions Cloud

Subsequences of markov chains : Suppose fXng is a stationary Markov chain. Let Yn D X2n. Prove or disprove that fYng is a stationary Markov chain. How about fX3ng? fXkng for a general k?
Create a rough table of contents for issue one : escribe your target readers and why they would buythe publication. Describe psychographics and how you will use these psychographics to make graphic choices that will appeal to your audience
What are the final temperature and pressure of the gas : What are the final temperature and pressure of the gas? Show the compression process on a pV diagram. How much work is done to compress the gas?
Determining the working order on saturday : If it is in working order on Monday, what is the probability that it is in working order on Saturday? If it is in working order on Monday, what is the probability that it remains in working order all the way through Saturday?
Replace the db contents by simply running the new script : The design will evolve over the next couple of projects, so make sure you can quickly modify the database schemata and replace the DB contents by simply running the new script.
What resources may be a concern in the country : Why should resources be a concern in a global strategy and what resources may be a concern in the country you selected?
What is the focal length of eye system : What is the focal length of my eye system? Treat it as a simple lens at my cornea. What is my eyes' refractive power in Diopters?
Independent standard normal values : Simulate 500 independent standard normal values. Use these to generate 250 pairs of bivariate normal vectors .Xi ; Yi / with zero means, unit standard deviations, and correlation 0.5. Find the average value of .Xi -Yi /2 over the simulations. Does it..
Article summary-evaluation roots an international perspectiv : Article Summary Carden & Alkin, 2012: Use these Sub-Sections Headings: APA Citation and Purpose of Article. Article- Evaluation Roots: An International Perspective by Fred Carden and Marvin C. Alkin

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Design an if then statement

Design an If-Then statement that assigns 20 to the variable y and assigns 40 to the variable z if the variable x is greater than 100

  Int countrypopulation

The following variable has already been defined: int countryPopulation = 1344130000; Using that variable (do not type the large number) along with text, finish the print statement to print the following: China's population was 1344130000 in 2011.

  Write an overloaded lineup method

The players in a line-up must be unique. Write an overloaded LineUp method that writes a line-up to an output stream.

  Prove by solving the equations using laplace transform

For a RC circuit, we can use Laplace transforms to show that when we apply a step input of 5V, the voltage across the capacitor rises exponentially to a final value equal to step input.

  Makeany dfa in jflap software and run for several inputs

Makeany DFA in JFLAP software and run for several inputs. Take a screen shot andinclude in your assignment. Keep in mind that this assignment is meant to makeyou all get familiar with this software.

  Installing the microsoft office suite software

Describe your experience installing the Microsoft Office Suite software. Note: If the software is already preinstalled, take a look at where the software is installed and list the components that are included in the installed Microsoft Office Suit..

  State turing machine m that calculates function

State a Turing Machine M that computes the function f: {a, b}* → N, where: f(x) = the unary encoding of max(#a(x), #b(x)).

  Advantages and disadvantages of grassroots computing

Discuss how grassroots computing changes the way software is designed, developed, tested, and maintained in a typical organization. What are the advantages and disadvantages of grassroots computing?

  Write a statement that passes the value 4

1) Examine the following function header, the write an example call to the function. void showValue(int quantity)

  Identifying potential risk, response and recovery

For each malicious attack and threat identified in above, choose a strategy for dealing with the risk (i.e., risk mitigation, risk assignment, risk acceptance, or risk avoidance).

  Methodologies from futures research to plan

Discuss how you can use methodologies from futures research to plan for your preferred future with the future directions in Risk Analysis and Personal health patient-centered health system

  Find out winner in card game

When there is tie, nobody loses. If first two cards total 8 or 9, hand is called a "natural" and it wins automatically, unless both hands have equal value "naturals", in which case it's a tie.

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