How to Design Database to Save Words Uploaded by Users

  mongodb, question

Users upload words through web pages to limit the total number of words uploaded by each user and the space occupied by all words. words do not repeat. how to design a database to store the words uploaded by each user to ensure that the total number of words or the space occupied by all words reach the upper limit will fail to upload

You can create two tables, one customer tableCustomerA word listWord
First of all,CustomerTable:

(Customer Id) (Name) (Number of Times)
 CustomerId             Name         Num
 One, three, two
 Li si 5
 3 Wang Wu 8

Then there isWordTable:

(Word Id) (Associated Customer Id) (Word Size)
 WordId            CustomerId          Size
 1                   3                5
 2                   1                9
 3                   2                10