Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 17th, 2008, 07:57 AM
jackshepherd jackshepherd is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 2 jackshepherd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 59 sec
Reputation Power: 0
SQL or CSV?

Hi,

I've been asked to write a web front-end point-of-sale system for a company, that will take it's data (products, prices, stock levels etc) from a set of CSV files which will be produced by a back-end accounts package at regular intervals (say, every half an hour).

I am fairly confident writing SQL driven websites, and have worked with CSV files in a very limited way in the past, but I am unsure of how I should work this.

Is there any way I can regually import/export the data in the CSV files to/from a mySQL database, and then set up the web pages to query that, or should I just find a way to do the whole thing using the original CSV files?

If I use the CSV files won't I run into all sorts of problems re locking etc? Is it even possible to use the CSV files as the database? - there will be a lot of transactions, and I will need to be keeping track of stock levels across many stores, and from what I've always been lead to believe CSV probably isn't up to the job.

Any advice would be greatly appriciated.

Many thanks

Jack

Reply With Quote
  #2  
Old March 24th, 2008, 07:31 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
write a cron to take the csv files and use mysqlimport to load them into your DB. the InnoDB engine would probably be your best bet so you can do the imports in a transaction.
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
  #3  
Old March 24th, 2008, 07:39 AM
jackshepherd jackshepherd is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 2 jackshepherd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 59 sec
Reputation Power: 0
Thanks for your reply Liq. I had always wondered what cron jobs were- solves a lot of problems. I don't fully understand the second part though - how will InnoDB help me?

Again, thanks for your reply.

Jack

Reply With Quote
  #4  
Old March 24th, 2008, 08:09 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
cron jobs are scripts that run on a predefined schedule - once a minute, every 20 minutes, once a day every 3rd day and so on.

and InnoDB will help you by making the import part of a singular transaction so if there are any problems you can handle it and rerun the import. all to maintain your data integrity.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > SQL or CSV?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway