views:

69

answers:

4

So the question can be reformatted as "What can replace a database in an offline version?"

The initial idea is inspired from wordweb where you just type the word and then you get the meaning of it displayed in a fraction.

Of-course they are not saving all the words and there meanings in a database. What are they using? Are they storing all the values in a file and retrieving the corresponding meaning?

Is there any article which shows the above approach(Reading a particular section of a file ).

Are they using HashTables or similar?

+4  A: 

You could utilize a local database such as SQLite or you could utilize a text file and store your data in it.

Michael Eakins
A: 

I don't know what it is they are using, but there is at least SQLite, a database engine that doesn't require installing any server or other program, since it gets compiled into your executable and uses a single file for the database. That's as close as you'll get to an actual database with nothing but filesystem access. Otherwise, if the amount of data isn't too large, you could store it in a file format that isn't too hard to parse (such as XML, although the overhead is considerable), load all your data into memory, and then use .NETs built-in DataSet functionality, or better yet, Linq to objects or Linq to datasets to manipulate the data.

tdammers
SQL CE is another option.
Steven
+1  A: 

I suggest you to use an embedded database to store words and meanings. Try to look at Sqlite. It's simple to use, just require to include a dll in your setup, and has a wrapper to use it from c#. It is very stable ,fast and widely used.

Andrea Parodi
@Meakins, I don't see a reason to downvote the posts as they answered at the same time as you did. I should strongly sugegest to cancel the downvotes as they vioalte the community guidelines http://stackoverflow.com/faq
Subhen
@Meakins, I didn't copy your solution, I'm just writing my solution while you wrote your. In fact, we both are suggesting a very commonly used database engine.
Andrea Parodi
+1  A: 

If you use .net i think easiest way is setup a Sql Server Compact database, its a kind of sqlite but made by microsoft, easy to integrate to VS .Net.

Under is the description paste from the site http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx where you can download it free.

Embedded Database for Building Client Applications

Microsoft SQL Server Compact is a free SQL Server embedded database ideal for building standalone and occasionally connected applications for mobile devices, desktops, and Web clients.

Top Features

  • Free to use and distribute
  • Supports desktops and mobile devices
  • Small footprint for easy deployment
  • Fully embeddable architecture
  • No administration required
  • Single file, code-free database format
  • Support for ClickOnce, XCopy, MSI, CAB, and non-admin embedded installation options
  • Supports all Microsoft Windows embedded, mobile, desktop, and server operating systems
  • Supports a rich subset of Transact-SQL syntax and SQL Server data types
  • Microsoft Visual Studio 2008 integration
  • Supports ADO.NET, LINQ to SQL, LINQ to Entities, and the ADO.NET Entity Framework
  • Supports multiple concurrent local connections
Leo Nowaczyk