|
|
If you're not clever enough to join the RANK s[^], you could try the DENSE_RANK s[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yup, and we hang out in HEAPs and CLUSTERS.
If it's not broken, fix it until it is
|
|
|
|
|
here we go....
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Databases do lots more than just store data. It's a centralized point for transactional data storage, modification and retrieval.
Try using some XML files in an enterprise environment. That's simply not going to work.
If you're just building some consumer app I'd say go for XML, as it saves you, and the consumer, all that trouble of installing a database.
On modern machines size really doesn't matter.
|
|
|
|
|
Even for a consumer app, it's not so cut and dried.
I'd put the XML / DB cutoff as a table complexity and INSERT / UPDATE / DELETE criteria myself. XML is text based, so frequent changes are going to mean a lot of file copying.
Even for mobile there is SQLCE or SqLite instead, both of which have a relatively small footprint.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
For me the question is not quite right.
I don't think row count, or class count should determine whether a database is used or not.
I think it's more a case of what you are going to do with the data.
If you think you may need to 'look' at the data occasionally, manipulate it or run some form of reports(statistics, counts, aggregation...) on the data than a database is the right choice even if you have as few as 100 rows.
If you are just reading in data that has already been 'cleaned' and all you are doing is transforming the data then perhaps a database is not necessary.
As others have mentioned there is no correct answer - whichever path you take there will be advantages and disadvantages.
My rule of thumb is not so much the volume of data, but what is going to happen to the data.
Regarding footprint - there are some databases which leave a reasonably small(suitably vague statement of the day...) footprint, particularly those where the database is structured as one file.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 16-Apr-15 3:35am.
|
|
|
|
|
10,000 is very low number to compare anything for performance.
When you compare XML / Flat file with database the only advantage you get is write performance and cheaper cost. Which is never a deciding factor for any application, whether its enterprise or consumer.
The things you can get with database and not with xml are:
- Concurrency (You can control if you have insert/update at the same time on your data)
- Transaction Reliability (You can go back to an older data/snapshot to correct a mistake)
- Backup (You can configure very efficient backup policy i.e. log shipping / replication which is not possible with XML)
- Partitioning (You can store data to different database/location based on region and then retrieve it easily)
- Archiving (Transfer data to archive in realtime and then access it in realtime with linked database)
- Security (fine grain control over who can access what)
- And the most important, Well Structured and Connected Data (makes complex query for different reports very easy)
So I would suggest you to use XML for intermediate stuff, or to store settings. but other than that don't waste your time and efforts. Just go with the RDBMS.
And for Mobile device to store offline stuff you can use XML / JSON Documents (JSON is better than XML). But at the end you should have a RDBMS server and Sync your offline data to it.
|
|
|
|
|
I'd go for XML with anything that is just a few lines, like configuration. If it contains a lot of relations, I'd switch to SQLite.
If multiple users are to access the datasource, it would also become a real database. I don't want to have to implement things like table-locking.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If you need any kind of concurrency it can quickly become messy with (xml)files.
|
|
|
|
|
It depends on the structure of the data.
For an example of why this is important, if look at the structure of CodeProject, as you should have before you posted, you will see that you have inserted a Message data item to the Lounge table, which is not where it belongs in the structure.
The effect of this is that stored procedures set up to resolve the type of problem in your Message object will not be able to find it with their pre-configured queries, so your problem will not be found, and will not be resolved.
The world will not end and civilisation will not collapse because of this (probably, but don't quote me if it happens), but it does demonstrate that if the data you have to handle has a complex structure, or many different branches, then storing it in large XML files, e.g. pages of the Lounge, is a pretty damned stupid thing to do.
... Almost as stupid as posting programming questions in the CP Lounge.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
wreckless wrote: Please enlighten me on the subject. Data Integrity
Jeremy Falcon
|
|
|
|
|
wreckless wrote: Just kidding about the rock stars
Good, 'cause anyone who thinks he's a rock star is actually just another hipster douchebag.
It's not about size. Others have pointed out some of the many concerns involved.
In short, XML is fine for configuration and reports, but not suitable for random access and multi-user access.
|
|
|
|
|
I knew I should have left the rock stars part out of it. I also learned it's not a good idea to ask a question when I've been drinking. It was just spontaneous combustion I guess. But what the heck, sh#t happens. (Like posting in the lounge, sorry bout that)
Lots of good answers here anyway, It looks to me like if it is simple keep it simple.
If it is complicated, keep it simple by using a database. That about sums it up.
But then again, how do you define simple? What simple for some may be Rock Science to others.
I guess it all depends on what is is?
wreckless
|
|
|
|
|
|
I think it's a good thing, as they're supposed to make sense to me.
And they often do, such as the free e-book on graph databases I have at this very moment on this page.
I can add that I make a point of not using any ad blocker as I believe in supporting CP.
But sometimes it just doesn't work as intended.
Like the other day, Russian mail order brides, well I can actually see how this is actually pretty well aimed at some of the people frequenting this site.
But can please someone explain to me how the clientele of this website is connected with ads for incontinence pads!
|
|
|
|
|
Jörgen Andersson wrote: incontinence pads!
Perhaps the relation is memory leakage.
|
|
|
|
|
Hmm I guess for some it is not a totally irrelevant subject, there are a bunch of old farts on this site, one of the more unpleasant aspects of becoming decrepit.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You better show some respect for us decrepit old farts, mr Holmes. There are a lot more of us than there is of you. And every one of us has no difficulty squeezing a trigger!
|
|
|
|
|
I originally wrote: Hmm I guess for some of us it is not a totally irrelevant subject So yeah it pisses me off as well.
Sorry couldn't resist
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It appears that at least some of weus old farts are still full of piss and vinegar...
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
modified 16-Apr-15 1:57am.
|
|
|
|
|
Jörgen Andersson wrote: please someone explain to me how the clientele of this website is connected with ads for incontinence pads!
well I can actually see how this is actually pretty well aimed at some of the people frequenting this site.
Any questions? Targeted ads are based on your browsing history.
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|
|
JimmyRopes wrote: Targeted ads are based on your browsing history. Exactly. It's always funny when people ask about the ads they see not realizing that they are tailored to their own experiences.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Have you seen Q&A?
It's nicest effect is to generate incontinence...
|
|
|
|
|
My add says "Splunk! What can you do with Splunk?"
To be honest, I'm not sure I want to know what that is and what I can do with it!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|