Servlet+oracle MVC Architecture Building a simple shopping cart Web project---database design

Source: Internet
Author: User
Tags java web

Servlet+oracle MVC architecture to build a simple shopping cart Web project

The main implementation of the following features:

1. User login, verify the legality of the user from the database.

2. The shopping hall, take out the product from the database to display.

3. In the shopping hall you can click on the purchase item and jump to my shopping cart interface.

4. On my shopping cart page, you can update the item quantity and be able to calculate the total price of the item. You can delete items. can submit an order.

5. After submitting the order, enter the order page to display the personal information and order information.

6. After submitting the order again, send the user an email to remind the user.


Database design

User table CREATE table users (ID number primary key,name varchar2 () not null,pwd varchar2 (+) not null,email varchar2 (+) not n Ull,tel varchar2 () not Null,grade number (2) default 1 is not NULL), Commodity table CREATE table book (ID number primary key,name varchar2 () not Null,author varchar2 (+) not null,publishhouse varchar2 (+) not null,price number not null,nums number default + NOT NULL); test data (user) insert into users values (' WxH ', ' wxh ', ' [email protected] ', ' 455 ', 1); commit; self-growth create Sequence Book_seqstart with 1increment by 1minvalue 1maxvalue 9999999nocyclenocache; test data (product) insert into book values (book _seq.nextval, ' JSP application development ', ' small Wind ', ' electronics Press ', 59,400, insert into book values (Book_seq.nextval, ' JAVA WEB development ', ' Little Yellow ', ' Electronic industry Press ', 43,734); <pre name= "code" class= "SQL" >commit;
Order Form CREATE table orders (ID number primary key,--order ID  references users (ID),--user number Totalprice Default 0 NOT NULL,--the total price of the order OrderDate date default sysdate NOT null-the time of the order); Order Details table CREATE TABLE OrderItem (ID number Primar Y key, Ordersid number references orders (ID), bookId numbers references book (ID),--ISBN is how much booknum number default 0 not Null-the number of goods); self-growth 1create sequence Order_seqstart with 1increment by 1minvalue 1maxvalue 9999999nocyclenocache; Self-growth 1create sequence Orderitem_seqstart with 1increment by 1minvalue 1maxvalue 9999999nocyclenocache;




———— from "Hanshunping detail JSP"

Servlet+oracle MVC architecture to build a simple shopping cart Web project---database design

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.