473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Data structure with sql "LIKE" searchability?

We need to take a large amount of data, load it into memory, and then search
on it. A hashtable would work if you could perform operations similar to
sql select .. where like ... clauses. Any data structure come to mind where
I could something like...

Object[] objs = hash["abc*"];

One other question, is it possible to create a hash with multiple keysets?
For example, an object, on keyset on name, one on some code?

TIA -

Derrick
Nov 15 '05 #1
4 1769
Derrick,

A DataSet might be the best option in this case. You can load the data
into tables, and then call the Select method to select rows with specific
criteria. I believe the like operator is supported as well.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"news.microsoft.com" <de*********@excite.com> wrote in message
news:uJ**************@TK2MSFTNGP12.phx.gbl...
We need to take a large amount of data, load it into memory, and then search on it. A hashtable would work if you could perform operations similar to
sql select .. where like ... clauses. Any data structure come to mind where I could something like...

Object[] objs = hash["abc*"];

One other question, is it possible to create a hash with multiple keysets?
For example, an object, on keyset on name, one on some code?

TIA -

Derrick

Nov 15 '05 #2
Hi Nicholas -

Thanks, I'm looking at DataSet and DataTable. We basically want to create a
relatively small in memory table based on xml files, and do simple where
like searches. Can DataSet and DataTable operate independently of an actual
relational db?

Thanks again -

Derrick
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Oi**************@TK2MSFTNGP10.phx.gbl...
Derrick,

A DataSet might be the best option in this case. You can load the data into tables, and then call the Select method to select rows with specific
criteria. I believe the like operator is supported as well.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"news.microsoft.com" <de*********@excite.com> wrote in message
news:uJ**************@TK2MSFTNGP12.phx.gbl...
We need to take a large amount of data, load it into memory, and then

search
on it. A hashtable would work if you could perform operations similar to sql select .. where like ... clauses. Any data structure come to mind

where
I could something like...

Object[] objs = hash["abc*"];

One other question, is it possible to create a hash with multiple keysets? For example, an object, on keyset on name, one on some code?

TIA -

Derrick


Nov 15 '05 #3
Derrick <de*********@excite.com> wrote:
Thanks, I'm looking at DataSet and DataTable. We basically want to create a
relatively small in memory table based on xml files, and do simple where
like searches. Can DataSet and DataTable operate independently of an actual
relational db?


Absolutely. Indeed, you might want to look at the XmlDataDocument
class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4
Hi Jon -

I've been looking at the QuickStart example of reading books.xml and xsd,
can't find any samples that execute an actual sql command though, you
wouldn't happen to have a code snippet handy, would you?

Thanks!

Derrick
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Derrick <de*********@excite.com> wrote:
Thanks, I'm looking at DataSet and DataTable. We basically want to create a relatively small in memory table based on xml files, and do simple where
like searches. Can DataSet and DataTable operate independently of an actual relational db?


Absolutely. Indeed, you might want to look at the XmlDataDocument
class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 15 '05 #5

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

Similar topics

1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
2
by: Adam Short | last post by:
I've never needed it before but now I do! Does anyone know if you are able to perform a NOT Like search using Classic ASP ADO? i.e. myData.Filter = "Ref NOT LIKE '*1234*'" by the way this...
10
by: joshsackett | last post by:
I am starting an encryption project for my database and I'm performing some tests on decryption speed. A lot of my application queries use a LIKE parameter in the WHERE clause. To keep from...
0
by: Stephen Ahn | last post by:
Given a web method like this : public string DoEcho(string data) { return "echoed <" + data + ">"; } When this method is called from the client, eg :
0
by: Chris | last post by:
XDrive.com has a great offline backup web interface that looks just like windows explorer. Is there anything like this for ASP.NET that one can buy to run on their own server? I looked at...
2
by: Questman | last post by:
Good afternoon, Does anyone have any code that implements, or approaches implementing, a cross-browser DHTML/JS solution to provide an Excel-like Grid on a web page - I'm trying to convert an...
2
by: suki | last post by:
I`m curious to know if there is something like a TDBText in c#. I`m using a DataGridView to display my db data, but this doesn`t look very good. In the standard components, i find nothing similar...
11
by: Bruce Lawrence | last post by:
Ok, I'm baffled... I'm making a query in access 97 between 2 tables. There is a field in both tables called "DWGNO". OPENORD has a record with a DWGNO of "00000012345" DIEDATA has a record...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.