How to send server data to oracle db? - html

I created a html form,fetched data from user and sent to node js server.How to insert that data into oracle db?I am able to come across a lot of syntax examples for mongo amd mysql but unable to get one for oracle.

Use the node-oracledb module. There is documentation and examples available.

Related

Building dynamic data table with nodeJS backend for mysql database

I would like to build a data table that provides features like searching, filtering, free text search and so on (if anyone has more idea please share to create modern data table). My backend has to be in NodeJS and Front end could be simple html, css. If I need to create any middleware to make the data load faster, how will that be? Any suggestion regarding this will be very much apppreciated.
P.S: I have a mysql database.
Building a dynamic data table with a Node.js backend for a MySQL database can be a challenge, but there are a few libraries that can help you get the job done.
One library that can be used is the mysqljs/mysql library. This library provides a Node.js interface for MySQL databases. It can be used to create a connection to a MySQL database, run queries, and close the connection when finished.
Another library that can be used is the node-mysql2/promise library. This library provides a Node.js interface for MySQL databases with promise support. It can be used to create a connection to a MySQL database, run queries, and close the connection when finished.
Finally, the sequelize library can be used. This library provides an easy-to-use interface for interacting with MySQL databases. It can be used to create a connection to a MySQL database, define models, and run queries.
All of these libraries can be used to build a dynamic data table with a Node.js backend for a MySQL database.

Connecting a database with Thingsboard

Will you Please help me in one more important thing??? I need to store dashboard's data in a database.. according to my study thingsboard supports 3 database at the moment. NoSQL, Mysql and Hybrid (Psql+cassandra) so i have researched a lot but could not find any way to send my telemetry data to any database. I know it is possible because the thingsboard doc itself say so... but how do i do that?? I checked Psql database thingsboard that i created during installation but there are those relations are present that was made by default. i need to store my project's data in databases just like in AWS we store IoT core's data in Dynamo DB or in IoT analytics. Thingsboard do not provide any node related to DB in his rule engine?? so How do i make a rule chain to transfer my projects data in any Database server. i have installed pgadmin4 to Graphically see the database but nothing useful found. Documentation and stakoverflow geeks said that configuring Thingsboard.yml file located in monolithic installation on linux (/etc/thingsboard/conf/thingsboard.conf ) in this path it have cassandra,mysql,postgres configuration but how to properly configure it??? i tried to access the default database of postgres named thingsboard that i created on installing time but when i list the content of database it only shows the default things/relations of thingsboard if i create a device on thingsboard that is not showing in database why?? I really can use your help. Please enlighten me a way to connect my THINGSBOARD with a DATABASE.
see in my attached images there are everything default, nothing that i create on thingsboard.
enter image description here
That's wrong, ThingsBoard currently supports 3 database setups: Postgres only, Hybrid Postgres + Cassandra (only telemetries) & Postgres + Timescale. So there is no MySQL database used anywhere.
https://thingsboard.io/docs/user-guide/install/ubuntu/#step-3-configure-thingsboard-database
Find guides for connecting your devices to Thingsboard here, e.g. via MQTT:
https://thingsboard.io/docs/reference/mqtt-api/
If you would like to forward the stored telemetries of ThingsBoard to different databases, this is not possible directly with rulechains (there's only one node to store data in a cassandra table)
One way to achieve this, would be fetching the data with an external microservice/program via HTTP API and persisting the data in the database of your choice. You could use a python script for example.
https://thingsboard.io/docs/reference/rest-api/
Alternatively, you can send the data to a Message queue like Kafka instead of fetching via HTTP API. But still it would require additional tools for storing the data in external databases outside ThingsBoard.

Is there a way to connect Angular to node server?

I'm learning Angular (not angularjs) and what I'm trying to do is have a form and store the data entered to sql database and also query some data from database.
I have looked around and I've not encountered a solution for this. I have seen where people connect using http service to get json data. But how do we do it for sql database.
Does angular even have modules that can connect to a server???
Or should I be looking into noSQL database instead of SQL database.
Please help...

Write Breezejs data source provider with Nodejs for MySQL

I would like to use Breeze with NodeJS and MySQL. Unfortunately, so far I could find no examples of this. I have seen that there is an example of NodeJS + MongoDB. Now I try to analyze the MongoDB provider (mongoSaveHandler.js - [npm install breeze-mongodb]?) to write my own provider for MySQL. Unfortunately I could not find any documentation on how such a provider must be established.
The provider should be able to deal with complex data and navigation properties (one-to-many, etc.) and also save/delete/update them properly in the MySQL database.
The following is an example of how the database structure might look like:
Database Image
My questions are now:
Is there already an example with Breeze (+NodeJS) and MySQL that I could use?
Is there a documentation/sample how to write a own data source provider?
If I'm on my own, what should I look for when I create my provider?
There are plenty of Web API+EF+SQL samples, the Node+MongoDB sample you've already seen, a Ruby+SQL sample, and even a NoDB (and 3rd party data) sample ... but no Node+SQL sample yet.
These docs aren't spot on for your use case, but they will likely point you in the right direction:
ToDo Server
The docs are for Web API+EF+SQL, but good detail on how everything is wired together.
MongoDB
The MongoDB docs as well as the Zza! sample are pretty good about showing how they configured the Node server (to talk with MongoDB, sure, but you can see the process all the same).

Creating database link in posgresSQL to connect to SQL Server 2008

Are there any way to connect PostgreSQL to SQL Server? I found this link http://pgfoundry.org/projects/dblink-tds/ but are there other ways?
You might be able to do something using one of PostgreSQL's server languages, e.g. pl/pythonu. For any given query you could write a function in that language which fetches the results from the remote server, using the language's own DB access modules. So in pl/pythonu you would use a Python DB-API module for SQL Server access.
http://www.postgresql.org/docs/current/static/plpython.html
http://wiki.python.org/moin/SQL%20Server
You could try a foreign data wrapper.
There is one for accessing Microsoft SQL Server and an ODBC based one.
http://wiki.postgresql.org/wiki/Foreign_data_wrappers
I have not used them, so I have no idea how good they are.
I would best suggest to design ETL process in Pentaho or Talend and separate data integration and data storage layer. It's easier to manage then making db link.