0

Is it possible to have an embedded database as a file shared on a network disk and used simultaneously by multiple users (to both read and write)?

Slowness is not an issue, but no database software should have to be installed. Is Microsoft SQL Server Compact appropriate for such a purpose?

3 Answers 3

1

I found this page on the msdn which suggests that version 3.5 and above of MS SQL Server Compact should be o.k. in this scenario.

To support multiple applications that access the same database at the same time, SQL Server Compact 3.5 provides multiuser support. Multiuser support enables multiple users of a database to synchronize data without having to disconnect the database before they use merge replication or remote data access (RDA). For more information about multiuser synchronization, see Multiuser Access and RDA and Multiuser Access and Synchronization.

However I, personally, have no experience with this so could not say for sure if this will definitely work.

Sign up to request clarification or add additional context in comments.

2 Comments

I was hoping for confirmation from personal experience. Thanks anyway!
@ipavlic - I appreciate that, it could well be worth firing off an email to someone at Microsoft if no one can provide real world experience of using MSSQL CE this way.
1

Have you tried VistaDB? I believe it should meet your requirements.

1 Comment

It seems to satisfy the requirements. The price tag is rather high, however.
0

SQLIte for .NET should work for you!

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Features include:

  • Transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures. Zero-configuration - no setup or administration needed.
  • Implements most of SQL92. (Features not supported)
  • A complete database is stored in a single disk file.
  • Database files can be freely shared between machines with different byte orders.
  • Supports databases up to 2 terabytes (241 bytes) in size.
  • Sizes of strings and BLOBs limited only by available memory.
  • Small code footprint: less than 30K lines of C code, less than 250KB code space (gcc on i486)
  • Faster than popular client/server database engines for most common operations.
  • Simple, easy to use API.
  • TCL bindings included. Bindings for many other languages available separately.
  • Well-commented source code with over 95% test coverage.
  • Self-contained: no external dependencies.
  • Sources are in the public domain. Use for any purpose.

3 Comments

SQLite documentation states: "[...] it might be possible for two or more client programs to modify the same part of the same database at the same time, resulting in database corruption. Because this problem results from bugs in the underlying filesystem implementation, there is nothing SQLite can do to prevent it. A good rule of thumb is that you should avoid using SQLite in situations where the same database will be accessed simultaneously from many computers over a network filesystem."
Write a wrapper around it that handles the connections instead?
I think if he doesn't want to install database software then he probably doesn't want to write database software either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.