FineBI practical project one (2): case structure description and data preparation

1 System architecture

  • Building a data warehouse based on MySQL
  • Data processing based on Kettle
  • Fanruan FineBI conducts data analysis based on the data warehouse built by MySQL.

2 Data flow chart

  1. Extract data from the MySQL business system database through Kettle, and then load it into the MySQL data warehouse.
  2. Write SQL scripts to perform data analysis (grouping, aggregation, etc.) on the data in the MySQL data warehouse, and save the analyzed results.
  3. Use FineBI to display the saved analysis results graphically.

3 Create finebi_shop database and import data

In order to complete this case, we need to prepare the finebi_shop database in advance. We have prepared a SQL script file [finebi_shop_v1.2.sql], which contains a lot of SQL statements. These SQL statements will automatically create databases and tables, and will Data is inserted into the table. The amount of data is large, so it is recommended to use the source command to execute the script.

Table structure overview:

Table Name

illustrate

finebi_areas

Administrative region table, for example: Beijing City, Changping District, etc.

finebi_goods

The product table stores basic information about the product. For example: the unique identification of the product, the name of the product, the store ID, the classification of the product, etc.

finebi_goods_cats

Product classification table, each product has its own classification. For example: a Haier refrigerator belongs to the category: Household Appliances > Large Appliances > Refrigerators.

finebi_orders

Order table, where orders submitted by users will be saved. The table includes: the user who placed the order, the status of the order, the payment amount of the order, the region to which the order belongs, the address of the user, etc.

finebi_order_goods

The order details table contains the product information included in the order. Users can buy multiple items at the same time and then submit an order. For example: the submitted order contains a mobile phone and a refrigerator. The order details include the product data and order information purchased by the user. For example: what is the order corresponding to the order details, how many such products have been purchased, what is the ID of the product, etc.

finebi_users

The user information table contains the user's ID, user name, password and other information.

4 Create finebi_shop_bi data warehouse

create database if not exists finebi_shop_bi DEFAULT CHARACTER SET utf8;

hint:

if not exists means that the database will be created only if the database does not exist. If the database already exists, it will not be created.

Guess you like

Origin blog.csdn.net/u013938578/article/details/135428087