dbTalk Databases Forums  

ODBC: Is there something called text/csv database?

comp.databases comp.databases


Discuss ODBC: Is there something called text/csv database? in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Public Interest
 
Posts: n/a

Default ODBC: Is there something called text/csv database? - 12-19-2003 , 09:43 AM






As I open "driver" for ODBC, there is something called "Microsoft Text
Driver (*.txt; *.csv)"

Ok, I understand that a .csv is, but I don't understand how ODBC will run
SQL on a .csv.

Perl has something called DBI which means it is database independent. Can I
assume that ODBC/DBI is an interface to MySQL, Access, and CSV? Then will
DBI act the same regardless what it connects to (Text, CSV, MySQL). If so
then there is no difference between any database systems. If not so, if I
use the driver for text database, what limitations will I have? Such as can
I specify "integer, string, binary" etc for each field. How I can add
line...

Can I get a reference for all commands I can use for each database driver
under ODBC/PerlDBI?

By the way, do I connect PerlDBI to ODBC or DBI can replace ODBC?

Thank you.




Reply With Quote
  #2  
Old   
Joe \Nuke Me Xemu\ Foster
 
Posts: n/a

Default Re: Is there something called text/csv database? - 12-19-2003 , 10:42 AM






"Public Interest" <test (AT) test (DOT) com> wrote


Quote:
As I open "driver" for ODBC, there is something called "Microsoft Text
Driver (*.txt; *.csv)"

Ok, I understand that a .csv is, but I don't understand how ODBC will run
SQL on a .csv.
Pretend those .CSVs are unindexed old-school .DBFs, but slower.
Just about any operation besides SELECT and INSERT will require
rewriting at least one entire .CSV file. The ODBC driver will
have to contain an entire SQL engine, but sometimes that has to
be done anyway when there's no easy mapping from ODBC 'SQL' to
some DBMS' own proprietary 'SQL' mutant.

--
Joe Foster <mailto:jlfoster%40znet.com> Sacrament R2-45 <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!




Reply With Quote
  #3  
Old   
Ed prochak
 
Posts: n/a

Default Re: ODBC: Is there something called text/csv database? - 12-19-2003 , 01:25 PM



"Public Interest" <test (AT) test (DOT) com> wrote

Quote:
As I open "driver" for ODBC, there is something called "Microsoft Text
Driver (*.txt; *.csv)"

Ok, I understand that a .csv is, but I don't understand how ODBC will run
SQL on a .csv.

Perl has something called DBI which means it is database independent. Can I
assume that ODBC/DBI is an interface to MySQL, Access, and CSV? Then will
DBI act the same regardless what it connects to (Text, CSV, MySQL). If so
then there is no difference between any database systems. If not so, if I
use the driver for text database, what limitations will I have? Such as can
I specify "integer, string, binary" etc for each field. How I can add
line...

Can I get a reference for all commands I can use for each database driver
under ODBC/PerlDBI?

By the way, do I connect PerlDBI to ODBC or DBI can replace ODBC?

Thank you.

I cannot speak about ODBC, but PERL DBI is documented in
programming the PERL DBI, O'Reilly books,
by Alligator Descartes and Tim Bunce

You can also visit the PERL web site at cpan.org
(the Comprehensive Perl Archive Network)

HTH,
Ed


Reply With Quote
  #4  
Old   
Jay Tilton
 
Posts: n/a

Default Re: ODBC: Is there something called text/csv database? - 12-19-2003 , 08:26 PM



"Public Interest" <test (AT) test (DOT) com> wrote:

: As I open "driver" for ODBC, there is something called "Microsoft Text
: Driver (*.txt; *.csv)"
:
: Ok, I understand that a .csv is, but I don't understand how ODBC will run
: SQL on a .csv.

You shouldn't care. It's the ODBC server's problem.

: Perl has something called DBI which means it is database independent. Can I
: assume that ODBC/DBI is an interface to MySQL, Access, and CSV?

Close. Mentioning "ODBC/DBI" in one breath like that suggests that the two
are related. They are not. Perl's DBI class and the ODBC server are two
separate layers between your Perl program and the physical data, and are in
no way interchangeable.

You will need to obtain the DBD::ODBC module from CPAN before the DBI class
can do anything with the ODBC server.

: Then will DBI act the same regardless what it connects to (Text, CSV,
: MySQL). If so then there is no difference between any database systems.

As much as Perl is concerned, there are no differences. The point of DBI
is to remove the burden of worrying about how all the underlying layers of
machinery accomplish the task. You tell the appropriate DBI object what to
do, it tells ODBC, and the rest is left for the server to worry about.

: If not so, if I
: use the driver for text database, what limitations will I have?

It will be very much slower than the other choices.

: Such as can I specify "integer, string, binary" etc for each field.

The format of the text file is determined by using a schema.ini file.
Details of its creation and contents are squirrelled away in one of the
ODBC help files.

: Can I get a reference for all commands I can use for each database driver
: under ODBC/PerlDBI?

ODBC help files are included with the ODBC installation.
Documentation for Perl's DBI class is included in the DBI.pm module:
type "perldoc DBI" at a command prompt.


Reply With Quote
  #5  
Old   
Jim Gibson
 
Posts: n/a

Default Re: ODBC: Is there something called text/csv database? - 12-22-2003 , 01:07 PM



In article
<i9PEb.494877$0v4.21605097 (AT) bgtnsc04-news (DOT) ops.worldnet.att.net>, Social
Liberal-Fiscal Conservative <test (AT) test (DOT) com> wrote:

Quote:
How to check what module I have installed? I did perldoc dbi, but nothing
found.


Case may be significant for module names, although it is not in my
version (5.8.2). Try "perldoc DBI". If you get nothing, chances are you
don't have it installed.

Your second question is an FAQ. Try "perldoc -q modules".


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.