Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 DB question
Index -> Programming, Python -> Python Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Leela




PostPosted: Fri May 08, 2009 4:27 pm   Post subject: DB question

Hi everyone!
I need help figuring out how to open a database file. I have created a .db file with Python's module 'anydbm'. It does not want to open on my computer, although I can open it, see the contents of it from my Python shell, as well as update it, whenever I want. Can someone tell why this might be happening? Do I need a special software to open db files?
Huge thanks!
Sponsor
Sponsor
Sponsor
sponsor
jbking




PostPosted: Fri May 08, 2009 5:29 pm   Post subject: Re: DB question

The simple answer is that your computer likely doesn't have an application mapped to that file extension would be the simple answer. You do need software that can read the file and understand how the data is structured.

"What are DBM Files" contains some more details on what the acronym means as a little digging into 'anydbm' suggests that it uses this structure.
Leela




PostPosted: Fri May 08, 2009 5:49 pm   Post subject: Re: DB question

jbking @ Fri May 08, 2009 5:29 pm wrote:
The simple answer is that your computer likely doesn't have an application mapped to that file extension would be the simple answer. You do need software that can read the file and understand how the data is structured.

"What are DBM Files" contains some more details on what the acronym means as a little digging into 'anydbm' suggests that it uses this structure.

Thanks! How can I find out what software do I need to open the file? Is it supposed to have a GUI on its own or will the GUI be supplied by the program that opens the file?
jbking




PostPosted: Fri May 08, 2009 11:57 pm   Post subject: Re: DB question

From that link I posted earlier about that DBM file format:

    DBM is an acronym which stands for Data Base Management

    A DBM file is simply a binary database of key-value pairs

    Perl enables you to "bind" an associative array variable to a DBM file using the dbmopen() function

    The contents of the DBM file may then be manipulated by simply referencing or assigning to the associative array variable!


So, you could use Perl to open it if you'd prefer another way to read the data. DBM Files and the BerkeleyDatabase Manager has some other tips if you want that reference.

As for whether or not that program comes with a GUI, that depends a lot on what you are using to open it and what options it may have. Some tools like grep may not necessarily have a GUI as the program may run off a command line and not really use a "point and click" interface. I would guess that there are more than a few tools that can run Perl scripts so running that in a command line is one idea.
Tony




PostPosted: Fri May 08, 2009 11:59 pm   Post subject: RE:DB question

or use the actual DBMS and SQL. Just about the only useful part of any GUI is an textfield to type the SQL into anyway.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Python -> Python Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: