Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Can SQL be used without a database?by chimni (Pilgrim) |
on Dec 31, 2003 at 04:47 UTC ( [id://317830]=note: print w/replies, xml ) | Need Help?? |
If you are into small scale,rapid application development then SQLite is definately the thing for you. So what all do you need to get started with an SQLite driven application? 1. Install the DBI (1.39 was the latest last i checked) 2. Install DBD::SQLite (0.29) 3. Install the dbish (11.93) As jeffa has shown in his examples above ,you can use a script to create a table . The other way to do this is too run /opt/perl5/bin/dbish This gives you a shell interface to your database. Make a file to hold your records e.g touch /record.db After running the dbish choose the option to connect to the sqlite database (option 3). Then provide the dsn e.g. dbi:SQLite:/record.db Once you are connected to the db you can run your create,insert,delete,update commands. However,if you want to shift records from a flat file into a database it is advisable to write a script . An example of this is below: Flat file example
And the script to read it and insert records into a table
Hope this helps in your first attemp at using SLite. cheers chimni
In Section
Seekers of Perl Wisdom
|
|