Final Project Report (1).docx

download Final Project Report (1).docx

of 20

Transcript of Final Project Report (1).docx

  • 8/11/2019 Final Project Report (1).docx

    1/20

    December 21, 2011 [DBS FINAL PROJECT]

    1 | P a g e

    HANOI UNIVERSITY

    Faculty of information Technology

    *******************************************************

    WINE SALES

    ONLINE SHOP

    Developer: Vu Trong The(leader)

    Nguyen Thai Phuong

    Nguyen Dac Thuy

    Bui Khanh Nam

    Class 4C-09

    Instructor: Luyen Thu Trang

  • 8/11/2019 Final Project Report (1).docx

    2/20

    December 21, 2011 [DBS FINAL PROJECT]

    2 | P a g e

    Table of ContentsIntroduction .................................................................................................................................................. 3

    Introduce the real-world application and the database solution that you will create with the project .. 3

    Project identification and selection .......................................................................................................... 3

    Body .............................................................................................................................................................. 4

    Planning .................................................................................................................................................... 4

    What did you do to plan the project? ................................................................................................... 4

    What questions were asked? ................................................................................................................ 4

    Analysis ..................................................................................................................................................... 4

    Requirements ........................................................................................................................................ 4

    Conceptual models ............................................................................................................................... 5

    Design ........................................................................................................................................................ 6Logical and physical designs.................................................................................................................. 6

    Forms and reports ................................................................................................................................. 9

    Development........................................................................................................................................... 12

    Implementation ...................................................................................................................................... 13

    The final product (run on localhost) ................................................................................................... 13

    Form .................................................................................................................................................... 14

    Report ................................................................................................................................................. 17

    Database Usage................................................................................................................................... 19

    Maintenance ........................................................................................................................................... 19

    Closing ......................................................................................................................................................... 20

    Summary ................................................................................................................................................. 20

    Difficulties/Challenges ............................................................................................................................ 20

    Appendices .................................................................................................................................................. 20

    Sample data ............................................................................................................................................ 20

  • 8/11/2019 Final Project Report (1).docx

    3/20

  • 8/11/2019 Final Project Report (1).docx

    4/20

    December 21, 2011 [DBS FINAL PROJECT]

    4 | P a g e

    Body

    Planning

    What did you do to plan the project?The main function of the shop is selling wines to user. Besides, therell be a section on the

    website that provides some highlighted articles related to wine, so that users can enjoy the news. Userscan browse by categories or use the search box to find their desired items. The shop will sort theproducts by n ame, brand name providing a numerous way for user to select the products.

    Because of the incompleteness of online payment in Vietnam, our shop will only accept thepayment via making direct contacts with users. In detail, the shop will use the information that usersprovide to them via the website to contact them using telephone or email to confirm the orders, usersthen transfer money to the shop and the shop will send the goods to them. This solution can be quiteuncomfortable for users: they will have t o make some complex steps to pay their bills (go to the bank,transfer their money to the shops account for example), but it is the most reliable way today. In thefuture, when the online payment in Vietnam is upgraded, the shop will provide the function that accepts

    the payment via credit card.What questions were asked?

    Where can we collect the source information about wine? What is the type of customer that we support? How can we store data? What function that we need to perform? How can customer order? How can we display information? Does customer need to login to see wine/s information? How do our website interface look? (simple or complex)

    Analysis

    Requirements

    1. Websites main functions: + User registration: This function helps customer to register an account to trade with theshop.+ Order fulfillment: After selecting goods, this function helps users to fulfill the order,which includes: name, address, phone number of the receiver and the payer, etc + Search function: This small but important function helps users to find and buy their

    favorite wine.+ Admins function: manage users, items, orders.

    2. Database: The database will contain the following basic tables:+ User - contains information about users: UserID, Name, Address, Number, Recipient'sEmail, Total number of bought items, Total money paid, Rank of member+ Item - contains information about items of the shop: - Item IDs, Name, Brand name,Origin, Year of Production, Quantity, Price, Alcohol

  • 8/11/2019 Final Project Report (1).docx

    5/20

  • 8/11/2019 Final Project Report (1).docx

    6/20

    December 21, 2011 [DBS FINAL PROJECT]

    6 | P a g e

    Design

    Logical and physical designs

    Logical Design:

    ERD:

  • 8/11/2019 Final Project Report (1).docx

    7/20

    December 21, 2011 [DBS FINAL PROJECT]

    7 | P a g e

    Figure. Entity-Relationship Diagram

    Relational Diagram:

    The Order table has a foreign key: user_ID which references to the ID attribute of User table.Although item_IDs of Order table holds the data of ID of Item table, it is not a foreign key. The reasonhere is: The data type of item_IDs is varchar, it contains the list of items IDs that user chose to buy( if anuser wants to buy two (or more) bottles of an item, the ID of that ID will be shown twice in theitem_IDs , so that we do not have to be confusing about the quantity of the items a PHP function canconvert from this list into the items with their quantity easily) while the data type of Items ID is int, sothat it cannot be the foreign key of ID. This reason is applied to Users bought_item_IDs.

    User

    PK ID

    user_name password name address phone_number email total_of_bought_money bought_item_IDs

    Order

    PK ID

    FK1 user_ID item_IDs time_of_order_placement recipient_name recipient_address recipient_phone_number

    Item

    PK ID

    name type brand_name year_of_production origin price quantity alcohol

    Figure. Relational Diagram

    Physical Design:

    Here are the physical designs of the 3 entities: Order, Item and User.

    Item

  • 8/11/2019 Final Project Report (1).docx

    8/20

    December 21, 2011 [DBS FINAL PROJECT]

    8 | P a g e

    Figure. Physical Design of Item

    Order

    Figure. Physical Design of Order

    - The recipient_name, recipient_address, recipient_phone_number fields can be null, when theyare empty, the system will understand that the order is for the user, so he is the recipient.

    User

    Figure. Physical Design of User

    - In this design, email is not null because we need to validate user s information when heregisters to our shop.

  • 8/11/2019 Final Project Report (1).docx

    9/20

    December 21, 2011 [DBS FINAL PROJECT]

    9 | P a g e

    - As we considered in the Project Draft, our shop will validate the order and inform to usersabout the payment via telephone, user must provide a phone number to us, that is the reason why thefield phone_number must not be null.

    Forms and reports

    Form:

    Here are some forms that we think they will be presented in our shop:

    - This form is for customer who wants to register an account to shop our wine.

    Figure. User Registration

  • 8/11/2019 Final Project Report (1).docx

    10/20

    December 21, 2011 [DBS FINAL PROJECT]

    10 | P a g e

    - This form is for login purpose:

    Figure. User Login

    - Below is the form that user has to fill when he wants to place an order. The Items field is a dropdown menu, its elements are the items that user has chosen during the shopping, when anelement is selected, the quantity field will show its quantity and user can change to the numberthat they desire to buy.

    Figure. Order Information

  • 8/11/2019 Final Project Report (1).docx

    11/20

    December 21, 2011 [DBS FINAL PROJECT]

    11 | P a g e

    - Here is the form for the shops assistants to input information about the wine that they sell(users cannot see this form)

    Figure. Item Information

    Report

    Below are the reports that will be shown when being requested. All of them have the sameformat:

    {Table Name} Details

    {Representative of Attribute} | {Value}

    - The first report is about user, it provides the main details about user. The rank field is auto-generated using the attribute total_paid_money , it is used to rank user, so that the shop can have somebonuses for those users who buy their items the most.

    User Details

    Name Vu Trong TheAddress Hanoi Vietnam

  • 8/11/2019 Final Project Report (1).docx

    12/20

    December 21, 2011 [DBS FINAL PROJECT]

    12 | P a g e

    Phone Number 0123456789Email [email protected] Rank Gold UserTotal Paid Money 1,000,000 $Bought Items - N p Ci Hoa Vng

    - ABC- XYZ

    - The second report is Item Details.

    Item Details

    Name ChivasType Red WineBrand Name ABCYear of Production 1333Origin HanoiPrice 1,000,000 $Quantity 10Alcohol 40%

    - The final one is for Order . It provides for both user and shop assistant information about theorder that user has placed.

    Order Details

    Order ID 1492User Vu Trong TheItems - Johny Walker Red Label

    - Vodka Hanoi- Nep Cai Hoa Vang

    Price 1,000,000 $Recipients Name Steve JobsRecipients Address HeavenRecipients Phone Number -123445xxxTime of Order Placement 1/1/2121

    Development

    Role of team members and Task order

    Week 2: Project Draft

    - Nguyn Thi Phng: Introduction - Nguyn c Thy: Analysis

    mailto:[email protected]:[email protected]:[email protected]
  • 8/11/2019 Final Project Report (1).docx

    13/20

    December 21, 2011 [DBS FINAL PROJECT]

    13 | P a g e

    - V Trng Th: Planning - Bi Khnh Nam: Conceptual Model

    Week 3: ERD Draft 1 Nguyn Thi Phng

    Week 4: Design and Development [Draft 1]

    - Nguyn Thi Phng: ER Diagram + Form - Nguyn c Thy: Physical Design - Bi Khnh Nam: Relational Model- V Trng Th: Report + Review

    Week 5-15: Implementation

    - V Trng Th + Nguyn c Thy: Program website- Nguyn Thi Phng+ Bi Khnh Nam: Design website interface + database

    Week 15: Submit the final product

    Implementation

    The final product (run on localhost)The final product currently runs on localhost because there are some problems prevent us from

    bringing the site to the Internet. However, with the help of XAMPP, we are able to run the site as if it isonline. Therefore, we can experience our work more clearly.

    Below is the final version of the database. As can be seen from the graph , its quite differentfrom the one that wed designed in the Design phase. In order to make a dynamic menu (which get thelist automatically), wed get two attributes: item_type & item_manufacturer and make new tables forthat purpose. In real-world action, this change does not affect the use of the item table and itsattributes. In addition, wed deleted two attributes: user_total_of_bought_money (because it is notnecessary in this version of the site) and user_bought_item_Ids (the order and order_line tables canhandle this data much more effectively).

    A new table: order_item can be seen as the relationship table between order table and item table. It holds the data about item_Id of all items that are in an order and their quantity.

  • 8/11/2019 Final Project Report (1).docx

    14/20

    December 21, 2011 [DBS FINAL PROJECT]

    14 | P a g e

    Figure. Physical Design

    The final version of WineShop has the following basic function:

    - User Registration/Login- New Item Insertion (for Admin only)- Browsing Items ( by Item Type or Item Manufacturer)

    - Order Placement- Viewing Order History

    FormHere are all the forms that are available in the online shop.

  • 8/11/2019 Final Project Report (1).docx

    15/20

    December 21, 2011 [DBS FINAL PROJECT]

    15 | P a g e

    Figure. User Login Form

    Figure. User Registration Form

  • 8/11/2019 Final Project Report (1).docx

    16/20

    December 21, 2011 [DBS FINAL PROJECT]

    16 | P a g e

    Figure. Cart Details

    Figure. Order Placement

  • 8/11/2019 Final Project Report (1).docx

    17/20

    December 21, 2011 [DBS FINAL PROJECT]

    17 | P a g e

    Figure. Add Item Form

    ReportHere are all the reports that are generated automatically (with the data in the database) in the

    online shop. Depending on the data, some report may vary a little bit but the overall forms are showedbelow.

    Figure. User Details

  • 8/11/2019 Final Project Report (1).docx

    18/20

    December 21, 2011 [DBS FINAL PROJECT]

    18 | P a g e

    Figure. Item Details

    Figure. List of Order

  • 8/11/2019 Final Project Report (1).docx

    19/20

    December 21, 2011 [DBS FINAL PROJECT]

    19 | P a g e

    Figure. Order Details

    Database UsageThe database of WineShop is used by both the shops administrator and its users. For example:

    users retrieve their user details or orders details from the database, admin insert new item record to thedatabase. All these action are done via the webs interface (the site can be seen as a bridge to connectuser to the database).

    Maintenan c eThe website is currently quite simple, although it has the essential functions. I t doesnt provide

    enough tools for user to exploit the data more effectively. Moreover, the site has never been run in real-world environment, so that it can produce unknown errors. Therefore, in the future, we need to developthe site more to complete it and satisfy our customers the most.

    Some recommendation for maintenance and improvement:

    -

    User Management function for Admin and User- Online payment for the shop- Rating products function- Re-designed interface

  • 8/11/2019 Final Project Report (1).docx

    20/20

    December 21, 2011 [DBS FINAL PROJECT]

    20 | P a g e

    Closing

    SummaryIn summary, this project helps us in developing website/software very much. From all the

    experiences that we get, we can determine the requirements; design the database/website more

    suitable to the requirement and the ability of us.

    The database solution meets exactly the requirements. It assists the sites administrator inorganizing all forms of information such as: user, item and order with the flexibility to adjust as he needsto change.

    Difficulties/Challenges- The limited ability of members prevents us from producing our desired website ( that we has

    designed from the first stages)- New knowledge about programming, designing website requires self-study.

    -

    The difficulties in scheduling and assigning the team s members (because of the differencesamong memb ers abilities).

    Does the database solution meet the requirements?As you can see in our database solution, every task and function that is created also support for therequirement and make it become the goal that we want to archive. The Register button which is use foruser registration function, add to cart used for processing order and browse by type and manufacturerwhich is for search. Moreover, the database contain all data for store information of user, order anditem (wine), all of these will be processed for making order and validate user when login our website.

    Appendices

    Sample data

    The sample data of the products is retrieved from http://www.ruouvaqua.com website.

    http://www.ruouvaqua.com/http://www.ruouvaqua.com/http://www.ruouvaqua.com/http://www.ruouvaqua.com/