Fruit Project-1th-ideas > Requirements--Design of database design

Source: Internet
Author: User

Lazy, lazy man, I am a lazy man.

Lazy people want to do something, always procrastinate, slow to start.

Long long ago, want to do their own products, but there is no one belongs to their own products.

Two years ago, finally think well, to do an online selling fruit system, mobile phone on the point, the fruit sent home.

Cavity blood, but difficult! The three major challenges are as follows:

1, product supply problem?

2, distribution problems?

3, warehousing problems?

Stuck, a fart, not so much capital, can do such a project?

It's impossible, there is no local tyrants friends, no one invests.

Technology for a long time, the network seems very simple, no one around the ability to invest.

Two years passed quickly, and of course the lazy man did nothing.

Ok, today began to think about entrepreneurship issues.

Maybe it's iq,eq,qq. are very low, did not think of any good project, but also think of selling fruit online.

Well, then sell the fruit online.

Fortunately, now the mood is better than two years ago, now seems to yield to the fate of the appearance, the way of life, not afraid of blows, the white hair from the beginning can be seen to this point.

Although the three major problems of two years ago are still there, but now feel, be okay.

So first put the system to say! With the system, maybe there is investment, there is investment, the mountains can be moved, is not it ...

What does the system do? Do it slowly, of course, because people are lazy.

Lazy people, like simple, do not move the brain. So the system is simple and good.

First, the product few but good. Too many products will dazzle the user, the quality of some good products on the line, which may be too lazy idea. So the size of the system is very small. At least there are few product table data in the database.

Second, only cash on delivery is supported. So the online payment is not done.

In this way, the system function is simple.

Background function (add and revise):

1. User Management

2. Order Management

3. Product Management

Client Features:

User registration, login, search fruit, place orders, order inquiries, share product information.

OK, now it seems that the system has three elements: users, products, orders.

1, the user sign in with the mobile phone number. The user provides the home address as the default shipping address. User key information is the phone number and address.

2, product few but good. To have high-quality pictures and text introduction. Including the origin, nutrition, whether the season, suitable for the crowd, eating, how to choose and other information. Of course, information can be constantly perfected.

3, the user orders, the background response to delivery, customer receipt confirmation, order completion. User dissatisfaction can be returned on the spot rejection, the user confirmed the order rejection. The user can cancel the order before delivery. In this way, the order has several statuses: the shipment has not been delivered and the returned goods have been canceled.

Well, it looks like you can do database design. 5 Tables: User information, product information, order information, order contains products, regions

1. User information (user mobile number, receipt address, creation time, modification time, Status field)

2, Product information (number, name, price, area number, picture, nutrition, whether to season, how to eat, how to choose, other text description, creation time, modification time, Status field, extension field, or so on)

3. Order information (number, user account, delivery address, contact phone, total amount, status field, creation time, modification time)

4, the order contains the product (number, order number, product number, purchase quantity, Unit price)

5. Region (number, name)

The relationship is simple, the user contains multiple orders, and the order contains multiple products. One-to-many relationships.

Well, it seems that even object-oriented design can be done. The user is a class. Product (Fruit) is a class. An order is a class. Order Goods (Orderfruit) is a class

The field is the data, the behavior is the method, and the method processes the data. So you want to design fields and methods for your class.

1. User

Contains fields (Id, Address, state, Createtime, UpdateTime)

Include Method (Add,delete,update,find)

2, Fruit

Contains fields (Id, name, Price, City, Imageurls,nutrient,isseason,eattips,selecttips,description,state,createtime, UpdateTime , extendfield1,extendfield2)

Include Method (Add,delete,update,find)

3. Order

Contains fields (Id, UserId, Orderfruits,address,phone,totalprice,state, Createtime, UpdateTime)

Include Method (Add,cancel,update,find,deliver,receiptconfirm,returnconfirm)

4, Orderfruit

Include field (Id, Orderid,fruitid,count,price)

Include Method (Add,delete,update,find)

OK, get here today.

A lazy stretch.

Fruit Project-1th-ideas > Requirements--Design of database design

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.