Alternatives to SQLite in VS2013 with EF6 and designer support - entity-framework

I have previously used System.Data.Sqlite 1.0.85 with EF5 in VS2010 and it worked well and I came to really like the designer. On my new machine, I've switched to VS2013 Community and tried to get Sqlite 1.0.94 and EF6 running, but it's such a hassle and I'm starting to get really frustrated. I can't seem to get it running on my old project, which I need to work on, but only on a fresh one. Tried copying the old stuff, but it just stops working again. From what I've read, I'm not the only one having these issues.
I can connect to the database in the server explorer, but the connection won't show up in the Entity Data Model wizard. It did run once on a fresh project, but since I keep running into trouble, I'd rather switch to something else that actually works.
So my question is, what alternatives are there? It's for a small business application. Would LocalDb be an alternative? Are there any other good databases/providers (free ones) that work well with EF and have designer support in VS2013?
Thanks for any feedback!

LocalDb can be used in the dev environment and works really well. But it might be too limiting for production use depending upon your requirements. Another option would be to use SQL Server Express. But this again might have limitations in a prod environment. The following link gives you an overview of the features of different versions of SQL Server:
SQL Server Editions
Another option would be to go for something like PostgresSQL or MySQL but I haven't used them, so can't say much about them.

Related

Zero Deployment for Entity Framework with SQL Compact

I strungle with the deployment of an application which uses the latest entity framework together with SQL Compact with code first.
I want a zero deployment, means, on the target machine nothing except .net 4 is installed, I just copy the assemblies and everything have to work.
The requirements are just:
Latest EF
.Net 4.0
Code First
SQL Compact
The location of the *.sdf has to be done in the code, not in the *.config file
I google for hours and try different "solutions" from several places, nothing worked. On the target machine I always have just a crash without any information whats wrong.
Did anyone know a step by step tutorial or something with met my requirements?
(Or have a working project ready to tryout?)
I have a blog post and a completed solution here: http://erikej.blogspot.dk/2013/11/entity-framework-6-sql-server-compact-4_25.html

Generating database and connection from schema

I'm using Glassfish server 4.0 as my app server for a java project in NetBeans 7.3.1. I have a database schema which I would like to include in my server as a database. Is there a way to generate the database in Glassfish based on a previous schema?
The extensions of the files are .frm and there's one .opt file.
Also, does Glassfish include a visual interface to modify a database's table's properties and registries?
Thanks in advance.
The answer to your the last part of your question is no. Glassfish itself does not include a visual interface for modifying database tables, properties etc. It includes a visual interface for creating JDBC Connection Pools and JDBC Resources. I personally use one integrated into my IDE of choice, Netbeans may have this feature, I happen to use IDEA. In production you could use any 3rd party app that does this, TOAD being a popular one but there are many.
I have some thoughts on the first part of your question but nothing ready to put into an answer at this point. When I do I'll update this one if its still an open question.

SQL Server Data Tools and Edmx

So we're using the new SSDT Microsoft released, pretty cool stuff. We are keeping a database project under version control with all the schemas, and an offline database for development and we can later deploy on SQL Azure database. We;re using EF in development, so my question is where would the edmx fit in, should we update the edmx file from the offline database or from the online SQL Azure directly, whats the best practice on this?
I would say that in your case "the production database is the truth", so I would update from SQL Azure. There's no right answer tho really.
Incidentally, in the early betas of SSDT it was possible to have a reference from an EDMX to a SSDT project thus your source code became the truth (which, in my opinion, is preferable) and the EDMX knew it was always working against "the truth". Unfortunately they ditched this feature and there are no signs of it returning.
For the EF to work correctly the EDMX file has to be in-synch with the database you are connecting to. It's hard to answer your question without knowing the development process you follow but I would imagine you use Sql Azure in production and develop against an on-premises database. Therefore one copy of the Edmx file will be used on production server. In the development environment you have a "living" copy of the edmx file that is changed as needed when the local database changes. When you get to the point you when you are ready to ship you deploy your app (include the edmx file) to a production environment that uses Sql Azure.
If, in your development environment, you update the edmx file from the SQL Azure then stuff will break or will not work correctly if the schema of the database in Azure is different from schema of your local database.

Deploy Entity Framework Code First

I guess I should have thought of this before I started my project but I have successfully built and tested a mini application using the code-first approach and I am ready to deploy it to a production web server.
I have moved the folder to my staging server and everything works well. I am just curious if there is a suggested deployment strategy?
If I make a change to the application I don't want to lose all the data if the application is restarted.
Should I just generate the DB scripts from the code-first project and then move it to my server that way?
Any tips and guide links would be useful.
Thanks.
Actually database initializer is only for development. Deploying such code to production is the best way to get some troubles. Code-first currently doesn't have any approach for database evolution so you must manually build change scripts to your database after new version. The easiest approach is using Database tools in VS Studio 2010 Premium and Ultimate. If you will have a database with the old schema and a database with the new schema and VS will prepare change script for you.
Here are the steps I follow.
Comment out any Initialization strategy I'm using.
Generate the database scripts for schema + data for all the tables EXCEPT the EdmMetadata table and run them on the web server. (Of course, if it's a production server, BE CAREFUL about this step. In my case, during development, the data in production and development are identical.)
Commit my solution to subversion which then triggers TeamCity to build, test, and deploy to the web server (of course, you will have your own method for this step, but somehow deploy the website to the web server).
You're all done!
The Initializer and the EdmMetadata tables are needed for development only.

best sql client for linux *box window manager

I am using ARCH Linux and Awesome3 WM.
I am looking for a good sql client for multi database include mysql postgre oracal.
Squirrel sql seems good, but I got a blank window after launch it.
Any solution for this problem or there is another better client for me?
http://henplus.sourceforge.net/
It's not a GUI, but it works with any database that has a JDBC driver (including MySQL, PostgreSQL, and Oracle), and I like it.
Several tiling window managers might have problems with java applications. Take a look at this page: http://awesome.naquadah.org/wiki/Problems_with_Java.
Especially try the workaround using wmname.
As a DB frontend you might try DbVisualizer. If you are using Eclipse to develop your application, "Eclipse SQL Editor" might be of interest. Sorry, Stackoverflow spam protection doesn't let me to provide a hyperlink for that one.