The requirement is: Users should be able to define the structure of the document they want to store.
For example, a user can decide to store a bank statement with the following structure:
- post_date (date)
- particulars (text)
- debit (number)
- credit (number)
- value_date (date)
- reference (text)
then select a file to load into the database.
Another user or the same user can also load a different document with a different structure.
If we knew all the different structures of documents available, we can create all the tables in the database, but the system must be such a way that the user can load any type of document, and define its own structures.
I am looking for a way to save all the rows from the documents into a single table if possible. Or should I create dynamically a new table when the user define a new structure of document to load? Is this the best way?