[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C++ database

Posted on 2000-04-20
3
Medium Priority
?
403 Views
Last Modified: 2010-04-02
I need to be able to create a database in memory.  This database will be updated quite frequently(add, delete, update).  This database also needs to be queried.  The database must do all this as quickly as possible.  What is the best datastructure to use.  I have thought about using and MFC CMap.
0
Comment
Question by:joegood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:Ik_Khan
ID: 2737255
I think that the Using of Double link list is a better option
0
 
LVL 3

Accepted Solution

by:
Try earned 900 total points
ID: 2737426
Go with STL!!  It has all sort of containers.  (Containers are components that stores data, each with their own set of algorithms and adaptors.)

Some containers are 'deque' (i.e. double-ended queue, meaning you can work at it in a bidirectional manner; from either end).  Some other containers are, list (as in linked list), map, multimap, set, multiset, stack and vector.  There are more, but like their generic name states, they are 'containers' because they hold a variety of data.

Algorithms are functions that work and manipulate the data stored in containers (e.g. sort, search, rearranging elements, assigning values to them, etc.).

Adaptors are interesting components!  They transform one thing into another (sort of like magic)!  They can take one container and provide a different interface to it, allowing one data structure to be turned into another, requiring the same capabilities, but whose interface require a different set of operations.  They connect onto an existing object on one side and make it appears differently on the other side.  They do not really change the object to which they are applied; they simply alter its appearance.  They are really interesting to work with!!

MFC is good, but compared to STL, it is slow (very slow) and clunky.  What's more, STL is part of the C++ language, while MFC is something additional you'd have to work with.  MFC is not part of C++, it is extra baggage you'd have to carry around.
0
 
LVL 3

Expert Comment

by:Try
ID: 2737428
I forgot to mention that STL will do ALL the things you stated you need.  It can add, modify, delete and can be queried.  In addition, it allows both random and sequential access, as well as forward or backward sequencing.  And it is FAST, ... VERY FAST!!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question