Database of petshop 4.0

Source: Internet
Author: User

Petshop 4.0 uses four databases: mspetshop4, mspetshop4orders, mspetshop4profile, and mspetshop4services.

1. mspetshop4 Database
Among them, mspetshop4 is used to manage basic data information such as products and categories. There are six tables.
Aspnet_sqlcachetablesforchangenotification
Category
Inventory
Item

Product
Supplier

CategoryTable: ProductsCategoryTable. This category mainly classifies products in large categories, such as fish and birds in petshop. In the field, one is the category ID, the other is the category name, the other is the description, and the primary key is the category ID.

ProductTable:ProductTable, this product is not a final product, but an abstract product, such as fish, there are many types of fish, such as sharks, for a pet store, sharks have several different names, so there are several different names on the shelf. Each name must be represented in the item table. In the product table, the fields are: Product ID, product category, product name, remarks, and image addresses corresponding to such products. In this table, four indexes are created with the product ID as the primary key: 1. product Name; 2. category id; 3. product Name + category ID; 4. product ID + product name + category ID. For more information about indexes, see database information.

ItemTable isDetailsPet. Each product corresponds to one or more specific items. In this table, productid is the product corresponding to it, and a foreign key constraint is created on this field. The fields in this table are respectively "Pet item ID", "Product ID", "Pet price", and "unitcost unit price? Supplier ID, status (I only see the data in P, but I don't know how to modify it), pet name, and the image address corresponding to the pet. In this table, Itemid is the primary key, productid and supplier are the foreign keys, that is, their values are values in the product table and supplier table, and a large index is created: itemid + productid + listprice + name.

SupplierTable isSupplierTable. I haven't seen much about the role of this table, but here I will identify who the supplier of each PET is. After the standard petshop is installed, there are only two pieces of data in it, now let me introduce the meaning of the fields in this table. The primary key is the supplier ID. The following are the supplier names, and the value in status is AC. I don't know what it means. addr1, addr2 must be clear at first glance. The city can also be clear from the literal meaning. The State represents which state in the United States and zip code is used, the phone number is next to it.

InventoryIt's a pet.InventoryTable. Itemid is the pet ID, and the number of inventory is shown below. I personally think that the Itemid here should be a foreign key constraint, but petshop does not. I don't know why.

According to the above database table, petshop abstracts several data entity classes. Let's analyze it first. There are a total of six tables in the above database, which can represent the following concepts: cache, category, and product (I don't know if this is a good idea ), pet information, suppliers, inventory. The cache can be used as a data entity. Because the cache is only a technology, the inventory is an attribute that can be included in the pet information. I think, the rest can be abstracted or mapped. However, in petshop, only the categories, products, and pet information are abstract entities without specific supplier classes. The reason may be that in petshop, suppliers are not a major contradiction, that is to say, the pet store does not have much to do with the supplier, so it is not included.

DivisionAspnet_sqlcachetablesforchangenotificationOther tables are basic data tables to be used in combination with. Net cache processing. They have corresponding models in petshop 4.0.

Category can have fish, birds, and insects. Product can further classify category. For example, birds can be divided into penguins and owls. item can be further specific to penguins.

2. mspetshop4orders Database

It is mainly used to store order details, basic order information, and order status data.
LineitemStore the information of purchased items in an order, such as order number, item ID, unit price, and quantity.
OrdersUsed to store productsOrder DetailsInformation, such as order number, user ID, and contact information
OrderstatusUsed for recordOrder Status

3. mspetshop4profileDatabase
Description of the mspetshop4profile Database
It stores basic account information, shopping cart information, and user configuration information.
AccountRecordCustomerBasic information, such as name, email address, and address.
CartStorageShopping CartAnd the item information in the intention list.
ProfilesFor storageBasic customer activity informationFor example, username, anonymous access, Last login time, etc.

 

4. mspetshop4services Database
Mspetshop4services database description
Storage member qualifications, roles, user configurations, and applications Program .
Aspnet_applications stores information about the applications involved in the database.
Aspnet_membership stores user-related information such as the user login password and creation time.
Aspnet_paths stores the relationship data between the application and the directory path.
Aspnet_personalizationallusers stores personalized settings for Web parts of all users.
Aspnet_personalizationperuser stores personalized settings for each user's Web parts.
Aspnet_profile stores user configuration data.
Aspnet_roles stores role information.
Aspnet_schemaversions stores the modes supported by user configuration information.
Aspnet_users records basic user information.
Aspnet_usersinroles stores the relationship data between users and roles.
Aspnet_webevent_events stores Web event-related information.

By dividing the data of a complete system by functions, each part of the data is stored in an independent database server, which is a typical distributed database mode. This method not only improves the reusability of databases and applications, but also disperses the pressure on database servers to solve database bottlenecks in a program.

 

Ref:

Http://blog.yarnn.com/empolder/petshop-database/

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.