Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I run F# in SqlClr?

I need to run .Net code in Sql and I'm trying to decide between F# and C#. I'm doing more and more code in F# nowadays so if it's not too impractical, I'd like it to be F#.

Is it possible to coerce VS2010 to deploy my F# assemblies (and their references) to Sql Server, in the same nice way a C# project does?

Would you recommend/not recommend running F# in Sql? Why?

EDIT: I agree that the language is better, that is not the question. I was mainly wondering if anyone had experience with using F# in SqlClr and specifically if the tools can offer a simple workflow for development, i.e. Deploy in VS2010.

EDIT 2: I'm experimenting with this, and registering manually is downright painful. Besides CREATE ASSEMBLY you have to register each function, sp, aggregate etc. You also have to drop them in the right order first, if they exist, lest you get a DROP ASSEMBLY failed because 'Nibbler' is referenced by object 'Hello'.

I then had the idea to use a C# project as a front end and have this project reference an F# project, just to have all this deploying taken care of automatically. Turns out you can only reference other C#/VB Sql Clr projects, or assemblies that are already referenced in Sql. This could still simplify deployment though, as all creation/deletion of functions etc would be handled automatically. Then, for deploying from test to production, I would just generate scripts from all the stuff that is registered in my test environment.

PS. I also tried fiddling with the .fsproj file, diffing with the .csproj of a C# Clr project, to enable deployment to no avail.

like image 451
Robert Jeppesen Avatar asked Mar 18 '11 13:03

Robert Jeppesen


People also ask

What is a good F value in ANOVA?

The F ratio is the ratio of two mean square values. If the null hypothesis is true, you expect F to have a value close to 1.0 most of the time. A large F ratio means that the variation among group means is more than you'd expect to see by chance.

What is a good significance F?

Significance F: Smaller is better…. We can see that the Significance F is very small in our example. We usually establish a significance level and use it as the cutoff point in evaluating the model. Commonly used significance levels are 1%, 5%, or 10%.

What does F on a test mean?

The F-statistic is the test statistic for F-tests. In general, an F-statistic is a ratio of two quantities that are expected to be roughly equal under the null hypothesis, which produces an F-statistic of approximately 1.

What is a good F value in regression?

An F statistic of at least 3.95 is needed to reject the null hypothesis at an alpha level of 0.1. At this level, you stand a 1% chance of being wrong (Archdeacon, 1994, p.


1 Answers

If you have trouble with FSharp.Core and other references in the SQL CLR context, you could try the --standalone compiler flag to cause external references to be embedded in the assembly that you deploy to SQL Server.

like image 188
Joel Mueller Avatar answered Sep 16 '22 21:09

Joel Mueller