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:
  #1  
Old March 17th, 2008, 08: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, 08: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,753 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 8 h 15 m 54 sec
Reputation Power: 7
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, 08: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, 09: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,753 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 8 h 15 m 54 sec
Reputation Power: 7
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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek