K
K
karmyskove2021-09-22 16:18:09
JavaScript
karmyskove, 2021-09-22 16:18:09

How to save a table in mongoDB?

Hello! In general, there is a hefty table with a bunch of parameters, how to save the table in mongoDB correctly?
There is one suggestion, but it causes a terrible rejection => create a field in the object for each table cell. The result is a hefty model, I hope there is a more concise solution)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2021-09-22
@karmyskove

One row or column (depending on what you have is a separate entry in the table), one entry in the collection.
Example

table

614b31206da0e045667046.jpeg

In this table, a row of one document
model will consist of keys: number, author, title, year, shelf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question