Skip to content

Commit 19a9a65

Browse files
committed
Added column and table descriptions for E-commerce dataset
1 parent d2cc977 commit 19a9a65

File tree

10 files changed

+63
-63
lines changed

10 files changed

+63
-63
lines changed

src/config/databases/ecommerce/tables/carts.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"name": "carts",
3-
"description": "",
3+
"description": "This table contains all carts (purchased or not) that were ever assembled by users.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a cart.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "user_id",
14-
"description": "",
14+
"description": "ID of a user who assemled a cart.",
1515
"type": "bigint"
1616
},
1717
{
1818
"name": "created_at",
19-
"description": "",
19+
"description": "When a cart was created (when a user added the first item to a cart).",
2020
"type": "timestamp"
2121
}
2222
]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"name": "carts_items",
3-
"description": "",
3+
"description": "This is a join table that enables many-to-many relation between carts and items.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "item_id",
8-
"description": "",
8+
"description": "ID of an item that was added to a cart.",
99
"type": "bigint"
1010
},
1111
{
1212
"name": "cart_id",
13-
"description": "",
13+
"description": "Cart's ID.",
1414
"type": "bigint"
1515
},
1616
{
1717
"name": "created_at",
18-
"description": "",
18+
"description": "When an item was added to a cart.",
1919
"type": "timestamp"
2020
},
2121
{
2222
"name": "quantity",
23-
"description": "",
23+
"description": "How many identical items are in a cart.",
2424
"type": "integer"
2525
}
2626
]
27-
}
27+
}

src/config/databases/ecommerce/tables/categories.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"name": "categories",
3-
"description": "",
3+
"description": "This table contains item categories. Note that cateories are nested and a category could have multiple children categories.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of an item category.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "name",
14-
"description": "",
14+
"description": "Category name, like \"Sport shoes\".",
1515
"type": "text"
1616
},
1717
{
1818
"name": "parent_id",
19-
"description": "",
19+
"description": "ID of a parent category. Yep, categories have nested structure. For example, \"books\" category have \"fiction\" and \"non-fiction\" categories. \"Fiction\" category has categories like \"History\", \"Detective\", etc.",
2020
"type": "bigint"
2121
},
2222
{
2323
"name": "created_at",
24-
"description": "",
24+
"description": "When a category was added.",
2525
"type": "timestamp"
2626
}
2727
]

src/config/databases/ecommerce/tables/discount_codes.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
22
"name": "discount_codes",
3-
"description": "",
3+
"description": "Thsi table contains all discount codes that could be redeemed by a user when making a purchase. Note that discount codes could save a fixed amount or a percentage of the final price.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a discount code.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "amount_off",
14-
"description": "",
14+
"description": "Amount in USD that will be subtracted from a total cart's price if a user redeems this discount code.",
1515
"type": "bigint"
1616
},
1717
{
1818
"name": "percent_off",
19-
"description": "",
19+
"description": "Percentage of a total cart's price that will be removed if a user redeems this discount code.",
2020
"type": "bigint"
2121
},
2222
{
2323
"name": "code",
24-
"description": "",
24+
"description": "Unique code of a discount code. Codes are shared with customers, not ID-s :warning:.",
2525
"type": "text"
2626
},
2727
{
2828
"name": "created_at",
29-
"description": "",
29+
"description": "When discount code was created.",
3030
"type": "timestamp"
3131
},
3232
{
3333
"name": "valid_until",
34-
"description": "",
34+
"description": "The latest timestamp when customers are able to redeem a discount code.",
3535
"type": "timestamp"
3636
}
3737
]

src/config/databases/ecommerce/tables/items.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
22
"name": "items",
3-
"description": "",
3+
"description": "This table contains all items that could be purchased by users. Note that only published items are available to website visitors (have value in the `published_at` column).",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of an item.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "name",
14-
"description": "",
14+
"description": "Item's name.",
1515
"type": "text"
1616
},
1717
{
1818
"name": "category_id",
19-
"description": "",
19+
"description": "ID of item's category.",
2020
"type": "bigint"
2121
},
2222
{
2323
"name": "vendor_id",
24-
"description": "",
24+
"description": "ID of a vendor who produces or sells this item in our E-commerce store.",
2525
"type": "bigint"
2626
},
2727
{
2828
"name": "price_usd",
29-
"description": "",
29+
"description": "Item's price in USD.",
3030
"type": "numeric"
3131
},
3232
{
3333
"name": "created_at",
34-
"description": "",
34+
"description": "Timestamp when an item was first added to our E-commerce store.",
3535
"type": "timestamp"
3636
},
3737
{
3838
"name": "published_at",
39-
"description": "",
39+
"description": "Timestamp when an item was first available for purchasing.",
4040
"type": "timestamp"
4141
}
4242
]

src/config/databases/ecommerce/tables/purchases.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
22
"name": "purchases",
3-
"description": "",
3+
"description": "This table contains all cart purchases.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a return.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "discount_code",
14-
"description": "",
14+
"description": "Discount code that was used by a user. It's a foreign key for the `discount_codes` table.",
1515
"type": "text"
1616
},
1717
{
1818
"name": "country",
19-
"description": "",
19+
"description": "Country of a user who made a purchase (IP based).",
2020
"type": "text"
2121
},
2222
{
2323
"name": "city",
24-
"description": "",
24+
"description": "City of a user who made a purchase (IP based).",
2525
"type": "text"
2626
},
2727
{
2828
"name": "payment_method",
29-
"description": "",
29+
"description": "Payment method that was used for a purchase. Could be **cc** (credit card) or **paypal**.",
3030
"type": "text"
3131
},
3232
{
3333
"name": "created_at",
34-
"description": "",
34+
"description": "Timestamp of a purchase.",
3535
"type": "timestamp"
3636
},
3737
{
3838
"name": "cart_id",
39-
"description": "",
39+
"description": "ID of a cart that was purchased.",
4040
"type": "bigint"
4141
}
4242
]

src/config/databases/ecommerce/tables/returns.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
22
"name": "returns",
3-
"description": "",
3+
"description": "This table contains all returns (full carts or partial item returns).",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a return.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "cart_id",
14-
"description": "",
14+
"description": "ID of a cart that a retuned item belongs to. In our E-commerce store users add items to a cart, then purchase the whole cart. Users are allowed to return as many items from a purchased cart as they want.",
1515
"type": "bigint"
1616
},
1717
{
1818
"name": "item_id",
19-
"description": "",
19+
"description": "ID of an item that was returned.",
2020
"type": "bigint"
2121
},
2222
{
2323
"name": "quantity",
24-
"description": "",
24+
"description": "How many items were returned.",
2525
"type": "integer"
2626
},
2727
{
2828
"name": "created_at",
29-
"description": "",
29+
"description": "Timestamp when a return was processed.",
3030
"type": "timestamp"
3131
}
3232
]

src/config/databases/ecommerce/tables/reviews.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
22
"name": "reviews",
3-
"description": "",
3+
"description": "This table contains all user reviews for individual items.",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a review.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "item_id",
14-
"description": "",
14+
"description": "ID of an item that was reviewed.",
1515
"type": "bigint"
1616
},
1717
{
1818
"name": "user_id",
19-
"description": "",
19+
"description": "ID of a user who left a review.",
2020
"type": "bigint"
2121
},
2222
{
2323
"name": "rating",
24-
"description": "",
24+
"description": "Star rating that a user selected in a review form.",
2525
"type": "integer"
2626
},
2727
{
2828
"name": "created_at",
29-
"description": "",
29+
"description": "Timestamp when a user left a review.",
3030
"type": "timestamp"
3131
},
3232
{
3333
"name": "feedback",
34-
"description": "",
34+
"description": "Text feedback that a user types in a review form.",
3535
"type": "text"
3636
}
3737
]

src/config/databases/ecommerce/tables/users.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
22
"name": "users",
3-
"description": "",
3+
"description": "This table contains all user records (accounts).",
44
"schemaColor": "#91C4F2",
55
"columns": [
66
{
77
"name": "id",
88
"key": true,
9-
"description": "",
9+
"description": "Unique identifier of a user.",
1010
"type": "bigint"
1111
},
1212
{
1313
"name": "email",
14-
"description": "",
14+
"description": "User's email.",
1515
"type": "text"
1616
},
1717
{
1818
"name": "first_name",
19-
"description": "",
19+
"description": "User's first name.",
2020
"type": "text"
2121
},
2222
{
2323
"name": "last_name",
24-
"description": "",
24+
"description": "User's last name.",
2525
"type": "text"
2626
},
2727
{
2828
"name": "country",
29-
"description": "",
29+
"description": "User's country (IP based).",
3030
"type": "text"
3131
},
3232
{
3333
"name": "city",
34-
"description": "",
34+
"description": "User's city (IP based).",
3535
"type": "text"
3636
},
3737
{
3838
"name": "created_at",
39-
"description": "",
39+
"description": "Timestamp when a user created an account.",
4040
"type": "timestamp"
4141
}
4242
]

0 commit comments

Comments
 (0)