Databases 6 min read

Designing Home Page Recommendation Tables: SQL Schemas Explained

This article details the database table structures used for managing various homepage recommendation features—including brand, new product, popular product, subject, and advertisement tables—providing full MySQL DDL statements, field descriptions, and visual examples of both admin and mobile interfaces.

macrozheng
macrozheng
macrozheng
Designing Home Page Recommendation Tables: SQL Schemas Explained

Related Table Structures

Home Brand Recommendation Table

Used to manage brand direct‑supply information displayed on the homepage.
<code>create table sms_home_brand (
   id bigint not null auto_increment,
   brand_id bigint comment 'Product brand id',
   brand_name varchar(64) comment 'Product brand name',
   recommend_status int(1) comment 'Recommend status: 0->not recommended;1->recommended',
   sort int comment 'Sort order',
   primary key (id)
);</code>

New Product Recommendation Table

Used to manage fresh product information displayed on the homepage.
<code>create table sms_home_new_product (
   id bigint not null auto_increment,
   product_id bigint comment 'Product id',
   product_name varchar(64) comment 'Product name',
   recommend_status int(1) comment 'Recommend status: 0->not recommended;1->recommended',
   sort int comment 'Sort order',
   primary key (id)
);</code>

Popular Product Recommendation Table

Used to manage popular recommendation information displayed on the homepage.
<code>create table sms_home_recommend_product (
   id bigint not null auto_increment,
   product_id bigint,
   product_name varchar(64),
   recommend_status int(1) comment 'Recommend status: 0->not recommended;1->recommended',
   sort int comment 'Sort order',
   primary key (id)
);</code>

Homepage Subject Recommendation Table

Used to manage curated subject information displayed on the homepage.
<code>create table sms_home_recommend_subject (
   id bigint not null auto_increment,
   subject_id bigint comment 'Subject id',
   subject_name varchar(64) comment 'Subject name',
   recommend_status int(1) comment 'Recommend status: 0->not recommended;1->recommended',
   sort int comment 'Sort order',
   primary key (id)
);</code>

Homepage Advertisement Table

Used to manage carousel advertisement information displayed on the homepage.
<code>create table sms_home_advertise (
   id bigint not null auto_increment,
   name varchar(100) comment 'Name',
   type int(1) comment 'Carousel position: 0->PC;1->App',
   pic varchar(500) comment 'Image URL',
   start_time datetime comment 'Start time',
   end_time datetime comment 'End time',
   status int(1) comment 'Online status: 0->offline;1->online',
   click_count int comment 'Click count',
   order_count int comment 'Order count',
   url varchar(500) comment 'Link URL',
   note varchar(500) comment 'Remark',
   sort int default 0 comment 'Sort order',
   primary key (id)
);</code>

Admin View

Admin view of brand recommendation list
Admin view of brand recommendation list
Admin view of brand selection
Admin view of brand selection
Admin view of new product list
Admin view of new product list
Admin view of product selection
Admin view of product selection
Admin view of popular recommendation list
Admin view of popular recommendation list
Admin view of product selection for popularity
Admin view of product selection for popularity
Admin view of subject recommendation list
Admin view of subject recommendation list
Admin view of subject selection
Admin view of subject selection
Admin view of advertisement list
Admin view of advertisement list
Admin view of advertisement editing
Admin view of advertisement editing

Mobile View

Mobile carousel advertisement
Mobile carousel advertisement
Mobile brand direct supply
Mobile brand direct supply
Mobile fresh products
Mobile fresh products
Mobile popular recommendations
Mobile popular recommendations
Mobile curated subjects
Mobile curated subjects
e-commerceSQLBackend DevelopmentMySQLdatabase designHome Page
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.