What's the best database for Electron based inventory system - database

I'm coding an inventory management system using html,css,js and electron to compile it into a desktop based app.
I want it to work locally on clients computer, without internet connection.
Please share your experience with local database management system, keeping in view electron and inventory management system requirements.
Thanks.

If you are doing an electron app and you want to use without internet connection I would suggest sqlite. It is simple and it works very well with javascript.
Check this out Uses for SQLite (Internal or temporary databases)

Related

How to host Shiny apps on windows server?

I have developed some shiny apps which I want to make available to a few selected internal users for testing purposes and continued development.
Deploying the apps on the cloud or on shinyapps.io is not an option, as the apps are handling sensitive internal data.
Using ShinyServer is unfortunately also not an option, as we have a strict Microsoft only IT architecture and I thus have available only
a virtual machine with Windows Server 2012 R2 on it.
I have been doing some web search and have found out the following:
i.) I could host my apps on the Windows machine as explained here: https://stackoverflow.com/a/44584982/7306540 . This seems rather hackish and
not elegant at all. It would only allow hosting of one app at a time and I am not sure if it would allow several concurrent users at all.
ii.) I could use shinyproxy.io which would possibly work on the Windows machine but involves a fair amount of quite complex installation
and configuration work that I am not particularly keen on doing.
iii.) SQLServer 2016 seems to feature some sort of R integration. We are currently using SQLServer2014 and it would be possible to upgrade to 2016
in principle. However, I don't know if the "R features" of SQLServer2016 would allow hosting of Shiny Apps. I found this blog post, https://social.technet.microsoft.com/Forums/windowsserver/en-US/1cf94cbb-c45d-4f8d-8b5e-9d208bfe369a/microsoft-r-server-can-i-host-shiny-apps-yet?forum=MicrosoftR , but without an answer:
Q: Does anyone know more about the capabilities of SQLServer2016 in this regard?
What about other options? Is there any other way to host my apps on the Windows Server? Do the makers of RStudio plan to add a Windows version of ShinyServer? Is anyone else working on this?
I would appreciate any insights into this topic!
EDIT:
Additional hosting options:
iv.) We can install a VM on the Windows Server, e.g. Virtual Box, or VM Player, install Linux and Shiny Server and host from there. We might run into problems in this variant if the Shiny Apps need to access SQL Server DB's on the Windows machine.
i.) This variant could possibly be improved by using (quote #gregL): "pm2.keymetrics.io, a process manager typically used for Node.js in production. The plumber docs describe how you can use pm2 with R: rplumber.io/docs/hosting.html#pm2"
Hosting of Shiny Apps is possible on Windows!
At work, we host several production shiny dashboards, so it is definitely possible. You can host more Shiny apps by extending the i.) solution you mentioned, and using different ports for the Apps. The steps that you need to take are listed here:
make sure that the port is open in the local (evtl. also remote) firewall for TCP/IP connections
run a "scheduled task" on the local machine that starts a local R session as described in i.), make sure that the task does time-out and restarts if needed
Once these settings are in place, you can already test the Shiny App, first locally, and also from the remote station. Editing the shiny app can be done also live, in what the GUI is concerned, but if you want to refresh the data, you will have to restart the R command process.
Tip: You should also have an index webpage where you list all running apps with their ports

Can a desktop app update your websites database?

This is a hypothetical question that I don't seem to be able to find an answer to. In theory, could you write a desktop program which allows you to alter the database of a personal website? A simple example would be a blog, where instead of having to go online and log into Admin section of your website, you would have a desktop app where you could write a blog offline and once you have internet it would automatically update your website?
Would this theoretically be possible?
Yes, it is possible. However, probably not recommended as you would have to allow direct connections to your database through the firewall unless your desktop application made the same http/https pots that the website does when updating the database. At that point, you're just creating a new UI that calls the old UI to do the same actions.
If you are running Windows you could use the free tool Microsoft Live Writer for that. I am sure you can find other free tools for other OS out there.
There is not also an Open Source version of it Open Live Writer

React Native - connect to PostgreSQL database

I would like to connect with React Native to an external database, like PostgreSQL, MySQL or what ever. Is this possible?
But first let me tell you something about my plan:
I will develop my application for multiple installations (multiple devices - one installation on one device). All devices are connected with a local network which is provided by a Windows installation (server). On the server runs a database (PostgreSQL) and I would like to connect to this database with all my devices.
The server (or in fact its database) should store tasks and each device should access to these tasks (read and write) locally.
I had also some other ideas like simple SMB-XML file storage (but the problem with collisions) and an SQLite database on an SMB shared file - but the website of SQLite tells that this will not avoid problems with multiple accesses. Therefore I need another local solution. This brought me to provide a database which is accessible from the local network.
I would be very grateful if someone has a note how to solve this problem.
Thank you!
In order to access a database directly from react native you would need a pure JavaScript database driver. A quick google search produced a JavaScript drivers for PostgreSQL (https://github.com/brianc/node-postgres) but it is written for Node.js and I doubt it will work in JavaScript Core or Chrome. CouchDB works via a REST API and it's actually intended for direct access by multiple clients. There are multiple JavaScript clients available for that.
BUT why do you want your clients to connect to the DB directly? What you describe seems like a pretty standard application model. You'll just need a backend running on your server talking to the DB and providing an API. Good old web development. If you want to write JavaScript on the backend I suggest using Node.js
If you really can't or don't want to write a backend, there are several services that provide API for data storage and even some data processing. But of course they aren't local. Have a look at parse.com or firebase.com for example.

HTML5 client-side database location

I want to create a standalone todo list with HTML5. Ideally, it would be a file that sits on a USB drive and could leverage a database (either embedded in the html file somewhat like tiddlywiki) or would access another file.
I've read about Web SQL and SQL Lite, but it seems like they save the database information to a specific location on the local computer, and the user has no control over whether to place it elsewhere. The app wouldn't really be portable if it saves a different instance for every machine upon which it's run.
Is there a solution to force the database to reside on the portable drive?
Client & Server Storage
SQLite
SQLite is a database engine that needs to be specifically installed on a machine or packaged with software. This type of technology is usually used on the server side with a server programming language like PHP. Therefore, I do not believe that server storage solution is for you.
HTML5 Client Storage
Meanwhile, Web SQL is an HTML5 feature for client storage. The databases are managed by the client (the browser) through JavaScript. The implementation of WebSQL is very similar to SQLite. Note that Firefox supports IndexedDB instead of WebSQL. Sadly, you can't force the browser to store the databases onto an external drive.
The Solution
At this point, the most viable solution for you is to create an application that will be executed on the external drive. If you really want to use HTML5 you could go with Titanium. It leverages the power of web technologies to create native cross-platform applications. From Titanium's documentation you can package a SQLite database with your application.

Update a local/client Microsoft Access Database from a server (MS SQL Server2005)

I've got a website that runs on a shared hosting environment, using ASP.net 2.0 (C#) and MS SQL Server 2005. I've recently been asked if I can integrate my website with a piece of third party desktop software that uses the Access runtime as its database (transparent to the end user).
Primarily I want to be able to offer users of my website the option of exporting their data into the Access database on their local machine. The data schema's match sufficiently, the question is how to actually do this, and in the simplest way possible for the user.
Simply having a webpage update the local Access database isn't possible due to the obvious security restrictions. I've considered asking them to upload the Access database to the server, so I can migrate the data then allow them to download it again, however the competency of the users of this software is such that even locating the Access database, let alone uploading and downloading it from the website might be too complicated.
I've also considered if Adobe Air or Silverlight could help here, but don't know them well enough to know for sure. Similarly I'm assuming another exe could be written to perform this task that the user could simply download and run, however my experience is in web development, not program development, so this isn't a 100% certainty for me, or an ideal development option for me.
So, can this be done, and if so what technique can achieve this, with the stated aims being ease of use for the end user, followed by ease of development by someone with web development as their main skill. Many thanks!
You may find this answer of interest: Best way to stream files in ASP.NET
It is about transferring a file from the server. You could save Excel or CSV and use that to update Access.
Instead of trying to do this in a web page you might just expose some views from your sql server to some client specific logins.
Then within the Access application, allow them to tie to your sql server. You might even provide an access application for getting the data from your site and stuffing it in their local access database.
In my work we have done something similar that is transparent to the user by creating an ActiveX control. The problem is that you are limiting the users to use only Internet Explorer.
I think that the best way to achieve what you are trying to do is by installing a service in the client's computer. If creating a service is beyond your experience you can post a project in a place like oDesk and find somebody that can help you with the development for the money that you are willing to pay to complete your project.
Good Luck.

Resources