Can Node API build on top MySQL DB? - mysql

I am aware that node APIs can be built on top of NoSQL DB can node API be built with MySQL DB? Please also share some good resources.

Node.js is Javascript server side runtime. So You can connect to all the data source you can with java/.Net etc. So yes, you can use MySql with node.js.
reference:
Node with MySQL

Related

Delphi existing application connect to cloud

I have my application in Delphi with MySQL as a database. This is a Desktop application with local Database connected using ADO components.
I have another web application done in PHP and MYSQL.
I want to merge both databases and connect the Delphi application to the cloud MySQL database.
Do I need to put all my logic in PHP scripts and access them from Delphi?
How Delphi to cloud connection can be established?
You can use FireDAC to connect to a database located in the cloud, as soon as your provider allows that connectivity.
But exposing you database to the internet is not the best secure architecture. As you suggest yourself with naming it, a much better architecture is REST. The idea is to write server side software - could be PHP - to accept REST requests from a client, execute it (access the database) and send a reply to the client.
Today's, the REST requests are frequently using JSON to pass requests and receive replies. JSON is supported by Delphi. In short, this is an ASCII representation for object properties.
If accessing the database directly is what you really want, look at this video by Stephen Ball showing how to access an MS-SQL database on Azure cloud. This would be pretty well the same with mySQL.

Working with azure(mysql database) in node javascript with cloud API

I'm working with an API app on Azure by deploying an API written in NodeJs which stores data in MongoDb.
Make a new API for web & mobile apps from Azure portal.
Choose MongoDb by adding MongoLab module from Azure.
Create a table (collection) and populate it with few entries.
Prepare our Git repository from Azure portal and link it to our local Git on computers.
Decide which NodeJs modules to use to set the dependencies.
Edit the configuration file for NodeJs.
Make the main API file with the following functionalities:
Connection to the database.
Running the service.Making CRUD operation services (CREATE, READ,DELETE...)
Testing our API on a browser.
Making an application using our API
My question: how to use these steps to store data in mysql database(azure)?
I cannot fully understand your requirement, do you want to use the MySQL database to store your data in your API application in Node.js? If not, please clarify your purpose.
To implement connection to MySQL in Node.js, you can use some 3rd part MySQL handler modules.
For example:
node-mysql - A pure node.js JavaScript Client implementing the MySql protocol
or
Sequelize - A promise-based ORM for Node.js and io.js
Any further concern, please feel free to let me know.

is it possible to connect mysql db using angular js without php code

Is it possible to connect MySql db using angularjs without PHP code?
based on client side scripting we can't connect MySql db.
Is it any other way to connection?
If you wish to use just Angular for accessing your database, then discard PHP all together, and switch to something like Firebase. It will allow you to do almost everything from your Angular application (not saying that you should do it that way, but you could).
AngularJS is a Front-end framework, and it should be used in combination with some server side language: Java/C#/NodeJS/PHP...
But to answer your question directly: No, you can't access MySQL from Angular.
No, you cant connect MySql DB(Backend) with any client side javascript libraries so cant connect Backend DB with angularjs.
You can pick any server side programming language(not only php) to access MySql DB and write webservice interface to pass data from backend to your client.
If you are willing to have a db at client side which can be accessed with javascript(even angularjs) and no need to use any server side programming language then can go with below methods:
Indexed Database
Web SQL
localStorage
As of now we can't connect to our DB through client script. But there is alternate solution to store your data in google's FIREBASE https://www.firebase.com/tutorial/#session/omykpz5lraw.
This can be done by using nodejs as server to connect to ur database(I have done it using MangoDB). Since Angular js follows MVC architecture, you can use it as service layer too.

How to write to a remote DB from an android app

We have an android app that currently sends data to a php script which writes to a mysql DB on the same server. We are thinking of using a scalable DB server e.g. FathomDB (which is just based on amazon RDS & rackspace) so that we can handle load increases easily.
The question is how does our android app write to these remote DBs? Do they have some kind of rest API, or allow you to have a php script similar to the one we have in place at the moment?
I'd say most of services like these have a connector running on the web, like the one you are using. But some of the services you mention (for example amazon rds) have a native mysql connection. So you can connect using mysql to the server and run queries like you currently do in php. You can use ACL to ensure security in your application :)

How to integrate database into software

I am practicing writing an app which use MySQL to manipulating data.
My concern is if my client machine doesn't have have MySQL pre-installed, it's not be able to run my app, is it?. So is there anyway to embed the database server right into the app, or to run the app without the data server. I wonder how all the softwares out there manipulates data. It's not like we need to install some kind of database server before install the app.
MySQL is a client/server database engine, which means that you must install the client and server separately from each, and they communicate over some kind of network protocol.
If you want to deploy a stand-alone application, you are probably better off using a library like SQLite, which gives you as much of the functionality of a SQL database as you are likely to need in such an app, but instead operates on local files and doesn't require installation of a separate server.
You can embed MySQL in your application, see MySQL as an Embedded Database for details.
Your application could work with the remote database, when configuring database connection you should set your DB server IP address(host), port and login credentials. so in order to write application which is dealing with data manipulation, you need to connect to any database instant.
If you are working on client-server application, MySQL database may be accessed either by means of MySQL (this solution may be suitable for internal networks), or through some database-side service, which can provide some API and which can be accessed from client via some application-level protocol (for example, XML-RPC).
If you are working on client application, there are other database solution, which can be used in stand-alone software: SQLite, Derby. As an alternative to database approach, you may consider storing data in XML / YAML format.
I suggest to wrap db layer in you application witch simple interface provided for all operations performed on the database. In this way, you will not have to go into the details of the atomic operations on the database and through unified interface, you can create several different classes which will be responsible for access to different databases in the same way (the same interface). These classes should realize the interface and implement all necessary methods inside (for example ADO). Now your db layer can be visible in all program it the same way. Wrapped class can realize singleton desing pattern and can be used as one instance enywhere in your application. Universal class design (interface) gives you many benefits such as the possibility of substitution on another layer if necessary (switch to a totally different db).