Post image


I note my everyday actions on paper. Lately I started to work with React, and as a front end guy I’m not sure at all how should I approach my future database structure. For now I’m trying to convert my existing data into JSON file, and I wonder which path should I follow?

"date": "2020-01-01T12:00:00.000Z",
"action": [
"workout": true,
"alcohol": true,
"dev": true,
"meditation": true,
"cigarettes": true,
"biking": true

or maybe something like this would be more optimal?

"workout": ["2020-01-01T12:00:00.000Z", "2020-01-02T12:00:00.000Z", "2020-01-03T12:00:00.000Z"]

My backend skills are not that good – if someone could help me with picking the right direction, it would mean a lot to me. Maybe I’m missing something and my approach won’t really work on bigger scale, and I would love to know it before I’ll put a lot of my time into it.

Source link

Write A Comment