search
HomeBackend DevelopmentPHP Tutorial[Product Design] E-commerce design Zhihu summary, product design e-commerce summary_PHP tutorial

[Product Design] E-commerce design Zhihu summary, product design e-commerce summary

If you want to build a B2B2C e-commerce platform, what issues should you pay attention to when setting up background data statistics? How to design a specific statistical module?

Wang Yuping:

I think that before building a database, you need to design the requirements and processes. With the requirements in this step, you will know what data you need here; with the process, you will know what data you need here. What data can be obtained, even the data type.

For example, in supplier management, you will get the supplier’s company region, phone number, category, etc. In data statistics, you can make statistics on region and category, and then based on C’s corresponding demand recommendations, etc.

PalmWong:

It is recommended to start with business understanding:

BBC platform is first divided into three backends

Merchant Portal Platform Operation Portal Buyer Personal Portal

The parts to be counted are also three pieces:

1, from the personal perspective of consumers: personal consumption statistics

2, from the perspective of platform operation: statistics on the operation of the entire platform, statistics on the operation of merchants

3, statistics from the perspective of merchants

BBCThe mall is actually a very complex business system. Due to changes in roles and functions, there are actually a lot of data interactions. There are many exceptions in reconciliation, statistics, and authority management.

You can’t just look at Tmall’s mode and just close your eyes.

Use PHP MySql to build a Taobao mall with tens of millions of users and visits B2C website, how about it?

Dion:

System architecture is very important!

Language:

There is no problem with mainstream languages. PHP, Java, whatever.

Front-end server:

If conditions permit CDN, best. If not, be sure to ensure the load performance of the front end. Generally recommendedNginx.

Application Server:

Cluster. The front end is responsible for load balancing. For clusters, just pay attention to the problem of Session. Nothing else.

Data storage:

If the amount of data is relatively large (millions), it is no problem to use MySQL Memcached to build a cluster.

If the amount of data is large, consider NoSQL. For example, Facebook uses Cassandra, Amazon uses Dynamo .

socici:

You can be simpler and look at it from the perspective of data accessed by users

Static files, including pictures, HTM , JS, css These are data that do not change frequently. Give a separate domain such as http://static.xxxx.com by nginxManagement

The dynamic data released through the front and backend is divided into the following types:

Data read:

1.For big data that users need to query, such as orders, you can check the database of slaver

2.The data displayed on the system public page, such as some product information, rankings, etc. can be retrieved from the cache

Data written:

If it is required to take effect immediately, such as modifying user information, write it directly to the master database

Things that have low real-time requirements or have concurrency restrictions, such as posting Weibo, sending private messages, etc. Write to the queue first, then read and save asynchronously to the database

The problem of product specification design in the e-commerce platform has been thrown out. Please comment?

Product list (product name, price, shelf availability and other basic information)

For example: 1, Mobile phone, 100

Specification table (primary key, productID, specification name )

For example: 1 , 1, operator

Product specification value table (primary key, specificationID, productID, specification valueID, specification valueNAME)

For example: 1, 1, 1, 0, Telecom version

2, 1, 1, 1, mobile version  

Specification inventory table (itemID, specification valueID combination, specification value NAMEcombination, inventory, price)

For example: 1, 1/0 (Operator, Telecom version) , operator /telecom version, 100, 100 Block

Problem description:

The above method can achieve multiple specifications and multiple inventories, but using an agreed specification order makes it painful for the system to count data related to different specifications in the later stage when writing a program.

And when creating a product, you must first create the product before you can create specifications. I personally refer to some large e-commerce platforms and found that product creation is completed with one submission.

Help needed:

I need to give a reasonable product design with multiple specifications, multiple prices, and multiple inventories based on my problem description, to solve my programming complexity, and at the same time ensure that I can create interactive products in the interactive design. Simple.

socici:

Product Category (typeid,type name, parentID)

Product list (product name, price, shelf availability and other basic product information, product classification)

Specification table (primary key, specification name )

Specification value table (Specification valueID, Specificationid, rule value type, specification default value)

Specification-Category association table (product categoryid, specificationid)

Product-Specification Association Table(Productid,Specificationid,Specification valueID,Specification actual value)

Inventory table (itemid,quantity,price)

How is a database similar to Taobao’s product details page stored?

1, the number of pictures and the number of introduction paragraphs for each product are not fixed , is After editing with the editor, will the entire html be stored in the database? Not realistic?

2. If stored as database fields, number of pictures and introduction paragraphs for each product The number is not fixed ,Even if you set an upper limit,, it will waste a lot of fields

3.When querying ,If the picture and introduction text are stored separately , So how do you match a certain picture with a question about introducing it when the page is displayed after querying

Liu Chuanshuang:

Overall

1. The structured information of the product is stored in the database, including name, price, inventory, attributes, etc. Of course, it is not a simple table.

2. The unstructured information of the product is saved into small files and stored in a self-developed massive small file system, including pictures and product description information.

3, product image file id needs to be stored in a database or other types of storage, and does not necessarily require multiple fields. This is a horizontal method. Generally, a picture of a product is stored as a record and expanded vertically.

4. Before saving the document, save the image first, and put the [Product Design] E-commerce design Zhihu summary, product design e-commerce summary_PHP tutorial image in the document Src address is replaced with the image path in the small file system, and that’s it

In addition, storage cannot be understood as only databases and file systems. There are various types of storage, different file systems, various RDBMS, NoSqlStorage...

Zi Liu:

Actually, several colleagues have already answered, so I will add something from a historical perspective

The earliest this field was indeed placed in the database was a clob field, which stored html fragment. Moreover, at that time, this field was in the same table as the product title, price, seller ID, etc. It is conceivable how much the performance would be affected.

So this method is destined to not last long. In 2005, I separated this field into a separate table to store it. This does not require much technology. content, it relieved a lot of pressure on the database at that time, and the DBAswere very grateful to me.

After 2006, Taobao began to use caching on a large scale. This field was also put into the cache, which reduced a lot of pressure on the database. (Only data that is not in the cache is read from the database, and it is put into the cache after being read).

In 2007, Taobao developed a distributed file storage system TFS, so this was completely The fields are extracted from the database, along with large field information such as transaction snapshots.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1122388.htmlTechArticle[Product Design] E-commerce design Zhihu summary, product design e-commerce summary I want to build a B2B2C e-commerce platform , what issues need to be paid attention to when building background data statistics? How to design specific...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain how load balancing affects session management and how to address it.Explain how load balancing affects session management and how to address it.Apr 29, 2025 am 12:42 AM

Load balancing affects session management, but can be resolved with session replication, session stickiness, and centralized session storage. 1. Session Replication Copy session data between servers. 2. Session stickiness directs user requests to the same server. 3. Centralized session storage uses independent servers such as Redis to store session data to ensure data sharing.

Explain the concept of session locking.Explain the concept of session locking.Apr 29, 2025 am 12:39 AM

Sessionlockingisatechniqueusedtoensureauser'ssessionremainsexclusivetooneuseratatime.Itiscrucialforpreventingdatacorruptionandsecuritybreachesinmulti-userapplications.Sessionlockingisimplementedusingserver-sidelockingmechanisms,suchasReentrantLockinJ

Are there any alternatives to PHP sessions?Are there any alternatives to PHP sessions?Apr 29, 2025 am 12:36 AM

Alternatives to PHP sessions include Cookies, Token-based Authentication, Database-based Sessions, and Redis/Memcached. 1.Cookies manage sessions by storing data on the client, which is simple but low in security. 2.Token-based Authentication uses tokens to verify users, which is highly secure but requires additional logic. 3.Database-basedSessions stores data in the database, which has good scalability but may affect performance. 4. Redis/Memcached uses distributed cache to improve performance and scalability, but requires additional matching

Define the term 'session hijacking' in the context of PHP.Define the term 'session hijacking' in the context of PHP.Apr 29, 2025 am 12:33 AM

Sessionhijacking refers to an attacker impersonating a user by obtaining the user's sessionID. Prevention methods include: 1) encrypting communication using HTTPS; 2) verifying the source of the sessionID; 3) using a secure sessionID generation algorithm; 4) regularly updating the sessionID.

What is the full form of PHP?What is the full form of PHP?Apr 28, 2025 pm 04:58 PM

The article discusses PHP, detailing its full form, main uses in web development, comparison with Python and Java, and its ease of learning for beginners.

How does PHP handle form data?How does PHP handle form data?Apr 28, 2025 pm 04:57 PM

PHP handles form data using $\_POST and $\_GET superglobals, with security ensured through validation, sanitization, and secure database interactions.

What is the difference between PHP and ASP.NET?What is the difference between PHP and ASP.NET?Apr 28, 2025 pm 04:56 PM

The article compares PHP and ASP.NET, focusing on their suitability for large-scale web applications, performance differences, and security features. Both are viable for large projects, but PHP is open-source and platform-independent, while ASP.NET,

Is PHP a case-sensitive language?Is PHP a case-sensitive language?Apr 28, 2025 pm 04:55 PM

PHP's case sensitivity varies: functions are insensitive, while variables and classes are sensitive. Best practices include consistent naming and using case-insensitive functions for comparisons.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor