Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I apologize if this tends more toward design that programming, but here goes.

What design would you recommend for a database that is

  1. Memory resident
  2. Must run on windows, linux and (at a stretch) the mac
  3. Accept multiple queries simultaneously
  4. Have minimum overhead, since a search is expected to take <0.25s

This program implements a domain-specific search. Think of it as a database, but one that takes advantage of domain specific information to outperform a convential database search (for example, with custom oracle indexing). We have a custom data structure for our data. Our protoype is a simple exe that constructs the database in memory each time it is run. We were thinking that perhaps this program would suffice, but augmented with sockets so it can listen for queries.

This database will be static. Its contents will change infrequently.

We expect queries, and the solution, to be delivered via a web service.

share|improve this question

migrated from stackoverflow.com Nov 11 '11 at 13:24

This question came from our site for professional and enthusiast programmers.

    
What would said queries do? –  user1249 Nov 11 '11 at 18:18

1 Answer 1

All the usual questions about database design apply. How many records, how big are the records, how do you search, will you be updating or deleting, or just displaying, ...

In "Oberon - The Overlooked Jewel", Franz tells a story. The original Oberon (a PASCAL-like language) compiler at ETH-Zurich used a very elegant multiply-linked symbol table structure. One day, Wirth tore it out and replaced it with an array and a linear search. On their standard benchmark, which was the time the compiler took to recompile itself, the linear search was faster.

If a simple linear search through a straight array is Good Enough, you're done.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.