Hi everyone,
I’m currently creating an data synchronisation between an ODBC connection with an SQL Server 2014 behind it. If there are any changes in the database on specific tables, I want to create and modify documents in the couchbase database.
The data is unstructured and I want to restructure the data. In the SQL database the relationships between the tables are not very handy for Couchbase. Now I want to know what the best option for this is to update everything realtime with Couchbase. I cannot modify the current SQL server database structure.
An SQL server table example:
Address > Address id
> country id
> Street
> Street number
Country > country id
> country name
Then you can get the country by requesting the country from country table.
I at first thought this would be the best option without using N1QL:
- Unstructured data from SQL server
- Structure data using queries when changes are in SQL server db
- Send structured data to Couchbase
- create/update views
It’s unclear on how N1QL works. I was thinking the following way:
- Unstructured data from SQL server
- Send unstructured tables to Couchbase as documents
- Structure data by using N1QL and storing it as documents (Or as views?)
- create/update views according to structured data generated by N1QL
What is the most ‘Couchbase’ way of doing this? Must I trigger certain queries when changes are made?
Thanks in advance