fawsql

F#AWSQL 1/4 - Interoperability by Cloud

In this series I am going to show how to put together **F#** (with its Type Provider feature), **Amazon Web Services** and **SQL server**. Cloud computing is a manifestation of the benefits of globa

January 3, 2018

In this series I am going to show how to put together F# (with its Type Provider feature), Amazon Web Services and SQL server.

Cloud computing is a manifestation of the benefits of globalization. A few years ago Windows and Linux were fierce adversaries, today we see them both (almost seamlessly) available in Microsoft Azure. Amazon Web Services are strongly committed in competing with Microsoft Azure, yet it is quite straightforward to host SQL server instances and run .NET code in AWS.

And before risking to fire-up the never-ending debate about good and evil of the globalization, here my humble opinion: "Things are not good or bad, only our use of them can be so". Some people question technological progress as a threat; I think ignorance is the real threat. "There is only one good, knowledge, and one evil, ignorance". I couldn't agree more.

Format: walkthrough

The series I am presenting will be formatted more as a walkthrough than a project presentation. Kind of a step-by-step procedure to help in getting started with doing something quite typical (database management) using a rather state-of-the-art tools. Here the steps:

  1. Presentation. This post

  2. AWS service. In this post we will see how to create an SQL server instance in AWS

  3. AWS database. Using the service created in step 2 we'll now create a SQL server database and a simple table into it

  4. Playing with Data in F#. We will finally play using F# interactive and the SQL server type provider, performing some simple CRUD operations

Assumptions and Prerequisites

To follow through the series the reader should at least:

  • Have a basic knowledge of computer programming

  • Have a basic understanding of database systems

To be able to physically execute the operations the reader needs a setup compatible to what I used:

  • Windows 10

  • An AWS account (free version is OK)

  • Visual Studio 2017 Community 15.5.0 Preview 4.0

  • .NET 4.7.1 and F# 4.1

  • SQL Server 2014 Management Studio

For those who want to try with different platforms (e.g. linux), the minimum setup should be as follows, but be aware I didn't try it:

  • A computer with .NET and F# (at least a versions providing SQL type provider [F# 3.0])

  • An AWS account (free version is OK)

  • SQL server client tools (command line tools are available also for Linux)

Those using the Minimum setup will need to translate some of the operations. If someone is concerned about how "free" the principal setup is, I say that for test purposes it is completely free. I have been doing tests for several months in a (unregistered) Windows 10 Virtualbox VM created using the official Windows 10 ISO, and I didn't find any issues so far. Visual Studio Community, .NET and F# are free by design. AWS accounts can be created for free and give 1 year free access.

Conclusion

So stay tuned, will start in the next post.

Related articles