Weather javascript is a database enabled language?
Can javascript be used as a language to connect and query the database? If yes why and if no why? Please explain in detail?
Weather javascript is a database enabled language?
Can javascript be used as a language to connect and query the database? If yes why and if no why? Please explain in detail?
Theoretically any programming language can be used to connect to a database, as long as it has the proper db libraries that the developer can use to connect to the DBMS
.
In particularly javascript
has some limitations (like servers it can connect to, resources from PC that can access), when run inside a web browser container, limitations that are not part of the language itself. Node.js
on the other hand doesn't have these limitations.
Most of the times you'll need a proxy
between your javascript ajax
calls and the actual database, because:
db credentials
and also as secured databases don't allow remote connections, javascript
(there are DBMS which allow a json-based communication though)My recommendation: implement the DB connect and query logic on the server-side part, and build a (RESTful) API to indirectly access the database this way. This also gives you control over what a logged in user can do with the database.