I search a db schema to store the process tree of linux every half hour.
Platform: PostgreSQL on Linux.
I am unsure where to split all the data into columns or to use a json column.
Which one is better, and why?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
The design should be according to your requirements. If your requirement includes to store only some columnar data that are mostly required (mostly not null) then use tables with relations (foreign keys). If you just need some logging with situational tree structure data then use JSONB. For example, suppose that you store io_counters when counters are higher than some point, then use JSON. I presuppose you use minimum postgresql 9-4.