-
Notifications
You must be signed in to change notification settings - Fork 4
Database Design
Wenlin Mao edited this page Oct 18, 2018
·
16 revisions
All collection name, fields name follows naming format: All lower-case, separate words using _.
{
"user_id": {
"username": "<USER NAME: length 4-20 string with only a-z, A-Z, 0-9, ~!@#$%^&*-=>",
"password": "",
"contact_forms":"<contact_form_id>",
"email": "<USER EMAIL>",
"phone_number": "<USER PHONE>",
"products_for_sale": "<product_id>",
"liked_products":"<product_id>",
"buying_offers":"<product_id>",
}
}
{
"product_id": {
"product_name": "< string with only a-z, A-Z, 0-9, ~!@#$%^&*-=>",
"category" : "<category_id>",
"images" : " ",
"Is_delivery_included": "<True or False>",
"Price": "int",
"location": " ",
"seller": "<user_id>",
"buyers": "<user_id>",
}
}
{
"category_id": {
"category_name": "< string with only a-z, A-Z, 0-9, ~!@#$%^&*-=>",
}
}
{
"contact_form_id": {
"seller": "<user_id>",
"product": "<product_id>",
"email": "<USE REMAIL>",
"phone_number": "<USER PHONE>",
}
}
Example refer to http://ieng6.ucsd.edu/~cs110x///static/res/AugcastDatabaseSchemaModelv2.pdf