473,322 Members | 1,526 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,322 software developers and data experts.

What's a good database for a really simple app?

dgk
I'm planning on writing a fairly small app (VB2005) to be distributed
via shareware that needs a single user database. I don't even think
that SQL Server Express edition is needed since I think that it is
essentially a true DB that runs all the time.

I really need something like Access and was thinking about using it
but there is so little documentation available on using Access from
DotNet that I have to feel that it is not the answer. Cor had an
example from two years back and that is about it.

So, perhaps the answer is just to create an in-memory dataset and use
it as needed, then serialize it when done and read it back in as
needed? What are the liabilities of an approach like this or some
other alternatives?
Jan 3 '06 #1
12 1394
dgk wrote:
I'm planning on writing a fairly small app (VB2005) to be distributed
via shareware that needs a single user database. I don't even think
that SQL Server Express edition is needed since I think that it is
essentially a true DB that runs all the time.

I really need something like Access and was thinking about using it
but there is so little documentation available on using Access from
DotNet that I have to feel that it is not the answer. Cor had an
example from two years back and that is about it.

So, perhaps the answer is just to create an in-memory dataset and use
it as needed, then serialize it when done and read it back in as
needed? What are the liabilities of an approach like this or some
other alternatives?

There is a ton of stuff about using Access from DotNet. The main
difference is just the connection string and you using a different
class. If you feel comfortable using SQL from DotNet, then using Access
will be a piece of cake.

Chris
Jan 3 '06 #2
I've done quite a lot with small apps and access databases and think its
probably a really good solution. There are plenty of examples out on the
net for use access from VB.NET.

"dgk" <dg*@somewhere.com> wrote in message
news:53********************************@4ax.com...
I'm planning on writing a fairly small app (VB2005) to be distributed
via shareware that needs a single user database. I don't even think
that SQL Server Express edition is needed since I think that it is
essentially a true DB that runs all the time.

I really need something like Access and was thinking about using it
but there is so little documentation available on using Access from
DotNet that I have to feel that it is not the answer. Cor had an
example from two years back and that is about it.

So, perhaps the answer is just to create an in-memory dataset and use
it as needed, then serialize it when done and read it back in as
needed? What are the liabilities of an approach like this or some
other alternatives?

Jan 3 '06 #3
dgk
On Tue, 03 Jan 2006 10:40:32 -0500, I Don't Like Spam <no@spam.com>
wrote:
dgk wrote:
I'm planning on writing a fairly small app (VB2005) to be distributed
via shareware that needs a single user database. I don't even think
that SQL Server Express edition is needed since I think that it is
essentially a true DB that runs all the time.

I really need something like Access and was thinking about using it
but there is so little documentation available on using Access from
DotNet that I have to feel that it is not the answer. Cor had an
example from two years back and that is about it.

So, perhaps the answer is just to create an in-memory dataset and use
it as needed, then serialize it when done and read it back in as
needed? What are the liabilities of an approach like this or some
other alternatives?

There is a ton of stuff about using Access from DotNet. The main
difference is just the connection string and you using a different
class. If you feel comfortable using SQL from DotNet, then using Access
will be a piece of cake.

Chris


Actually the sticking point was CREATING an Access database from
DotNet - that's what there isn't much documentation about. I don't
want to ship an empty database; if it doesn't exist then I want to
create it on the fly. I did it using VB6 a while back. For DotNet,
Cor's example requires a reference to ADOX ext 2.0 and:

Dim catNewDB as New ADOX.Catalog
catNetDB.Create("Provider=Microsoft ...

I guess I try it and if it still works (the example is from two years
ago) then I guess I can do it. I hope the Install Wizard and ClickOnce
is up to the challenge.

The idea of just creating a DB in memory and serializing it is still
tempting though.
Jan 3 '06 #4
dgk,

A search in this newsgroup will surely give you this link, as well has Paul
Clement written a lot about this.

http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8

The same kind of samples are on our website for SQLServer and MySQL

I hope this helps,

Cor
Jan 3 '06 #5
dgk
On Tue, 3 Jan 2006 17:14:22 +0100, "Cor Ligthert [MVP]"
<no************@planet.nl> wrote:
dgk,

A search in this newsgroup will surely give you this link, as well has Paul
Clement written a lot about this.

http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8

The same kind of samples are on our website for SQLServer and MySQL

I hope this helps,

Cor

Yes, that's the one. You had posted it two years ago. Still, what's
the downside of creating a dataset in memory? My thought is to check
if it's on disk at startup, create it if not, and serialize it as the
app is shut down. I think that there's even an option to serialize it
in a binary format now but XML would be sufficient. All I need are a
few tables and if there are even a hundred rows for any of them I will
be (happily) surprised.

It's kind of like having a database without any database software at
all. No versioning problems, no deployment issues. It won't work for
anyone needing even a two user app, but for a single user app it
should work.

Of course, I can't use Access to look at it in a pinch. But maybe I
can. Access can probably import a database from XML, and if not, it
should be able to.
Jan 3 '06 #6
well if it is a small amount of data

you could also create the stuff as a object database and just serialize
and deserialize it to disk on startup and shutdown of your app

or just throw everything in a dataset and retrieve and store it to XML

regards

Michel Posseth [MCP]
"dgk" <dg*@somewhere.com> schreef in bericht
news:hk********************************@4ax.com...
On Tue, 3 Jan 2006 17:14:22 +0100, "Cor Ligthert [MVP]"
<no************@planet.nl> wrote:
dgk,

A search in this newsgroup will surely give you this link, as well has
Paul
Clement written a lot about this.

http://www.vb-tips.com/default.aspx?...1-d6dda3c888c8

The same kind of samples are on our website for SQLServer and MySQL

I hope this helps,

Cor

Yes, that's the one. You had posted it two years ago. Still, what's
the downside of creating a dataset in memory? My thought is to check
if it's on disk at startup, create it if not, and serialize it as the
app is shut down. I think that there's even an option to serialize it
in a binary format now but XML would be sufficient. All I need are a
few tables and if there are even a hundred rows for any of them I will
be (happily) surprised.

It's kind of like having a database without any database software at
all. No versioning problems, no deployment issues. It won't work for
anyone needing even a two user app, but for a single user app it
should work.

Of course, I can't use Access to look at it in a pinch. But maybe I
can. Access can probably import a database from XML, and if not, it
should be able to.

Jan 3 '06 #7
Hi,

I think you should take a look at
http://bbooprevalence.sourceforge.net.

I've been using it for some projects and I'm very happy with the
results. It's pretty simple, efficient, and you won't have all the
problems with Object-Relational mapping.

Juliano

Jan 3 '06 #8
DGK,
Of course, I can't use Access to look at it in a pinch. But maybe I
can. Access can probably import a database from XML, and if not, it
should be able to.


For the single user database as you want probably nothing.

Be aware that you keep good track that you only delete an XML file when you
are sure that it is good written. (Not overwrite it, however by instance
first rename it, write it and after that delete the renamed file)

If it becomes really huge, than it will probably will need to much reading
and writing time.

In the samples on our website is probably one that fits. By instance the one
about the images, that covers without that safe storing I talk about above
probably your question.

http://www.vb-tips.com/default.aspx?...6-38b5a2f7fdf0

Cor
Jan 3 '06 #9
dgk
On Tue, 3 Jan 2006 19:38:59 +0100, "Cor Ligthert [MVP]"
<no************@planet.nl> wrote:
DGK,
Of course, I can't use Access to look at it in a pinch. But maybe I
can. Access can probably import a database from XML, and if not, it
should be able to.


For the single user database as you want probably nothing.

Be aware that you keep good track that you only delete an XML file when you
are sure that it is good written. (Not overwrite it, however by instance
first rename it, write it and after that delete the renamed file)

If it becomes really huge, than it will probably will need to much reading
and writing time.

In the samples on our website is probably one that fits. By instance the one
about the images, that covers without that safe storing I talk about above
probably your question.

http://www.vb-tips.com/default.aspx?...6-38b5a2f7fdf0

Cor

It won't get that huge.

I knew I did this before. Here's creating the DB:

Dim RSdb As DataSet
RSdb = New DataSet("RSData")
' Manufacturers Table
Dim RSTB_Man As DataTable = RSdb.Tables.Add("Manufacturers")
Dim ManCol As DataColumn = RSTB_Man.Columns.Add("PriKey",
Type.GetType("System.Int32"))
RSTB_Man.PrimaryKey = New DataColumn() {ManCol}
RSTB_Man.Columns("PriKey").AutoIncrement = True
RSTB_Man.Columns.Add("Name", Type.GetType("System.String"))
RSTB_Man.Columns("Name").MaxLength = 40
RSTB_Man.Columns.Add("ContactURL",
Type.GetType("System.String"))
RSTB_Man.Columns("ContactURL").MaxLength = 60
RSTB_Man.Columns.Add("ContactPhone",
Type.GetType("System.String"))
RSTB_Man.Columns("ContactPhone").MaxLength = 20
' Vendors Table
Dim RSTB_Vendors As DataTable = RSdb.Tables.Add("Vendors")
Dim VenCol As DataColumn = RSTB_Vendors.Columns.Add("PriKey",
Type.GetType("System.Int32"))
RSTB_Vendors.PrimaryKey = New DataColumn() {VenCol}
RSTB_Vendors.Columns("PriKey").AutoIncrement = True
RSTB_Vendors.Columns.Add("Name",
Type.GetType("System.String"))
RSTB_Vendors.Columns("Name").MaxLength = 40
RSTB_Vendors.Columns.Add("ContactURL",
Type.GetType("System.String"))
RSTB_Vendors.Columns("ContactURL").MaxLength = 60
RSTB_Vendors.Columns.Add("ContactPhone",
Type.GetType("System.String"))
RSTB_Vendors.Columns("ContactPhone").MaxLength = 20

Add a little data:

Dim MyMan As System.Data.DataTable =
RSdb.Tables("Manufacturers")
Dim ManRow As System.Data.DataRow = MyMan.NewRow
ManRow("Name") = "Linksys"
MyMan.Rows.Add(ManRow)
ManRow = MyMan.NewRow
ManRow("Name") = "Belkin"
MyMan.Rows.Add(ManRow)

Save it to disk when done - but do save previous version first!:

Try
Dim MyPath As String = AppPath
If MyPath.Length > 0 And Not MyPath.EndsWith("\") Then
MyPath += "\"
End If
db.WriteXml(MyPath & "RSData.xml",
XmlWriteMode.WriteSchema)
Catch Badthing As Exception
MessageBox.Show("Failed to save dataset: " &
Badthing.Message, "Save Error", MessageBoxButtons.OK,
MessageBoxIcon.Warning)
End Try

And of course, read it in next time:

RSdb = New DataSet ' better instantiate it first
RSdb.ReadXml(MyPath & "RSData.xml", XmlReadMode.ReadSchema)
Jan 3 '06 #10
dgk
On 3 Jan 2006 09:53:07 -0800, "Juliano" <ju***************@gmail.com>
wrote:
Hi,

I think you should take a look at
http://bbooprevalence.sourceforge.net.

I've been using it for some projects and I'm very happy with the
results. It's pretty simple, efficient, and you won't have all the
problems with Object-Relational mapping.

Juliano


It requires a Java runtime. I remember folks used to laugh at VB
because it required a runtime. Now all the good languages are wearing
one. However, I would like to avoid having my customers install Java
just for my benefit.

Also, compared to even something like Access, Prevalence is WAY
overkill for my project. I don't want to use SQL Express because I
don't want to have their machines running SQL all the time just to use
my app for fifteen minutes a week. I sure don't see a need to have the
data in memory all the time that their machine is up. RAM may be cheap
but most folks don't have enough as it is and anything that sits in
memory is chewing up cpu cycles as well.

This is a very interesting product and way of thinking about data, but
it doesn't meet my requirements. Also, there is a cuteness factor that
strikes me the wrong way, and I really don't take too much very
seriously. The whole site is filled with cute and/or sarcastic
language and it gets tiresome quickly. It isn't just me; in one of the
FAQs someone else complained about that and got, naturally, a
sarcastic answer. I think that it's counterproductive because it is an
interesting idea.

I think I go with plain old XML or Access for my app but thanks for
the pointer and I'll keep it in mind for something more appropriate.
Jan 3 '06 #11
"dgk" <dg*@somewhere.com> wrote in message
news:53********************************@4ax.com...
I'm planning on writing a fairly small app (VB2005) to be distributed
via shareware that needs a single user database. I don't even think
that SQL Server Express edition is needed since I think that it is
essentially a true DB that runs all the time.


I was under the impression that the new SQL Server Express did NOT run all
time. Isn't this one of it's major new features? It can load the database
into memory only when the app calls for it. And similarly releases it when
done.

Trying to find some links about this...

Greg
Jan 4 '06 #12

"Greg Burns" <bl*******@newsgroups.nospam> wrote in message
news:Ow*************@TK2MSFTNGP09.phx.gbl...
I was under the impression that the new SQL Server Express did NOT run all
time. Isn't this one of it's major new features? It can load the database
into memory only when the app calls for it. And similarly releases it
when done.


So it seems.

Jan 4 '06 #13

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

Similar topics

23
by: darwinist | last post by:
What PHP Represents There is no shortage of complaints one could make about php as a language, and although the list does shrink with each release, some of them are inherent to the origins and...
21
by: godwin | last post by:
Hi all, I wanna thank Martin for helping out with my ignorance concerning execution of stored procedure with python. Now i have decided to write a web app that googles into my companies...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
7
by: Tony Williams | last post by:
What does normalisation mean in relation to an Access database? I have posted a question on a couple of groups and people have suggested this. How do I do it? TIA Tony Williams
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
6
by: Mudcat | last post by:
Hi, I am trying to build a tool that analyzes stock data. Therefore I am going to download and store quite a vast amount of it. Just for a general number - assuming there are about 7000 listed...
34
by: emrahayanoglu | last post by:
Hello Everyone, Now, I'm working on a new web framework. I tried many test on the other programming languages. Then i decided to use python on my web framework project. Now i want to listen...
11
by: Paul Brady | last post by:
Apparently, I have been living on the wrong planet. I have written 15 databases in Microsoft Access in the past 10 years, some of which are split, one uses ODBC interface with a SQL server, one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.