f



databases from unix shell

My name is uday kiran and i am student who
completed M.Tech in cs. Currently i am in bangalore
i am having some doubts in unix and c++
and i request u to clarif my doubts .


1) How can we call database querys and connect to
database from unix shell programming . Can this be
possible. if so how . This question is asked in
many interviews . I am not able to find out the
answer any where . So please tell me some ways of
accessing database from unix shell scripting .


2) Sir how can we access database from c and c++
.. This is also asked in interviews .


can u suggest me some good books regarding
accessing database and querying database from c.c++
and unix shell programming directly . Also please
suggest me some good websites where we can get the
above information . Also can u tell me good books
and sites over advanced shell programming.
r u handling any training programs over unix
programing sir. If so send me the details .


This will be very useful for my interviwes . so i
request u to clear my doubts .
Thanking you,
Your's Sincerly,
uday kiran

0
uday
8/13/2004 7:45:40 AM
comp.unix.shell 15484 articles. 2 followers. Post Follow

4 Replies
454 Views

Similar Articles

[PageSpeed] 56

"uday" <kariudaykiran@yahoo.co.in> wrote in message news:<cfhrj4$bqa@odak26.prod.google.com>...
> My name is uday kiran and i am student who
> completed M.Tech in cs. Currently i am in bangalore
> i am having some doubts in unix and c++
> and i request u to clarif my doubts .
> 
> 
> 1) How can we call database querys and connect to
> database from unix shell programming . Can this be

You have a Master of Technology degree in computer science and you do
not know this stuff? And you are not able to find answers at
www.google.com? Which University gave you the M. Tech? And how much
did you have to pay for it?

Shells do not have built-in facilities for accessing most databases.
For database access from Shell, try using Perl with modules such as
DBI and DBD. See

http://cpan.uwinnipeg.ca/chapter/Database_Interfaces
www.cpan.org

For C and C++ database interfacing, look into ODBC. Or go to Oracle,
Sybase and other vendor sites. For example, Oracle database can be
accessed from C++ via the Oracle Call Interface:
http://www.orafaq.com/faqoci.htm.

MySQL is a free and powerful relational database that you can learn
on. Check:

http://www.hk8.org/old_web/linux/sql/index.htm
http://dev.mysql.com/
0
shahswim
8/13/2004 6:18:50 PM
"uday" <kariudaykiran@yahoo.co.in> writes:

> 1) How can we call database querys and connect to
> database from unix shell programming . 

It's depends upon the database. 
Since you are looking for a job, nothing is better than experience.
Why not install a free DB on a Linux system, and read the manual?
Then play around...

google search for "oracle UNIX"
search for "mysql UNIX"
etc.


-- 
Sending unsolicited commercial e-mail to this account incurs a fee of 
$500 per message, and acknowledges the legality of this contract.
0
Bruce
8/13/2004 6:19:50 PM
swim learning <shahswim@yahoo.com> wrote:
> "uday" <kariudaykiran@yahoo.co.in> wrote in message news:<cfhrj4$bqa@odak26.prod.google.com>...
> > My name is uday kiran and i am student who
> > completed M.Tech in cs. Currently i am in bangalore
> > i am having some doubts in unix and c++
> > and i request u to clarif my doubts .
> > 
> > 
> > 1) How can we call database querys and connect to
> > database from unix shell programming . Can this be
> 
> You have a Master of Technology degree in computer science and you do
> not know this stuff? And you are not able to find answers at
> www.google.com? Which University gave you the M. Tech? And how much
> did you have to pay for it?
> 
> Shells do not have built-in facilities for accessing most databases.

Not quite correct.
    http://freshmeat.net/projects/bashdiff/
is patch to Bash with interface to MySQL and PostgreSQL.  It's not a
replacement to 'mysql' and 'psql', but it provides more direct
interface without having to parse/re-parse stdin/stdout.


> For database access from Shell, try using Perl with modules such as
> DBI and DBD. See
> 
> http://cpan.uwinnipeg.ca/chapter/Database_Interfaces
> www.cpan.org
> 
> For C and C++ database interfacing, look into ODBC. Or go to Oracle,
> Sybase and other vendor sites. For example, Oracle database can be
> accessed from C++ via the Oracle Call Interface:
> http://www.orafaq.com/faqoci.htm.
> 
> MySQL is a free and powerful relational database that you can learn
> on. Check:
> 
> http://www.hk8.org/old_web/linux/sql/index.htm
> http://dev.mysql.com/

Also, PostgreSQL at http://www.postgres.org/

-- 
William Park <opengeometry@yahoo.ca>
Open Geometry Consulting, Toronto, Canada
0
William
8/13/2004 6:41:04 PM
William Park <opengeometry@yahoo.ca> wrote in message news:<2o4g9vF6qbhoU1@uni-berlin.de>...
> swim learning <shahswim@yahoo.com> wrote:
> > "uday" <kariudaykiran@yahoo.co.in> wrote in message news:<cfhrj4$bqa@odak26.prod.google.com>...
> > > My name is uday kiran and i am student who
> > > completed M.Tech in cs. Currently i am in bangalore
> > > i am having some doubts in unix and c++
> > > and i request u to clarif my doubts .
> > > 
> > 
> > You have a Master of Technology degree in computer science and you do
> > not know this stuff? And you are not able to find answers at
> > www.google.com? Which University gave you the M. Tech? And how much
> > did you have to pay for it?
> > 
> > Shells do not have built-in facilities for accessing most databases.
> 
> Not quite correct.
>     http://freshmeat.net/projects/bashdiff/
> is patch to Bash with interface to MySQL and PostgreSQL.  It's not a
> replacement to 'mysql' and 'psql', but it provides more direct
> interface without having to parse/re-parse stdin/stdout.

As a side note, there is an old bourne and Korn shell implementation
of an SQL database at:

Bourne Shell: http://members.tripod.com/~dfrench/shql-1.3.shar.txt
Korn Shell: http://members.tripod.com/~dfrench/kshsql.txt

These are actual SQL databases written in Bourne and Korn shell.  They
are not really very useful, but interesting.

--------------------------------------------------------
Dana French                            dfrench@mtxia.com
Mt Xia Technical Consulting Group   http://www.mtxia.com
100% Spam Free Email              http://www.ridmail.com
MicroEmacs                      http://uemacs.tripod.com
Korn Shell Web     http://dfrench.tripod.com/kshweb.html
0
dfrench
8/13/2004 10:28:29 PM
Reply: