どういうケースにおいてテキストファイルでDBを構築するのがいいのかを考えてみたいと思います。
テキストファイルの特徴を挙げてみます。
こうしたことを踏まえ、実際にテキストファイルをDBとして扱っている事例を題材に、その適否を考察してみたいと思います。
会計ソフトが吐き出す各種のテキストファイルを加工してDBにするというのがあります。例えば毎月のBSやPL、キャッシュフローデータなど。これらは何のために吐き出すのかというと、レポートを作ったり分析をしてみたいからです。
会計ソフトのデータに直接アクセスできれば一番いいのですが、それはできないことの方が多いでしょう。したがって、自分たちの目的に適ったデータを出力させデータベースとするニーズが出てくるわけです。
しかしながら、自分たちの目的というのは、データの推移に意味があるのではないか、何かが言えないかといった『気まぐれの分析願望』であったり、言い訳資料、成果のアピールとしてこうした表がほしいといった『気まぐれの誇示欲求』であったり、会計ソフトが提供している帳票が細かすぎて見にくいので、少しだけすっきりさせたいという『ちょっとした工夫の欲求』であったりと、要するに本気で気合を入れてDBを構築するほどではないわけです。
もちろん、そうしたちょっとしたニーズが長年蓄積されて、定型的な月次報告様式や財務分析手法が確立され、それに適したデータベースを構築することにもなるわけですが、往々にして定型といいながらも月日の経過とともに随分変化してしまうものです。
結局、もととなる会計データベースを構築するわけではなく、そこから吐き出されるデータを、後に分析、加工しやすいように一時保管するというのがこの場合のDB構築の目的といえるでしょうから、こうした場合はテキストファイルでDBを構築するのに向いているのではないかと考えるわけです(手前味噌ですが)。
ただし、データの規模が膨大であったり、SQLの多用を想定しているのであれば、リレーショナルデータベースの構築を検討した方がいい場合があるかもしれません。
もうひとつの例として、例えば勤怠管理において、未承認データをテキストファイルで保持しておく場合があります。承認前のデータは各自がテキストファイルで作成し、承認後、DBへの登録は特定の権限を付与されたものが行ないます。
いきなり、未承認の段階で各自がDBに書き込みに行った場合、承認前なのかどうかの管理が複雑ですし、承認後に各自が書き換えられないような仕掛けを作るのも大変です。また、データベースへのアクセスが集中してしまうという問題も生じます。この点、各自別々にテキストファイルを作成する場合、アクセスの集中は回避できます。
他には、データの一時バックアップとしてテキストファイルを使ったり、他のアプリケーションで使うための一時的な中間ファイルとしてテキストファイルを使うということが考えられます。
こうしてみてみると、結局、テキストファイルは、その作成上の容易さ、高速さという武器を活かした、一時的、中間的データの保存に用いるのが良いように思います。
Forget not that the world enjoys to sense your bare feet and the winds long to play with your hair.
投稿者: Helma at 2011年07月23日 11:45That is the right blog for anyone who needs to find out about this topic. You understand a lot its almost exhausting to argue with you (not that I really would want…HaHa). You positively put a brand new spin on a topic thats been written about for years. Nice stuff, just great!
投稿者: Angie Varona at 2011年07月23日 23:45Your house is valueble for me. Thanks!…
投稿者: Mascara Hints at 2011年07月24日 01:38Spot on with this write-up, I truly think this website needs rather more consideration. I’ll most likely be again to learn rather more, thanks for that info.
投稿者: Bitcoin at 2011年07月24日 08:01Good post. I learn something more challenging on totally different blogs everyday. It'll at all times be stimulating to read content from other writers and follow somewhat something from their store. I’d desire to use some with the content on my weblog whether or not you don’t mind. Natually I’ll offer you a link on your web blog. Thanks for sharing.
投稿者: Attention Deficit Disorder Symptoms at 2011年07月24日 19:15Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx
投稿者: best cinema at 2011年07月25日 00:15Hey There. I found your blog using msn. This is an extremely well written article. I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.
投稿者: Pattaya Thailand at 2011年07月25日 00:34Hi there Fella, What you ˙came up with here greatly have me interested up to the last word, and I must say to you I am not the guy who finish the full length post of blogs because I often got sick and tired of the BS that is presented in the junkyard of the world wide web on a daily basis and I simply end up checking out the headlines and maybe the first lines and so on. But your tag-line and the first few rows were so cool and it immediately forced me to stay. I definitely wanna see more. Thanks, really.
投稿者: Endre at 2011年07月25日 01:33There are some interesting closing dates in this article however I don’t know if I see all of them heart to heart. There is some validity however I'll take hold opinion till I look into it further. Good article , thanks and we would like more! Added to FeedBurner as properly
投稿者: Real Estate Agents Richmond at 2011年07月25日 16:31I found your weblog website on google and check a few of your early posts. Proceed to maintain up the very good operate. I simply additional up your RSS feed to my MSN Information Reader. Looking for forward to studying extra from you afterward!…
投稿者: best drugstore mascara at 2011年07月26日 08:44