Jpetstore Learning Summary (2)

Source: Internet
Author: User

When writing Jpetstore, the most difficult thing to understand is the database and the relationship between each table, I am here on the database simple introduction.

Here are all the tables for the database:

The account form is a personal information table, which includes the user's name, email address, location, which city, etc.

There are only two fields in the Bannerdata table, one is the pet's category name, and the corresponding picture path

Category, product, and item three tables belong to the relationship, such as dogs are divided into husky, Akita and German Shepherd, where the dog is cagegory, husky, Akita and German Shepherd is product. Specifically, each pet dog belongs to the item, such as the family has a husky, called "Wang ' an", the need to be the item table.

The inventory table is the number of each item, which is used when the order is created, and when the quantity is less than or equal to 0, the order creation fails.

Orders is the order form, and the order number starts at 1000.

The LineItem table records how many item per order, the number of each item, the unit price, the LineNum field is difficult to understand, such as an order with three item as follows:

Then the LineNum is 1, 2, 3, mainly to query the number of each order has the item to design a field.

Orderstatus Order Status table, including the time of order ordering, and status, it's not clear what the p means in the Status field.

Profile is the user's additional information, such as the favorite pet, what the language is, the feeling that the table is superfluous, do not know why not put this information in the Account table.

The sequence table has only two records, as follows:

  

The first linenum do not understand what is, the second is to save the next order number, such as you ordered an order, then the order number is 1008, and then update, the 1008 is updated to 1009.

The Signon table only saves the user name and password

The Supplier table is the provider's information, which is the seller's information.

The above is my understanding of the database, and can not guarantee that all is right, but also hope that you correct.

  

  

Jpetstore Learning Summary (2)

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.