I want to build an ASP.NET website with Entity Framework 5 but I do not have permission to install SQL Server on my system, is it possible? If yes, how? If not, any alternative, like files etc...
If you can't install anything, then I'm afraid you're stuck with embedded databases like SQL Server Compact Edition or Sqlite. (and some NOSQL databases as well, I believe some of them don't require a server)
Just don't forget about one thing - embedded databases usually aren't enough for web environment.
For instance:
https://stackoverflow.com/questions/11591002/how-can-i-use-sqlite-in-a-c-sharp-project
http://www.microsoft.com/en-us/sqlserver/editions/2012-editions/compact.aspx
You could offload the database platform entirely to a remote Azure database; there's lots of info on this online, but this page might be a good starting point.
An alternative would be to host your database on another service like AWS or Microsoft Azure.
Related
I am working on an ERP Project, using sql server for database.
Now when I deploy the project, I have to install sql server which uses a lot of storage and time is also wasted. As the client is never going to fire any query. Thus, having no need of the development environment. So, is there any option to overcome this.
Local DB is one of the option but having difficulties in configuring it. If anybody ever used it and Please help me out. Or if there's any other option please help me with that
NOTE: I am using asp.net as front end technology
I'm not sure if this is what you're trying to do, but if you want your app to connect to an SQL Server database, you will need at least the OLE DB Driver to be installed on your server.
It will allow your app to connect to an SQL Server instance, which can be running on any other machine.
In complement you could have a look at this : https://www.connectionstrings.com/
and this https://learn.microsoft.com/fr-fr/sql/connect/oledb/oledb-driver-for-sql-server?view=sql-server-ver15
I've got an internal ASP.Net application which I would like to send to someone. The problem I have is that the app is using local SQL Server database. Is it possible to have a copy of the database to the file and just replace the access to the db for the file? If yes how?
Personally, I would sign up for a free Microsoft Azure account, use the free Azure Migration tool to copy your database to Azure, then just change your web.config to point at the Azure database.
This saves having to buy any SQL Server licenses, and requires the fewest amount of changes to your app.
No, they'll need SQL Server as well. They can install a free Express edition if they're eligible for the license.
If you set up your application properly, it should be easy to replace the data layer with a portable database like SQLite, so they don't have to install anything.
I want to create a desktop application, I normally work on web based applications so have very little knowledge about creating console applications using .Net and visual studio.
So now in this application I'l also be using database connectivity and stored procedures (SQL server). But how should I start doing this as I dont want to install SQL server on my clients system.
thanks in advance..
I think it depends on the goal of your application, the amout and sturcture of the data and the environment. The last point aims to the client system, if the client is part of an enterprise network (e.g. Active Directory) or is a common user at home.
maybe you can use xml or json files to store the data
if you need a database, you can create a setup project for your application which automatically installs a SQL Server express
another way is, if it's applicable for you, your application can consume a webservice which provide the data
you could use SQL Server compact http://msdn.microsoft.com/en-us/library/cc645984(v=sql.100).aspx or SQL Lite to embark your DB in your application without external dependencies.
Otherwise, if offline isn't a requirement, you could go the "cloud" way, with web APIs
I'm seeing it pop up more and more and not really understanding the purpose of it? Can I only use it when I am developing locally on my desktop?
Or can I put a commercial site on a server with say Win2003 thats using VistaDB? Is it faster than using a SQL DB? Is it secure?
Confused...
VistaDB is a .NET alternative to the lightweight database systems offered by Microsoft: Jet (Microsoft Access), MSDE, Sql Server CE or Sql Server Express. You can use it in any .NET application where you need a database and you don't really want the overhead of having a client/server database.
VistaDB is an embedded database (some other embedded databases are SQLite and FireBird). This basically means that your database is totally "invisible" to your end users. They don't need to install a client/server database like SQL Server for instance. Deploying VistaDB is simple. All you need is the database file and a reference to the VistaDB runtime DLL within your application.
A commercial application that uses VistaDB for it's backend is Graffiti CMS.
From what I can make out of their website http://www.vistadb.net/:
You can use it for both development and commercial purposes
It's not a server, it's an assembly for your website/application
My guess is that since it's not a full featured SQL server it should be faster and lighter on the resources
Don't know how secure it is, but they state that you can put it on "medium trust" websites.
You may also want to see this StackOverflow topic about VistaDB.
Nothing is faster than SQL Server for what it does. If you think SQL Server is too slow you are probably doing something wrong. It is incredibly fast. There is no way a 100% managed engine is going to be faster than SQL Server on everything.
Lighter on resources - Yes
Easier to deploy - Yes (xcopy deployment)
Desktop database - Yes, you can use it for desktop development of applications. Some people also use it for multi user applications on a shared drive. Websites are another target where you can't install a service or don't want to pay extra for SQL Server access on the hosting account.
Security - VistaDB runs in-process with your application. There is no concept of user security since you are loading it directly.
Concurrency - Depends on your application. We support multiple processes access the same database, but some operations will still have locking issues you have to work with in your code.
I'm working on a side project that would be a simple web application to maintain a list of classes and their upcoming schedules.
I would really like to use Linq to SQL for this project, but unfortunately the server environment I'm developing for only has MySql available. I've dabbled briefly with Subsonic but it just doesn't get the job done.
The database requirements for this application aren't that great, though, so I'm curious if using an MDF file in App_Data would be a workable solution. Otherwise, it appears I'm going to have to hand-code sql queries which I want to avoid at all costs.
Take a look at Microsoft SQL Server Compact Edition. I believe you can work with MDF files without having to run a server. All code runs in process. I believe it has some limitations but it may work for you and I think it's free.
To the best of my knowledge, you can attach directly to the MDF (called a "user instance", rather than attaching the MDF to a "server instance") only if SQL Server Express is installed on that machine. So your machine that has MySql on it would also have to run SQL Server Express.
I've long since completed the project which prompted this question, but recently I've had another project come along with very minor data requirements, so I spent some more time experimenting with this.
I had assumed that Sql Server Express required licensing fees to deploy, but this is not in fact the case. According to Microsoft's website, you are free to use it with certain restrictions:
Maximum database size: 4 GB
Maximum memory used: 1 GB
Maximum CPUs used: 1 (complete procs, not cores)
Sql Server Compact is a bad idea for web applications because it requires a hack to make it work, and it isn't built for the concurrent access you'd need for the web. But if your application can fit within the modest limitations of Sql Server Express, it works pretty well. And since it speaks regular T-SQL like its larger siblings, you can use Linq to SQL with it.
I hear that Linq to Sql support is now in the Mono trunk for the 2.6 release, so L2S' tight-coupling to Sql Server will likely be a moot point in the near future. I will either end up porting my code to use Mono's superior Linq to Sql implementation on the db of my choice, or go another route entirely (SubSonic has improved by leaps and bounds since I last tried it). But for the time being, Sql Server Express is a valid choice for very small database-driven apps.
More likely you'd put an Access database in App_Data. If you're using a MSSQL MDF file, you'll definitely still need either MSSQL or MSSQL-Express.
Your question is confusing, however. You seem to interchanging data access, ORM and the actual database. You can use SubSonic with MySQL, but you cannot use LINQ to SQL with non-MS databases or MS Access.
One of the few differences between SQL Server Express and the "full" SQL Server is the ability to automatically attach to MDF files - what Microsoft call "xcopy deployment".
SQL Server Express is free (as in beer) so unless you have no administrator rights on the box for installation, this should work fine.
+1 for SQL Server Compact. It's free and there's no 'engine' in the sense of a full-time service, but you do have to deploy a runtime (it's just two .dll files).
I don't understand... what do you mean by "having an MDF file in App_Data"? You need a proper SQL Server installation for that to work. You can always use the free SQL Server Express for developing the application, and then move the database to the proper SQL Server once you are done. Check here.
It appears that I was misunderstanding how mdf files are accessed through .net. There is no MS SQL Server available on the server, so it looks like I'm screwed.
+1 for SQL Server Compact. It's free and there's no 'engine' in the sense of a full-time service, but you do have to deploy a runtime (it's just two .dll files).
Does linq to sql work with that though?
you can't use SQL Server Compact with asp.net or web development