سؤال

هل سيكون اختيارا جيدا للاستخدام ضمن خدمة WCF مكتوبة في C #؟أنا حاليا باستخدام Firebirdsql، لكن هذا يعطيني الكثير من المشاكل.الوثائق والدعم هو أيضا فظيع.

تحرير: آسف، يجب أن أكون أكثر تحديدا عند طرح السؤال.ما قصدته هو ما إذا كان SQLite هو خيار جيد أم لا مضمن قاعدة بيانات داخل C #.MS SQL غير من السؤال عن هذا واحد.

هل كانت مفيدة؟

المحلول

SQLite is a great platform for any language, however there are small concerns I've had with it under .NET.

  1. It is natively compiled. This breaks .NET's AnyCPU Implementations of .NET (i.e. you have to explicitly distribute a 32bit & 64bit version of your app, and have some hand-written rules in your .csproj (MSBUILD) file to select the different dependencies based on what you select.
  2. It has some sticky threading issues. You're going to run into trouble if you're trying to use the same DB from multiple places (multiple instances of your app) etc. It's doable, but it basically uses a simplistic form of database/table locking to achieve this, which could be a major concern based on your program.

All In all i really like SQLite, but if I could find one that didn't require a redistributable (*cough*SQL Express*cough*), I would use another embedded DBMS for .NET Apps. To date I havent found one aside from Raven DB but that's a document DB.

Edit: Note, Raven DB Is also only free for open-source applications. It's not suitable for proprietary applications unless you're willing to shell out for a licence, so when looking into it please be sure to factor it into your budget.

نصائح أخرى

SQL Express always works well

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top