review

Description

Customer review of a product.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.id)
id INTEGER Identifier.
product_id INTEGER NOT NULL Product ID. (product.id)
account_id INTEGER NOT NULL Account ID who wrote the review. (account.mail)
rating INTEGER NOT NULL Rating for the product. 5 levels. 1(Lowest) - 5(Highest).
title TEXT NOT NULL Title.
comment TEXT NOT NULL Comment content.
agreed INTEGER NOT NULL Number of people who agrees with the review.
disagreed INTEGER NOT NULL Number of people who disagrees with the review.
posted DATE NOT NULL Posted date.

Related tables

Query

CREATE TABLE review(
shop        TEXT,
id          INTEGER,
product_id  INTEGER   NOT NULL,
account_id  INTEGER   NOT NULL,
rating      INTEGER   NOT NULL,
title       TEXT      NOT NULL,
comment     TEXT      NOT NULL,
agreed      INTEGER   NOT NULL,
disagreed   INTEGER   NOT NULL,
posted      DATE      NOT NULL,
PRIMARY KEY(shop, id));