
F# supports all common data import and access techniques. In addition, the type provider feature of F# brings simplicity and flexibility to accessing data, including databases, web-scale data and structured text formats like JSON, and XML.
If the data access libraries you need are not listed here, you can search for them onnuget.
This guide includes resources related to data access with F#. To contribute to this guide, log on to GitHub,edit this page and send a pull request.
The resources listed below are provided only for educational purposes related to the F# programming language. The F# Software Foundation does not endorse or recommend any commercial products, processes, or services. Therefore, mention of commercial products, processes, or services should not be construed as an endorsement or recommendation.
FSharp.Data - The F# Data library (FSharp.Data.dll) implements functionality to access data in your F# applications and scripts. It implements F# type providers for working with structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank and Freebase services. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests.
Json.NET provides full support for serialization of F# types to and from JSON.
Direct access to CSV and other log file formats is simple. For example, seeLog File Analysis with F#
A wide range of high-quality libraries exist for SQL data access from F#. Many can be found onNuGET.Some resources are listed below:
FSharp.Data.SqlClient - Use SQL to specify your queries, explore Stored Procedures, User Defined Types and Functions with IntelliSense right in your F# code. Requries SQL Server 2012+ or SQL Azure.
FSharp.Data.SQLProvider - A general SQL database type provider, supporting LINQ queries, schema exploration, individuals and much more besides. Requires SQL Server, SQLite, PostgreSQL, Oracle, MySQL or Microsoft Access.
SqlDataConnection Type Provider - A type provider for accessing SQL using F# 3.0 LINQ queries. Requires Microsoft SQL Server.
SqlEntityConnection Type Provider - A type provider for accessing SQL using F# 3.0 LINQ queries and Entity Framework. Works with a broad range of databases.
ADO.NET - A set of .NET classes exposing data access services to the .NET programmer. Works with a very broad range of databases.
F# allows for the direct integration of scalable data stores into F# programming. For example, a type provider for the World bank data sets is available in theFSharp.Data library. Otherweb data stores can be accessed through F# support for JSON, XML and CSV data formats.