I am looking into developing a new user registration system for my company. In the past we have made use of ASP.net for all web development.
Due to the huge charge associated with this I am looking at moving towards a more open source alternative. The issue at the moment is that the db we have is SQL Server and we have no way of changing this in the forth coming future.
Has anyone any experience of building a django application with SQL Server backend for the database?
I would most like to hear of any issues you may have faced.
Thanks
Looks like there's some decent resources out there:
http://code.google.com/p/django-mssql/
http://code.google.com/p/django-pyodbc/
https://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer
I personally don't have experience with it, and the backporting of your models from db->code could possibly be a painful step. Also, it seems like most of these packages want to work with sqlserver 2000 or 2005, so hopefully you are not using 2008.
Related
In my company we are 5 developers who work on same organisation.
We used a single server with SQL and Dynamics CRM installed.
If two developers publish customizations at the same time, we need to restart IIS.
Do you have any suggestions to optimize SQL Server or IIS to avoid this issue?
Currently in the way CRM works, publishing will slow everything down and potentially lock the SQL server up.
Your options would to be to only publish when necessary, so you minimize your disruption to your developers. For stuff like form design, I would recommend not publishing, but, to preview the from to see your new changes.
Upgrading your servers with more memory and so on will help reduce the time taken to publish. Sorry this is not much help.
If you are developing webresources, you can use this little hack webresource proxy as workaround. Basically, it just replaces the content of the webresource by the response of generic web server. You don't need to update and publish webresource anymore.
Despite a few hiccups and a few workarounds, my MVC based Entity Framework (Code First) application is now complete and ready for deployment.
I originally tried developing through SQL Express, however, I had non stop problems with the Code First approach as I asked about here which made it completely unworkable.
So, in the end, I developed it following the majority of guidelines and used SQL Compact Edition. This has been absolutely brilliant for development - but - now it has come to deployment and I am stuck.
I have seen some people saying about generating the Schema from the .SDF file, however, there are differences and restrictions in Compact edition such as nvarchar being limited to a length of 4000, and I need max in my application.
So basically, what can I do?
In addition - but not essential - , I am going to be moving on to the next project shortly, It will involve heavy usage of items needing to be stored in a database that are longer than 4000 characters. Are there any better strategies now for development / Is it possible to use Code First with SQL Server Express or SQL Full (I have MSDN and willing to install/use anything that will help).
Here are my unofficial recommendations:
SQL CE is not a viable option for most production applications that are based on MVC (although I have used it in production services in rare cases).
I would try to avoid switching databases between development and production - i.e., don't test on SQL CE and deploy to SQL Express or something else.
I have never tried to open an MDF inside of Visual Studio - maybe I'm misunderstanding what you're saying here, but in general I'd recommend using the SQL Server-specific tools to manage databases: http://www.microsoft.com/download/en/search.aspx?q=sql+server+management+studio+express.
Regarding the other post, I would generally discourage using the AttachDBFilename portion of connection strings unless you need it for a specific purpose.
It sounds like you may want to review the available database initialization strategies: http://blog.oneunicorn.com/2011/03/31/configuring-database-initializers-in-a-config-file/.
There are lots of walkthroughs on our blog and the MVC MSDN site - if those don't work for you feel free to reach out to us from our blog and provide feedback on what we can do better!
Our blog: http://blogs.msdn.com/b/adonet/
MVC walkthroughs: http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part4-cs
On the one hand regarding deployment/migration you might want to take a look at http://exportsqlce.codeplex.com
On the other hand I've been checking Microsoft SQL Server Compact 4.0 Books Online and in principle there is no known issues with data types, although the limitation you mentioned for nvarchar is confirmed.
Finally in order to elaborate a strategy you might find interesting the Differences Between SQL Server Compact and SQL Server
You need to create a debug and a release specific web.config file:
In the release specific file you remove the connection string, so it creates a database for you.
In the debug specific file you keep the connection string.
However, I would suggest you to not use a connection string and use SQL Management Studio instead. Given that the Compact Edition does not support your requirement, this is a good time to switch...
I am currently working on a sample website proof of concept and planning to provide the entire VS2010 (ASP.NET and C#) solution to the company. I also use SQL Server and need to provide the database (tables(including some records) and stored procedures). What is the easiest way to ensure that I can bundle the database along with my VS2010 solution? Please provide some steps if possible.
At my company, we actually take the same approach that you're taking, and just do everything with scripts by hand for deployment. However, we do this mostly because we have a large legacy database, and we do incremental updates for a system that has to always be online.
If you're starting a new website from scratch, you might look into Database Projects inside of Visual Studio. It also has some functionality for unit testing your database built in that might be beneficial.
http://www.visualstudiotutor.com/2010/08/manage-database-projects-with-visual-studio-2010/
I'm having trouble figuring out databases in VB.NET. (VS 2008)
What control(s) do I need to use and how do I use them? I am ,looking for tutorials and sample code too.
I'm working on a trivia game where the admin can remove and add questions to a database.
EDIT:
The program must be able to do all of the DB interactions itself through code.
Regarding DB portability...
I do not intend to install it on many machines, so portability is not a major issue, but I's rather not be bound to Access or SQL Server. (Is that possible? - A portable database file?)
A bit more complaining...
I really need help with connection strings and the whole DB gamut in VB. I've done DBs in PHP so I'm not completely ignorant. It's the VB side of things that's confusing.
Thanks.
Have you considered SQLite DB? It's a very small DB and is used my many vendors. I have not used SQLite personally, but I do know that Firefox uses it and so does iPhone (from what i've read).
SQLite does not require you to install anything (as per the post below). It's a nice alternative to Access or carrying around SQL Server Express.
If you do decide to use SQL Server Express, you will be required to install the run-time, from here for each machine it's used on.
Below are some links which may help you get started
Google for SQLite DB
ADO.NET 2.0 Provider for SQLite
And finally, here's a blog post outlining how to get it done, and quickly.
Cheers!
I would suggest Microsoft's Enterprise Library - The hands on labs available make it a breeze to setup access to a database, and can make it as simple as a config change to point to a new/different DB.
Also, check out http://connectionstrings.com/ for related info.
I have been working on VB6 database desktop programming, but now a client is asking for a
simple web interface (some inserts into SQL Server db used by a desktop application).
The question is: Which approach is better?
1)creating asp.net project, connected directly to the SQL Server database;
2)creating separate (simple) mysql database managed by php and synchronization (in 15 minutes for example)
Thanks.
Personally since you already have the SQL Server database, I see no reason whatsoever to add the complexity of another database and then synchonization. The first alternative is simpler to create and can be secure if you design it correctly. The issue about hosting is irrelevant since you are going to your own database that already exists, so is the issue about cost since the databse is already there. Further since you are already supporting SQL Server, you may be able to reuse some code rather than write new code (mysql's version of SQL is not the same as SQl Server's version). Synching the two databases may be more complex than you think (differnt data types, etc.) and the data in the real database is not real-time whereas with the first alternative it is.
I'd prefer the separate database approach.
It's more secure.
PHP/Mysql hosting is widespread
You can pretty much achieve anything with the technologies available, it just depends on your skill and productivity with specific technologies and the availability of online help. Plus Microsoft stuff you tend to have to pay for whereas PHP/MySQL is totally free.