Does sqlite support linq-to-SQL? - sqlite

Does sqlite support linq-to-SQL?

No database supports LINQ. LINQ is an abstraction layer on top of the database so it depends on the ADO.NET provider. LINQ-to-SQL is also bound to SQL Server.
That being said this SQLLite provider has support for LINQ to Entities.

There's a third-party library called LinqConnect that is aiming at providing Linq-to-SQL support to a variety of database backends - including SQLite.

There's also IQToolkit, which does nothing other than reimplement all of LINQ-to-SQL in open source. This is great if you want "raw" access to your database. IQToolkit Contrib could be handy too if you go this route.
If you're more of an ORM type, you could look at SubSonic (which is built on IQToolkit).

Related

Monotouch Sqlite-net or ADO.Net

I would like to use Sqlite database in my Monotouch app. From http://docs.xamarin.com/recipes/ios/data/sqlite i see two options.
Sqlite-net
ADO.NET
Doing research i found that Sqlite-net is easy to use, works on both ios and android but does not support foreign key concept. My need is to have relations in my db. Student table is linked to classes, professor, assignments table. Not so complicated!!!
Does Sqlite-net supports such relations? Which one is better choice Sqlite-net or ADO.Net.
Appreciated...
Thanks
ADO.Net doesn't give you out of the box support for relationships either. It only gives you raw classes like SQLCommand and SQLDataReader.
I would highly recommend sqlite-net, as it is a huge timesaver in being an ORM.
You can setup foreign keys by calling manual SQL statements in sqlite-net, which is the same you would do with ADO.Net anyway.
So with sqlite-net, there are several ways you could setup your database:
Call sqlite-net's APIs for creating tables based on your C# classes, then add things it doesn't support with manual SQL like foreign keys and indexes
Include an empty database with your app with the full schema already setup
Create the entire database with a raw SQL script
I tend to go with option #2 if I want full control of the database schema (and it's a little easier to include a database file I made in SQLite Expert). sqlite-net should work with an existing database just fine.

What database we have to use if i want to use Entity Framework instead of linq-to-sql

I am new to entity framework. I wanna use entity framework, but I am confused which database i have to create like sql or something else.
Entity Framework is database independent, for a list of providers see here - http://msdn.microsoft.com/en-us/data/dd363565.aspx
If an ADO.NET Data Provider exists for your database - then you may use it with Entity Framework.
A list (maybe not full) of existing ADO.NET Providers you may find in MSDN
If you ask about supported databases -
go to http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework and look
Entity Framework ADO.NET providers
Also you can use the same database that you use with Linq to SQL

What is a good alternative to SQL Server for ASP.NET applications?

I've been looking into a lot of database's recently, and am not sure if it's because I'm bored or what, but I want to create a few web applications using database's other than MS SQL Server. Any suggestions that tie into ASP.NET nicely?
I'd recommend VistaDB and MySql.
I'd consider MySQL as the obvious alternative.
However, fundamentally one relational database is pretty much the same as another, more so when accessed through something like ADO.NET. If you're bored with SQL Server then rather than looking for an alternative why not look at trying different data access strategies?
You don't mention whether or not you're using an ORM (object relational mapper) which can make working with databases a lot more enjoyable than using standard ADO.NET, such as:
NHibernate
Entity Framework
Linq to SQL
Subsonic
IMO, sticking with SQL Server but trying out a few different ORM's would be much more interesting than switching to a different database altogether.
Or how about looking into using a document database, such as RavenDB?
I suggest you take a look at Connectionstrings.com. Most databases there have a .NET provider available.
Define "good".
Do you want to have a database as a simple data store, or should the database also implement business logic (stored procedures, triggers)?
Do you want to ship your apps and therefore require easy of installation?
Does it matter if the database is commercial, when MSSQL offers a free version?
As #richeym pointed out: are SQL statement a sufficient interface, or do you require an ORM?

Are there any linq-to-sql for Databases other than MS-SQL?

I am wondering if it is possible to use Linq functionality to connect to a database like my-sql
If it is possible are you able to use the designer to created the DataAccessLayer like with MS-SQL or do you have to hand code its content.
Thanks in advance.
KJ
Linq to Sql only works with MS-SQL. Entity Framework can access several different database back ends and it fully supports linq. NHibernate can access more databases but it's linq support is not yet complete.
You could use IQToolkit.
Yeah check this out
http://code.google.com/p/dblinq2007/
There has been a few posts just recently on this too, just search on stackoverflow for more details.

ASP.NET LINQ Database vendors

Will Linq work against any database (i.e) MySQL,Sybase,Oracle,DB2?
It depends what you mean by "LINQ".
LINQ to SQL will only work against SQL Server and SQL CE (or whatever it's called these days).
I believe that the Entity Framework (LINQ to Entities) will work with any database supported by ADO.NET... but I think that vendors can give more specific support which would no doubt mean better performance and quite possibly a wider range of translatable queries.
Then there are efforts like LINQ to NHibernate which again will work with any ADO.NET-compatible database.
LINQ supports only SQL Server.
However there is a LINQ provider for My sql here
Also, check this resource for more info.

Resources