what is difference between installing sqlite3 and making .sqlite file? - database

I'm trying to learn apollo and following the docs and this documentation using sqlite to show how to connect local database to server.
i didn't install sqlite3 but the .sqlite file is in given source.
Even though it was out of the lecture but i got curious how this works though i didn't install it.
i have searched to find why it works and what is difference between these but i couldn't find it so i reached here to ask question about what are the differences and what is better to use.
Thanks!

SQLite is a library extensively used in different programming languages like python, javascript, php etc. This library is made using C-language which implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. ".sqlite" is a database file which contains all the data stored. This file can be made by executing some code based on syntax of that particular language. For you to work on SQLite, you need to have installed it on your local machine.

Related

How do I play with Lynda etc. Postgres example files on MAMP without screwing up my current local environment? (beginner here)

So my company installed PostgreSQL on my computer, which I use, rarely and without understanding, for one specific function.
I'm trying to follow Lynda etc. tutorials to understand (Postgres)SQL better, since that's what we use, but all the tutorials ask students to reconfigure certain aspects of their system in order to follow along with example files (which I would really like to do).
Since I've messed up my dev env once already, I'm hesitant to touch anything that will cause issues with the local versions of our project.
I know this is an extremely wide-angle question with no easy answer, but if anyone has any general advice for playing with sample databases in MAMP Pro (or anywhere else) using Postgres without interfering with the servers I'm currently running, it would be a huge help.
i would recommend you use Vagrant and set up a isolated postgresql instance. Here is a great wiki you can follow to do this.
UPDATE: Given your comment,An easy solution is to just backup your data and proceed trying out the the Postgres examples you can always restore your data after you are done..

How can I create a data base management system?

I have to create a data base management system as a project for the school but I don't know how to. It doesn't have to be very sophisticated. Is there any tutorial that shows how to do it? And, what would be the most appropriate language to do that?
Do you need to actually build a database engine? Or do you need to use a database engine to create a database that you write a program to use?
Without knowing exactly what you're after, for the latter, I'd recommend you get ahold of the MAMP (on Mac) or WAMP (on Windows) stacks. this gives you Apache, MySql, and PHP on top of your favorite OS. Following google threads on those topics should lead you to plenty of examples.
If you have to actually build a database engine... well, here's another SO question that might help: Simple Database Implementation for Educational Purpose. Also, you might search through Github for open source examples.
Good luck!
I suggest this repository:
Prerequisites :
Good understanding of algorithms & dynamic data structures like trees - B-trees.. (it's all about structuring data and handling it using optimized algorithms's implementation)
Proficiency with C programming language ( pointers , structures-unions-typedef..) .

Legacy File Schema - Reverse Engineering

I'm currently in the process of converting over 20k database tables from Corel Paradox 4.0 format (DOS Based, with a .db extension) to SQL databases, and rather than using off the shelf software, I'm currently looking into using a light scripting language like Python (or Ruby or PHP, but Python is ideal since I'm working on a Windows desktop setup -- although I could boot one of my Linux VM's for development if needed) for me to write a set of code to simply pull all the .db files in a directory and output a set of .sql databases in just one click.
Now while I know PHP has a limited library built to specifically handle Paradox files, when it comes to Python, Ruby, and other languages I haven't had much luck.
My question now is, when it comes to writing a script to convert formats, how do I go about defining the syntax of the file to be inputted? For example, when it comes to .exe, .zip, .msi, and so on, is there a single format/syntax published for developers to follow, and if so, what are the most comprehensive/solid sources to check?
I currently have a copy of Paradox for Windows which I can use to view the fields and tables, but that isn't helping me with my scripts as it only shows a high-level overview.
Thanks very much for any information,
Why do not you want to use already existing software? For example, a quick googling yielded this toolset (I do not have Paradox databases to test, but it seems to compile correctly).

There is a PL/pgSQL free environment to develop for PostgreSQL?

I want to know if there is a free environment to develop in PL/pgSQL.
Writing the code in Notepad++, replacing the function and running it turns the process slow. I'm using pgAdmin(only to replace and run the procedure) at the moment, but this is not what I want.
I know that there is one similar question here, but this is not duplicated. All the tools to develop are paid, I want to know if there is one free.
I am very happy with following environment.
I use a programmer editor like geany or similar and I edit a file with functions - I put related functions to one file - this is similar to modules from other environments.
I don't use a copy to pgAdmin - it is terrible work - and I don't think so pgAdmin is good tool for editing and maintaining more functions - it is good for ad hoc changes. The editor is not strong - it is simply, and you can't use a usual tools like git, cvs, .. More - you cannot to organize a related functions to one entity.
If I have a one or two files, then I have a opened console, and just import a file to postgres via \i command. If I have a more larger and complex project I use a makefiles - so it automatically import only modified and depended files. This is very good and very effective when you have a project with more then one hundred functions.
If you are looking for a debugger, check http://pgfoundry.org/projects/edb-debugger/ that can be included in pgAdmin. I have never seen any other tool that can debug plpgsql, only pgAdmin.
I had similar question and guys recommended me Toad Extension for Eclipse. You can see the discussion here: Development oriented PostgreSQL IDE

Zend Framework: Getting started using SQLite

Sorry if this is overly simplistic.
I've decided that I want to use an SQLite database instead of a MySQL database. I'm trying to wrap my head around how simple SQLite is and would like a simple, one answer tutorial on how to use SQLite with the Zend Framework, where to put my SQLite database in my directory structure, how to create the database, etc.
#tuinstoel is correct, attaching to an SQLite database implicitly creates it if it does not exist.
SQLite also supports a command-line client that is more or less like MySQL's command shell, allowing you to issue ad hoc commands or run SQL scripts. See documentation here: http://www.sqlite.org/sqlite.html
Of course you need to change the Zend_Db adapter in your ZF application. ZF supports only an adapter to the PDO SQLite extension. SQLite doesn't support user/password credentials. Also since SQLite is an embedded database instead of client/server, the "host" parameter is meaningless.
$db = Zend_Db::factory("pdo_sqlite", array("dbname"=>"/path/to/mydatabase.db"));
One more caveat: when you get query results in associative-array format, some versions of SQLite insist on using "tablename.columnname" as the keys in the array, whereas other brands of database return keys as simply "columnname". There's an outstanding bug in ZF about this, to try to compensate and make SQLite behave consistently with the other adapters, but the bug is unresolved.
If you make a connection to a not existing database, a database is created on the fly. (You can turn this behavour off)
This is now covered in the Zend Framework quickstart tutorial (version 1.9.5 as of this writing). Just make a new project (with zf command line tool. look here for a great tutorial on setting it up), add these lines to your config.ini file and you're good to go:
; application/configs/application.ini
[production]
resources.db.adapter = "PDO_SQLITE"
resources.db.params.dbname = APPLICATION_PATH "/../data/db/databaseName.db"
Now when you ask for your default database adapter, it will use this one. I would also recommend downloading the quickstart tutorial source code and making use of the load.sqlite.php script. You can create a schema and data file and load the database with these tables/columns/values. It's very helpful! Just check out the tutorial. It's all in there.
This answer was moved out of the question into a CW answer to disavow ownership over the content.

Resources