Using redis with SQL server - asp.net

I am developing a web app and came across redis for key value storage. I do have a relational db SQL server. But as I have a multi tenancy system there will be separate schemas for each customer.
I was thinking how viable would it be use both redis and SQL server together? I was thinking of storing user Id and schemas so then can connect to SQL server db for that user

It's perfectly viable to use both Redis and SQL Server together.
With more details about the kinds of schema differences you expect, we might be able to provide more insight.

Related

How to read from a SQLite database in ROBLOX

I literally have to idea how to do that, I thought of using a HTTP server.
Roblox provides their own cloud hosted database for free use via their DataStore database abstraction API. If you really wanted to, you could create your own database server hosted on something like AWS and allow only specific HTTP headers to retrieve/store information.

Use SQL Server to query CosmosDB

Is there a way to query CosmosDB from SQL Server 2016 SSMS? I'm currently querying CosmosDB using the DocumentDB ODBC driver via SSIS. Users are now asking for the ability to query CosmosDB directly from SSMS through some sort of view.
Yes there is, you can use Linked Servers. For more information,
https://samtran.me/2017/10/07/linked-servers-for-azures-nosql-cosmosdb/
SQL Server Management Studio makes use of SqlClient underneath, which makes the main GUI only compatible with SQL Server databases. Using Linked Servers might not work yet either, since SQL Server doesn't support DocDB drivers.

Best way to handle a local SQL server communication with a cloud SQL server? (.NET Web App)

I have a .NET web-app (4.5) the app is a cloud app in the sense that it is hosted remotely and has its own local SQL data source.
The web app needs to talk to client SQL servers (in this case lets say my local SQL database). At the core the web app will request data from the remote SQL source and save it to the local SQL source, or the other way around the web-app may notify the remote SQL source that it needs to update a particular record, etc.
What would be the best way to do this?
I was looking at just doing a windows service on the client SQL server, and the web app makes calls to the client SQL box web service telling it what it needs to update or send over?
I started looking into WCF would this be a good application of WCF?
You may want to consider implementing an OData service as a WCF Data Service hosted in IIS that exposes data queried from SQL Server.
The following MSDN article provides an overview of a SQL Server OData implementation:
http://msdn.microsoft.com/en-us/data/gg192995.aspx
The following CodePlex link seems to provide good and relevant information pertaining to your scenario:
http://msftdbprodsamples.codeplex.com/releases/view/101644
Regards,

Remote storage for sqlite database

I'd like to upload my SQLite database to some remote storage to have access to my database from various computers and mobile devices programatically.
Is there a solution that enables secure solution (data won't be stolen) with good information privacy and some programming interface for various languages? (e.g. Python, C, Java in Android, etc.)?
SQLite has an Encryption Extension (SEE).
The SQLite Encryption Extension (SEE) is an add-on to the public domain version of SQLite that allows an application to read and write encrypted database files.
It is a commercial product, not Public Domain as SQLite.
SQLite is an embedded database which must be stored on a filesystem accessible by the client application. SQLite doesn't support multiple concurrent clients, remote access, access control, or encryption (natively.) The requirements that you list are much better served by a more traditional database server, such as MySQL or PostgreSQL. You can easily export SQLite data and import it into one of these databases.
If you are dead-set on using SQLite, you can try storing the database on a shared, remote, filesystem, a la Dropbox. You'll still have to worry about concurrent access and you'll lose many of speed advantages of using SQLite, but the database will be accessible from multiple machines.

confused about local data storage for occasionally connected application in .NET

Can I use a SQL Server Express database as my local database for an occasionally connected application (OCA) written using Visual Studio? Would that require SQL Server to be installed on the client machine? It looks like the default architecture for OCAs in .NET is to use SQL Server Compact. However, SQL Server Compact doesn't permit the use of stored procedures. I use stored procedures for all the data access in my application so, I am confused about the best way to create an occasionally connected client to extend the functionality.
I currently have an ASP.NET web application that connects to a web service (WCF). The web service connects to the DB and calls stored procedures to get data and submit changes to data. Now, I am trying to write a desktop application that can connect to the web service when a connection is available, and work locally when a connection is not available, using the MS Sync Framework. I don't quite understand how to do the architecture for this bit.
Yes, local data cache works with SQL CE 3.5 and you cannot use stored procedures on the cache. Once you add local data cache item to your project it automatically prepares all necessary MS Sync Framework code for data synchronization with the main data source + all necessary SQL scripts for local database and it will also offer you to create either typed datasets or entity data model to access the cache from your application.
Item doesn't work with SQL Server Express - it doesn't offer any other data provider then SQL Compact 3.5. Anyway if you want to use SQL Server Express you will have to either install it on the client machine or use another machine as DB server which breaks whole purpose of Local data cache.
Btw. I think Local data cache works only against database as the main data source so you cannot use it if you want to have WCF services as data source and you will have to write the store and synchronization yourselves.

Resources