(Before that, I apologize for my poor English) I have such examples:
I am currently having problems with my web application. I made a web application for a specific company. I made an application using CodeIgniter 3.
I built a database using Maria DB. For the identifier in each table, I use Auto-increment id for my application database for each table. I usually use a web application for a cloud server (sometimes the company has its own dedicated server, but sometimes not). Once there is a company in which they do not want to deploy the application that I made before in the cloud (for the security reasons they said).
This company wanted to deploy the application on a personal computer in person at the office, while the computer for each employee was not connected to each other (for example, a stand-alone PC / personal computer / laptop for employees). They said that every 5 months they collected all the data from the employee’s personal computer to the company’s data center, and, of course, the data center was not connected to the Internet. I told them that is not the best way to store my data. (because the data will be repeated when I try to combine all the data into one, since my column id for each table is in the auto increment id, and this is the primary key ). Unfortunately, the company still wants to save the application this way, and I don’t know how to solve it.
They have at least 10 employees who would use this web application. According to this, I have to deploy the application to PC 10 personally.
Additional information: each employee has a unique identifier that they received from the company, and I made an auto_increment identifier for each employee, as in the table below:
id | employee_id | employee_name | 1 | 156901010 | emp1 2 | 156901039 | emp2 3 | 156901019 | emp3 4 | 156901015 | emp4 5 | 156901009 | emp5 6 | 156901038 | emp6
The problem is that whenever they fill out a form from this application, some of the tables do not store the employee identifier, but a new identifier that comes from the increment identifier.
For example, electronic_parts . They have an attribute as shown below:
| id | electronic_part_name | kind_of_electronic_part_id |
if emp1 fill out a form from a web application, the contents of the table will look below.
| id | electronic_part_name | kind_of_electronic_part_id | | 1 | switch | 1 |
and if emp2 fill out a form from a web application, the contents of the table will look below.
| id | electronic_part_name | kind_of_electronic_part_id | | 1 | duct tape | 10 |
When I tried to merge the contents of the table into a data center, it would fall apart because the duplicate id.
It gets worse when I think of my foreign key in other tables. For example, customer_order table.
The table for the customer_order column is as follows (just a sample, not an actual table, but similar).
|id | customer_name | electronic_parts_id | cashier(aka employee_id, the increment id one, not the id that employee got from a company as i described above ) | | 1 | Henry | 1 | 10 | | 2 | Julie | 2 | 9 |
Does anyone know how to solve this problem? or can someone suggest / recommend me a good way to solve this?
NOTE. Each employee has his own database for his application, so the database is not centralized, it is an autonomous database, which means that I have to install the database on the employee’s PC one by one.