473,654 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Storage, Interface and Design

(if this is the wrong place to ask this, please let me know where the right
place is)

I've been attempting to come up with a sane, and relatively simple design
for a set of objects that separate the storage, and interface/access to
that data. So far I've had no luck coming up with something I'm happy with.

The data being stored will typically be groups of double floating point
numbers, and integers, groups will tend to have 2 to 4 items per.

Access to the groups and to the individual items in each group is required,
and should be relatively "fast" (ah, love that premature optimization, but
I _know_ it will become a bottleneck at some point)

Also the amount of data being stored will vary depending on the number
of "objects" that access the interface, and the number of data points each
object has.

As an extension, each object will need several types of "data", each with
varying numbers of items and groups.

A simple example would be like a 3D object:

Object {
Vertex {
Point -> double[3]
Normal -> double[3]
Color -> uint8_t[4]
}[N]
}

* where N is the number of vertexes an object has.

Now why don't I just store them in a form like I just laid out? Because Its
SLOW, and can't take advantage of certain acceleration that 3d APIs
provide.

Basically I need to store each of the data types in a separate contiguous
chunk of memory (technically they could be concatenated and stored in the
same chunk, but that won't allow for decent times when appending to each
data type).

So far I haven't been able to come up with a simple, yet extendable/flexible
interface.

--
Thomas Fjellstrom
Jul 1 '06 #1
4 1726
* Thomas Fjellstrom:
(if this is the wrong place to ask this, please let me know where the right
place is)


Don't know, because you're not concrete enough that I can infer what the
problem is, much less whether it has anything to do with C++.

However, since the answer to /any/ programming problem is indirection,
note that C++ has pointers and references.

If that doesn't make you happy, try the Mentos+Diet Coke experiment?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 1 '06 #2
Alf P. Steinbach wrote:
* Thomas Fjellstrom:
(if this is the wrong place to ask this, please let me know where the
right place is)
Don't know, because you're not concrete enough that I can infer what the
problem is, much less whether it has anything to do with C++.


The problem is that I want to separate the data storage from the interface,
and provide several storage implementations as well as several interface
implementations , and mix them up a bit if needed.
However, since the answer to /any/ programming problem is indirection,
note that C++ has pointers and references.
Yup, I'm not _that_ simple ;)
If that doesn't make you happy, try the Mentos+Diet Coke experiment?


Don't have any mentos :(

--
Thomas Fjellstrom
Jul 1 '06 #3
how about use BerkeleyDB for your storage, fast access
sleepycat.com

Jul 1 '06 #4
happyvalley wrote:
how about use BerkeleyDB for your storage, fast access
sleepycat.com
that could be one option, or sqlite.. but the immediate types of storage
I'll be using is a vector like object with OpenGL VertexBufferObj ect
replication.

--
Thomas Fjellstrom
Jul 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4636
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
9
1710
by: cryptic_blade | last post by:
I am working on the design for a new application and want to make the program fully object oriented. I have built and used C++ classes before, but never with a database driven application. Should classes handle reading and writing their property data to the database table themselves, or should they rely on an outside "DataHandler" custom class or function specific to the application. If I hard code specific database/table/query...
2
2136
by: Mike | last post by:
Hi I have been tasked with converting my pulp and paper mills weekly projected and actual contractor hrs excel spreadsheet into a an Access 97 database. So far my design has been to use a form with a button for each to day navigate the recordset of a single table using .findfirst and .nomatch and I am worried about performance as I'm basically creating a flat file.
2
2226
by: Victor Fees | last post by:
I have a general question for which I would like to get some general input from the online community. I'm building an asp.net web application that will make extensive use of a SQL Server 2K database. One of the relationships in this database is many Tasks to a 1 Project. I can see two basic ways to manage this in my web application: The first is by creating a Project class and a Task class, and talking directly to the database with...
41
4685
by: laimis | last post by:
Hey guys, I just recently got introduced to data mappers (DTO mapper). So now I have a SqlHelper being used by DTOMapper and then business layer is using DTOMapper when it needs to persist object to database or load them back. Everything is working nicely so far. My question is, is it OK practice to use DTOMapper rfom the presentation layer? For instance, if I want to present in HTML format the list of entries in my database, should I...
1
2145
by: Diane Yocom | last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve the following design problem (sorry my explanation is so long): I'm developing an ASP.Net intranet app (using VB.Net for my business objects) that will allow my users (max of about 25) to enter information about families and their children. On one page, I need to collect general information about the family (such as address and phone number) and specific...
12
3754
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My question is about storing data in a database. Yes I understand that you can link to a database in your program and read and write to the database etc etc. Well, that's all find and dandy but what if the person you're writing the application for...
3
1905
by: olduncleamos | last post by:
Hi all, What is, in general, the preferred practice to transfer data between business objects and the data layer? To be more specific, I have a couple of business objects with state data that are stored in external storage. The data layer take care of communicating with the storage and return data in dataset or file stream or simple arrays. Have the business objects directly consume a dataset seems inflexible. What would be the prefered...
18
7417
by: Jens | last post by:
I'm starting a project in data mining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than Python, and my own experiments confirms this. I could imagine this to become a problem for very large datasets. How good is the integration with MySQL in Python?
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.