At work, we supply files for other services. Size of them are between 5mo and 500mo. We want to use Json instead of XML, but i m wondering how our customers could upload those files in an easy way in their database, Oracle or Mysql. I mean, i can t find on the web APi or functions or tools, in Mysql or oracle, to do that. I know that it s easy to work data by data to load a small Json file, decode each object or array and put them at the right place in database. But is there an other way to do this, like sqlloader in Oracle ? And if so, size of our file aren t they too big to produce JSON file, in JAVA for example ? I guess it might be difficult to do this load job automatically, especially because of arrays like this :
{"employees":[
{"firstName":"John", "lastName":"Doe", "salaryHistory":[1000,2000,3000]},
{"firstName":"Anna", "lastName":"Smith", "salaryHistory":[500,800]},
{"firstName":"Peter", "lastName":"Jones", "salaryHistory":[400]}
]}
where salaryHistory must produce problems because their sizes are different, and data are not madatoryly in the same table. Any ideas or help would be welcomed !
Edit
i m looking for a solution to put each data in the good column of a table, i don t need to store a Json structure in a single column of simple table.
like this : table employees : column are id, FirstName, lastName and table salaryHistory : column are id, order, salary
and each data must go in the good column like "John" in firstname, "Doe" in lastname, then "1000" in a new row of table salaryHistory , "2000" in another new row of salaryHistory and so on.