puhw-dev / UDP_communication

0 stars 0 forks source link

Data Base #10

Open mietek44 opened 10 years ago

mietek44 commented 10 years ago

As agreed with @dominik-sze ERD diagram of data base and sql code for table creation was provided. (Can be found in repository puhw-dev/Monitor in branch dev in dataBase folder (up to date) and also will in repository puhw-dev/doc in branch mnedza (for now - old invalid version) ).

mietek44 commented 10 years ago

Now there is a time to adjust data format in UDP_communication from sensors to monitor.

dominik-sze commented 10 years ago

I don't quite undersdant why you changed users table. There's no point of keeping user id and login if both of them are unique. Just remove UNIQUE keyword from owner column in sensor table.

mietek44 commented 10 years ago

OK changes provided. USERS without id. login is UNIQUE PRIMARY KEY in USERS but as reference in SENSOR is without UNIQUE attribute.

mietek44 commented 10 years ago

There is a problem with DB. We need to make some changes that allow us to use db concurrently, as described here (http://www.sqlite.org/lockingv3.html , http://www.sqlite.org/wal.html) When both servers are running (Monitor HTTP and Monitor UDP_connection) after a certain time dataBase becoms locked, and then it can be only read but no write operation can be performed.