V
V
Viktor Yanyshev2016-12-03 11:33:46
PHP
Viktor Yanyshev, 2016-12-03 11:33:46

The structure of the database for the time sheet, how to store records of hours of work?

Tell me how to correctly organize the database structure (SQLite) to store records of the number of hours worked by an employee on a particular day, including vacation, sick leave, business trip, etc.
Now there is only 1 sign with all the employees.
id,name,lastname,department
Понятно что нужна 1 таблица где будут храниться эти записи, то что 1 строка = 1 сотрудник. Но насколько правильно хранить в одной записи весь месяц сотрудника (json), или верным будет хранить:
Year,month,day,id_worker,hour,status
И так 1 запить = месяц, день, сотрудник, часов работы, статус.
Помогите дельным советом :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mletov, 2016-12-03
@mletov

year,month,day,id_worker,hour,status

Better this way
id_worker, date, cnt_hours, status
Any such non-standard solutions such as json in one field, mongo, etc. for VERY large amounts of data.
For an average project, it is much more important that 1-2 sql queries can pull out the necessary data.

D
Dimonchik, 2017-03-30
@dimonchik2013

everything is here https://tech.yandex.ru/maps/

I
ivleva_m, 2017-04-10
@ivleva_m

You can even not write it yourself, but install the plugin using the same link https://tech.yandex.ru/maps/jsapi/#plugins

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question