I'd like to know if I'm making the right decision. I'm developing an application that allows the user to mix database entries from a local database (possibly SQL CE or SQLite) and from a remote, shared database (most probably MySQL). Ideally it would have to be flexible and compatible with several database server types (statically as per initial config, not mixing several types dynamically) but this is not a show-stopper.
The code is C#, .NET 4.
Naturally, I was thinking about NHibernate since it features LINQ in version 3.0, a plus for code readability and efficiency, and the model-first approach is more natural than Entity Framework. It also has Shards for the mixed database part, which should be much easier to handle. The other option is EF 4, which I would otherwise favour since it's fully supported in the .NET context and by Visual Studio, and has a promising future there.
當然，我正在考慮NHibernate，因為它在3.0版本中具有LINQ功能，這是代碼可讀性和效率的優勢，而模型優先方法比實體框架更自然。它還有混合數據庫部分的Shards，應該更容易處理。另一個選項是EF 4，我不喜歡它，因為它在.NET上下文和Visual Studio中完全支持，並且在那里有一個充滿希望的未來。
Is Shards mature enough? It has been stuck to 3 beta for quite a while now and looks like a dead project, have people deployed professional applications based on this extension? Does it have a future? Or is there another option?
Does NHibernate 3 run on Mono? I think so, but an actual confirmation would be great. That would be another advantage over EF if a web server has to be developed as alternative interface.
Thanks in advance for any information or feedback!
Apparently .NET 4 is an issue and in order to use NHibernate, .NET 3.5 is wiser. Also, there are clearly issues with SQLite and SQL CE, or other parts of the framework like WPF.
顯然.NET 4是一個問題，為了使用NHibernate，.NET 3.5更加明智。此外，SQLite和SQL CE或WPF等框架的其他部分也存在明顯的問題。
Does NHibernate allows sharding across different database types (for example MySQL and SQLite)?
So I'm starting to believe EF 4 is safer for the client side, and NHibernate when it comes to a possible ASP.NET interface.
Sharding is designed (for a known schema) redirect calls to a known server i.e. names starting with a,b,c,d to server a and e,f,g,h to server b etc.
I haven't heard of it being used cross database server make. I would doubt that this works.
Sharding has it place but I can imagine there might be intermittent issues which are difficult to resolve if different shards have different performance profiles.
There is this link which indicates that it possible to run NH3 under mono ... https://nhibernate.jira.com/browse/NH-2312
這個鏈接表明可以在單聲道下運行NH3 ... https://nhibernate.jira.com/browse/NH-2312
Remote shared database I would tend to abstract away through a known API using WCF or REST.