473,625 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Recommendation for storing metadata

Hi,
I have quite a lot of metadata in a WinForms app that I'm currently storing
within a hashtable, which is fine as long as I know the unique ID of the
track (Im storing info on media files). Up until now I've been sending the
track info to a seperate server app using serialization/sockets which stores
the metadata in a mysql db so that I can query on Artist/Album etc as well.
However, I'm looking to remove the server and move into a more P2P situation
with individual clients sending broadcast requests to each other and doing
their own queries.

Obviously I dont want to setup a heavyweight db on each client machine so
I'm looking at my options...
1. Keep in hashtable and just iterate through matching on artist/album
(slow)
2. Store in a dataset (i am unsure as to its performance? could someone shed
some light on this?)
3. Store as a oledb db (not too keen on this, as it means I've got to store
a blank db as a resource/cant change schema easily etc.)

What do you think would be my best option out of these? (or any others I've
missed?) I very much would like to hear people's views on this!

Thanks,
Kieran
Nov 15 '05 #1
6 1723

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi,
I have quite a lot of metadata in a WinForms app that I'm currently storing within a hashtable, which is fine as long as I know the unique ID of the
track (Im storing info on media files). Up until now I've been sending the
track info to a seperate server app using serialization/sockets which stores the metadata in a mysql db so that I can query on Artist/Album etc as well. However, I'm looking to remove the server and move into a more P2P situation with individual clients sending broadcast requests to each other and doing
their own queries.

Obviously I dont want to setup a heavyweight db on each client machine so
I'm looking at my options...
1. Keep in hashtable and just iterate through matching on artist/album
(slow)
2. Store in a dataset (i am unsure as to its performance? could someone shed some light on this?)
3. Store as a oledb db (not too keen on this, as it means I've got to store a blank db as a resource/cant change schema easily etc.)

What do you think would be my best option out of these? (or any others I've missed?) I very much would like to hear people's views on this!

Ideally, I would probably use a DataTable and the .Select() call and
DataView's(of course, all wrapped up in a DataSet as needed). It would be
far easier implementation wise to use a DataTable than to write your own
wildcard matching search routine(not that its hard, but why spend the time
doing it?). I use DataTable in several places in an app I'm working on and
it performs fine in the DataTables and DataBinding (now, object construction
is slower than i'd like, but thats a symptom of a screwed data layer, not
the storage objects).

But, as it is with all things, you should write up a test and see which
approach fits your needs best, performance should be ok with any of them, if
written well (iterating through a hash table shouldn't be that bad either).
Thanks,
Kieran

Nov 15 '05 #2
Thankyou for your comments Daniel, what you recommended is what I'm leaning
towards already :) Just out of interest how many records are you handling?
I'm looking at about 10,000 currently but may be going up to 100,000 or even
more (if I decide to perform some record cacheing to improve network
performance). Do datatables still work effectively up to these sizes (Im
concerned about the amount of memory the app may consume)? Lol I probably
will do some benchmarking when I get round to it but I'm lazy and also at
work right now (this is my pet project).

Again many thanks for your comments,
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:ZHV9b.3725 38$Oz4.148758@r wcrnsc54...

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi,
I have quite a lot of metadata in a WinForms app that I'm currently storing
within a hashtable, which is fine as long as I know the unique ID of the
track (Im storing info on media files). Up until now I've been sending the track info to a seperate server app using serialization/sockets which

stores
the metadata in a mysql db so that I can query on Artist/Album etc as

well.
However, I'm looking to remove the server and move into a more P2P

situation
with individual clients sending broadcast requests to each other and doing their own queries.

Obviously I dont want to setup a heavyweight db on each client machine so I'm looking at my options...
1. Keep in hashtable and just iterate through matching on artist/album
(slow)
2. Store in a dataset (i am unsure as to its performance? could someone

shed
some light on this?)
3. Store as a oledb db (not too keen on this, as it means I've got to

store
a blank db as a resource/cant change schema easily etc.)

What do you think would be my best option out of these? (or any others

I've
missed?) I very much would like to hear people's views on this!


Ideally, I would probably use a DataTable and the .Select() call and
DataView's(of course, all wrapped up in a DataSet as needed). It would be
far easier implementation wise to use a DataTable than to write your own
wildcard matching search routine(not that its hard, but why spend the time
doing it?). I use DataTable in several places in an app I'm working on and
it performs fine in the DataTables and DataBinding (now, object

construction is slower than i'd like, but thats a symptom of a screwed data layer, not
the storage objects).

But, as it is with all things, you should write up a test and see which
approach fits your needs best, performance should be ok with any of them, if written well (iterating through a hash table shouldn't be that bad either).
Thanks,
Kieran


Nov 15 '05 #3

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Ow******** ******@TK2MSFTN GP11.phx.gbl...
Thankyou for your comments Daniel, what you recommended is what I'm leaning towards already :) Just out of interest how many records are you handling?
I'm looking at about 10,000 currently but may be going up to 100,000 or even more (if I decide to perform some record cacheing to improve network
performance). Do datatables still work effectively up to these sizes (Im
concerned about the amount of memory the app may consume)? Lol I probably
will do some benchmarking when I get round to it but I'm lazy and also at
work right now (this is my pet project).
Thats a good question. Depending on the table, they run between 1 record and
about 2000 in usage.
I have tested under a higher load, although I know the app willl never reach
beyond...oh...m aybe 3000-4000 entries in a given table(which wouldn't EVER
be databound in full, too much info for the user), most views of the main
tables in this app are under 20 records. However, I can't recall how many
records I tested with or precisely what my results were, I do recall it was
satisfactory under that runtime, but it was a beta so I don't know how it
stands now...I should rerun that test.
I'll post back when I get done, I changed database schemas since so now I'll
have to write a new test even if I can find the old one, -_-.
Again many thanks for your comments,
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:ZHV9b.3725 38$Oz4.148758@r wcrnsc54...

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi,
I have quite a lot of metadata in a WinForms app that I'm currently storing
within a hashtable, which is fine as long as I know the unique ID of the track (Im storing info on media files). Up until now I've been sending the track info to a seperate server app using serialization/sockets which

stores
the metadata in a mysql db so that I can query on Artist/Album etc as

well.
However, I'm looking to remove the server and move into a more P2P

situation
with individual clients sending broadcast requests to each other and doing their own queries.

Obviously I dont want to setup a heavyweight db on each client machine so I'm looking at my options...
1. Keep in hashtable and just iterate through matching on artist/album
(slow)
2. Store in a dataset (i am unsure as to its performance? could
someone shed
some light on this?)
3. Store as a oledb db (not too keen on this, as it means I've got to

store
a blank db as a resource/cant change schema easily etc.)

What do you think would be my best option out of these? (or any others

I've
missed?) I very much would like to hear people's views on this!


Ideally, I would probably use a DataTable and the .Select() call and
DataView's(of course, all wrapped up in a DataSet as needed). It would be far easier implementation wise to use a DataTable than to write your own
wildcard matching search routine(not that its hard, but why spend the time doing it?). I use DataTable in several places in an app I'm working on and it performs fine in the DataTables and DataBinding (now, object

construction
is slower than i'd like, but thats a symptom of a screwed data layer, not the storage objects).

But, as it is with all things, you should write up a test and see which
approach fits your needs best, performance should be ok with any of

them, if
written well (iterating through a hash table shouldn't be that bad

either).
Thanks,
Kieran



Nov 15 '05 #4
Lol yeah, makes me laugh when some people in my office (no names mentioned)
fill a listview with half a million records and expect it to be useful to a
user!

Thanks for taking the time to run the test again. I've got a feeling that
the DataTable is going to be too big to keep in memory and that I'm going to
have to stump for an OleDb :( which adds overheads of its own as well as
more install issues. i just wish there was an easy and relatively
lightweight solution, maybe something like persisting the datatable out to
disk and searching it incrementally, only loading a few megs at a time
(sounds like a whole lot of work to me!)

Thanks again
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:Z7W9b.3725 92$Oz4.149064@r wcrnsc54...

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Ow******** ******@TK2MSFTN GP11.phx.gbl...
Thankyou for your comments Daniel, what you recommended is what I'm leaning
towards already :) Just out of interest how many records are you handling?
I'm looking at about 10,000 currently but may be going up to 100,000 or

even
more (if I decide to perform some record cacheing to improve network
performance). Do datatables still work effectively up to these sizes (Im
concerned about the amount of memory the app may consume)? Lol I probably will do some benchmarking when I get round to it but I'm lazy and also at work right now (this is my pet project).

Thats a good question. Depending on the table, they run between 1 record

and about 2000 in usage.
I have tested under a higher load, although I know the app willl never reach beyond...oh...m aybe 3000-4000 entries in a given table(which wouldn't EVER
be databound in full, too much info for the user), most views of the main
tables in this app are under 20 records. However, I can't recall how many
records I tested with or precisely what my results were, I do recall it was satisfactory under that runtime, but it was a beta so I don't know how it
stands now...I should rerun that test.
I'll post back when I get done, I changed database schemas since so now I'll have to write a new test even if I can find the old one, -_-.
Again many thanks for your comments,
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:ZHV9b.3725 38$Oz4.148758@r wcrnsc54...

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
> Hi,
> I have quite a lot of metadata in a WinForms app that I'm currently
storing
> within a hashtable, which is fine as long as I know the unique ID of the > track (Im storing info on media files). Up until now I've been sending the
> track info to a seperate server app using serialization/sockets
which stores
> the metadata in a mysql db so that I can query on Artist/Album etc as well.
> However, I'm looking to remove the server and move into a more P2P
situation
> with individual clients sending broadcast requests to each other and

doing
> their own queries.
>
> Obviously I dont want to setup a heavyweight db on each client machine
so
> I'm looking at my options...
> 1. Keep in hashtable and just iterate through matching on

artist/album > (slow)
> 2. Store in a dataset (i am unsure as to its performance? could

someone shed
> some light on this?)
> 3. Store as a oledb db (not too keen on this, as it means I've got to store
> a blank db as a resource/cant change schema easily etc.)
>
> What do you think would be my best option out of these? (or any others I've
> missed?) I very much would like to hear people's views on this!
>

Ideally, I would probably use a DataTable and the .Select() call and
DataView's(of course, all wrapped up in a DataSet as needed). It would be far easier implementation wise to use a DataTable than to write your own wildcard matching search routine(not that its hard, but why spend the time doing it?). I use DataTable in several places in an app I'm working on and it performs fine in the DataTables and DataBinding (now, object

construction
is slower than i'd like, but thats a symptom of a screwed data layer, not the storage objects).

But, as it is with all things, you should write up a test and see which approach fits your needs best, performance should be ok with any of

them,
if
written well (iterating through a hash table shouldn't be that bad

either).

> Thanks,
> Kieran
>
>



Nov 15 '05 #5

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi,
I have quite a lot of metadata in a WinForms app that I'm currently storing within a hashtable, which is fine as long as I know the unique ID of the
track (Im storing info on media files). Up until now I've been sending the
track info to a seperate server app using serialization/sockets which stores the metadata in a mysql db so that I can query on Artist/Album etc as well. However, I'm looking to remove the server and move into a more P2P situation with individual clients sending broadcast requests to each other and doing
their own queries.

Obviously I dont want to setup a heavyweight db on each client machine so
I'm looking at my options...
1. Keep in hashtable and just iterate through matching on artist/album
(slow)
2. Store in a dataset (i am unsure as to its performance? could someone shed some light on this?)
3. Store as a oledb db (not too keen on this, as it means I've got to store a blank db as a resource/cant change schema easily etc.)

What do you think would be my best option out of these? (or any others I've missed?) I very much would like to hear people's views on this!

Ideally, I would probably use a DataTable and the .Select() call and
DataView's(of course, all wrapped up in a DataSet as needed). It would be
far easier implementation wise to use a DataTable than to write your own
wildcard matching search routine(not that its hard, but why spend the time
doing it?). I use DataTable in several places in an app I'm working on and
it performs fine in the DataTables and DataBinding (now, object construction
is slower than i'd like, but thats a symptom of a screwed data layer, not
the storage objects).

But, as it is with all things, you should write up a test and see which
approach fits your needs best, performance should be ok with any of them, if
written well (iterating through a hash table shouldn't be that bad either).
Thanks,
Kieran

Nov 15 '05 #6
Ok, I ran a couple basic tests, I should note that I didn't give the runtime
time to warm up and I didn't run multiple runs because, honestly, in this
case first run probably is all that matters, as this is a desktop app.
it took 46 milliseconds to select about 5700 rows from a table containing
10000. The select operated over a range of key values (Col001 > 4188 AND
Col001 < 9943).
An additional test, using a sort on another column(Col001 > 4188 AND Col001
< 9943, Col002 DESC), resulted in 202 milliseconds.
Loading the 10000 rows into the datatable from an sql server took between
3.5 and 3.7 seconds.
I'll run some other usability tests, hopefully more useful ones, when i have
time. Thats all I really had time to whip up today.
"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:ug******** ******@TK2MSFTN GP11.phx.gbl...
Lol yeah, makes me laugh when some people in my office (no names mentioned) fill a listview with half a million records and expect it to be useful to a user!

Thanks for taking the time to run the test again. I've got a feeling that
the DataTable is going to be too big to keep in memory and that I'm going to have to stump for an OleDb :( which adds overheads of its own as well as
more install issues. i just wish there was an easy and relatively
lightweight solution, maybe something like persisting the datatable out to
disk and searching it incrementally, only loading a few megs at a time
(sounds like a whole lot of work to me!)

Thanks again
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:Z7W9b.3725 92$Oz4.149064@r wcrnsc54...

"Kieran Benton" <ki**********@f astmail.fm> wrote in message
news:Ow******** ******@TK2MSFTN GP11.phx.gbl...
Thankyou for your comments Daniel, what you recommended is what I'm

leaning
towards already :) Just out of interest how many records are you handling? I'm looking at about 10,000 currently but may be going up to 100,000 or
even
more (if I decide to perform some record cacheing to improve network
performance). Do datatables still work effectively up to these sizes
(Im concerned about the amount of memory the app may consume)? Lol I probably will do some benchmarking when I get round to it but I'm lazy and also at work right now (this is my pet project).

Thats a good question. Depending on the table, they run between 1 record

and
about 2000 in usage.
I have tested under a higher load, although I know the app willl never

reach
beyond...oh...m aybe 3000-4000 entries in a given table(which wouldn't EVER be databound in full, too much info for the user), most views of the main tables in this app are under 20 records. However, I can't recall how many records I tested with or precisely what my results were, I do recall it

was
satisfactory under that runtime, but it was a beta so I don't know how it stands now...I should rerun that test.
I'll post back when I get done, I changed database schemas since so now

I'll
have to write a new test even if I can find the old one, -_-.
Again many thanks for your comments,
Kieran

"Daniel O'Connell" <on******@comca st.net> wrote in message
news:ZHV9b.3725 38$Oz4.148758@r wcrnsc54...
>
> "Kieran Benton" <ki**********@f astmail.fm> wrote in message
> news:Oq******** ******@tk2msftn gp13.phx.gbl...
> > Hi,
> > I have quite a lot of metadata in a WinForms app that I'm currently > storing
> > within a hashtable, which is fine as long as I know the unique ID of
the
> > track (Im storing info on media files). Up until now I've been sending the
> > track info to a seperate server app using serialization/sockets which > stores
> > the metadata in a mysql db so that I can query on Artist/Album etc as > well.
> > However, I'm looking to remove the server and move into a more P2P
> situation
> > with individual clients sending broadcast requests to each other
and doing
> > their own queries.
> >
> > Obviously I dont want to setup a heavyweight db on each client

machine so
> > I'm looking at my options...
> > 1. Keep in hashtable and just iterate through matching on artist/album > > (slow)
> > 2. Store in a dataset (i am unsure as to its performance? could

someone
> shed
> > some light on this?)
> > 3. Store as a oledb db (not too keen on this, as it means I've got to > store
> > a blank db as a resource/cant change schema easily etc.)
> >
> > What do you think would be my best option out of these? (or any others > I've
> > missed?) I very much would like to hear people's views on this!
> >
>
> Ideally, I would probably use a DataTable and the .Select() call and
> DataView's(of course, all wrapped up in a DataSet as needed). It
would be
> far easier implementation wise to use a DataTable than to write your own > wildcard matching search routine(not that its hard, but why spend
the time
> doing it?). I use DataTable in several places in an app I'm working
on and
> it performs fine in the DataTables and DataBinding (now, object
construction
> is slower than i'd like, but thats a symptom of a screwed data
layer, not
> the storage objects).
>
> But, as it is with all things, you should write up a test and see

which > approach fits your needs best, performance should be ok with any of

them,
if
> written well (iterating through a hash table shouldn't be that bad
either).
>
> > Thanks,
> > Kieran
> >
> >
>
>



Nov 15 '05 #7

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

Similar topics

1
4028
by: Useko Netsumi | last post by:
Does anyone aware of any program/apps/scripts that has the ability to modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG, etc. Question for the experts, is it wise to store information in the image file instead of the database? Thanks
1
2781
by: Brett Selleck | last post by:
I would like to start collecting Metadata on my XML schemas. I have searched the web for a method of automatically extracting Metadata from an XSD file and have come up empty handed. Basically what I am looking for is a VB Script or J Script that parses an XSD file and outputs the metadata in a structured format. For examle: Given this simple Schema below I would like to see the following. Schema: <?xml version="1.0" encoding="UTF-8"?>
4
1911
by: C. Smith | last post by:
I am technical advisor for a new group of middle-aged people that want to create a web site for historical information about our local area. They want to scan in a lot of old photos, include information on schools, cemetaries, etc. The web server is NT4 running IIS 4.0. Pages are uploaded via FTP. I personally use Dreamweaver 3, and am learning Dreamweaver MX. I feel that Dreamweaver is too much for this group to learn. I had early...
1
8688
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
2
2522
by: Tomas Vera | last post by:
Hello All (This is being cross-posted to the C++ group), I've started receiving the subject message during a compile of a C++ based interface module used in my C# based WebApp. This module exposes some functions from our main Windows DLL to my web app. I get the same error message whether I compile from the IDE or from our normal command line based build process. What database file does the message refer to?
2
5232
by: GoodDay | last post by:
MC++ application, I've got "LNK2022 error message... MyApp error LNK2022: metadata operation failed (8013118D) : Inconsistent method declarations in duplicated types(CMainFramel). (0x02000008). It seems to be some my struct type have a "#pragma pack (push, 1)". Delete that #pragma keywords. Solve the LNK2022 problem. But why? That "#pragma ..." line make the problem and what's the meaning of two value (8013118D, 0x02000008). It seem to...
1
11981
by: Laurent Lequenne | last post by:
Hello There, I just converted a VS 2003 C++ Project into VS 2005. I already made some changes in my headers files, has I had compilations errors with enums declarations. Now everything compiles and I got errors at the link as shown below. If anyone could help me to get that thing compiled, he's welcome :-))) Thanks,
2
8787
by: EP | last post by:
I'm looking for a method by which to access Windows files metadata and have not been able to find anything in the standard modules or via Google - what is the standard approach? Shamefully I really do not understand Windows file system - e.g. is properties metadata attached to the file? if I change that metadata do I change the file's hash? how is the metadata structured? or is the "properties" metadata simply derived upon access? ...
3
1900
by: Lucky_Syringe | last post by:
I wrote this script to display different files from a database and properly display them by their respective MIME types. I have two questions: the first is that it just so happens not to work, and I'm just wondering if there are any discrepancies that I can't see that maybe someone else can, and the second is what would be the benefits and the drawbacks of storing different types of files in a database, for example files like jpeg and gif...
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
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...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
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
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
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.