As an exercise in learning, I'm creating a bugs/issues tracking and "aggregator" web application. A simple app consisting of products, issues, reviews and links related to it. The links will be urls pointing to issues/reviews already created on external sites (bugzillas, stackoverflow, etc). Here is my initial effort towards creating the database schema of the app:
CREATE TABLE PRODUCT (
ID INTEGER PRIMARY KEY,
NAME VARCHAR(255), --Samsung Galaxy, Apple iphone, Dell Inspiron, GNOME Desktop, etc.
VERSION VARCHAR(255), --S5, v3.14, etc.
IMAGE VARCHAR(255), --PATH TO UPLOADED IMAGE FILE
CATEGORIES VARCHAR(255),
TAGS VARCHAR(255),
CREATOR VARCHAR(255) --EMAIL ADDRESS OF PRODUCT UPLOADER
);
CREATE TABLE REVIEWS (
ID INTEGER PRIMARY KEY,
PRODUCT_ID INTEGER,
CREATOR VARCHAR(255), --EMAIL ADD. OF REVIEWER
);
CREATE TABLE ISSUES(
ID INTEGER PRIMARY KEY,
PRODUCT_ID INTE GER,
CREATOR VARCHAR(255), --EMAIL ADDRESS
DESCN VARCHAR(255), --DESCRIPTION
LINKS VARCHAR(255)
);
CREATE TABLE LINKS(
ID INTEGER PRIMARY KEY,
PRODUCT_ID INTEGER,
LINK_TYPE VARCHAR(255), --ISSUE OR REVIEW OR OTHER (STACKOVERFLOW/REDDIT/HN CONTENT)
DESCN VARCHAR(255), --A SHORT PREVIEW OF LINKED CONTENT
URL VARCHAR(255),
LAST_UPDATED DATETIME, --CRAWLER TIMESTAMP
);
CREATE TABLE LINK_VOTES(
ID INTEGER PRIMARY KEY,
LINK_ID INTEGER,
VOTER VARCHAR(255), --EMAIL ADD. OF THE VOTER
VOTE INTEGER, --1==UP, 0==DOWN
);
Appreciate if you can provide me suggestions, improvements, etc.
mysql
. \$\endgroup\$