Is there a Perl ORM with database reverse engineering? - database

I’m looking for a Perl ORM library that has support for reverse engineering of the database schema. All I’ve found so far is
http://perlorm.sourceforge.net/
and it appears to have no reverse engineering support.

There is a list of recommended ORM modules at the P5P wiki.
Rose::DB::Object and DBIx::Class can generate classes for you from an existing database schema, and can also write them out to a set of Perl module files.
Rose::DB::Object::Loader
DBIx::Class::Schema::Loader

DBIx::Class has DBIx::Class::Schema::Loader which generates classes for you from an existing datbase and can also write them out to files. It it limited to loading a single schema though.

There are three commonly used ORMs in Perl, Class:DBI, DBIx::Class and Rose::DB::Object. According to this page at PerlMonks, they can all load the metadata from the database, but it doesn't say how.

Related

SQLite3 in Symfony3 without doctrine

Is there a specific way to use sqlite3 in symfony without using doctrine?
I just want to do basic operations. And tried including the classes in the directory structure but it is not able to find SQLite3 class.
Any suggestions? I am very tight on time constraint.
Doctrine allow to use sqlite if you define path in doctrine dbal in config.
How to use sqlite database on symfony2 project?
but Doctrine is not integral part of Symfony, so you can drop Doctrine from your project and use sqlite like in pure Php.
You can use exaples form docs:
http://php.net/manual/en/book.sqlite3.php
proposed by Jason Roman in comment. It is simple, but I suggest to create your own service for operation on sqlite or simply use PDO.
http://php.net/manual/en/ref.pdo-sqlite.php

Creating a RDF in Jython

How do we create RDF database in Jython? I use this to implement SparQL in Jython. So I need to create the database first.
See RDFAlchemyJython for reusing most well known Java tools for RDF and SPARQL in Jython; or go for RDFLIB, a wide spread RDF and SPARQL framework for Python.
I was going to say use the Jena libs, but msalvadores got there already, check the RDFAlchemyJython link. I'll add that it is pretty straightforward, just use them like you would any other Java libs in Jython.
TDB is probably the best bet for a SPARQLable database, see:
https://jena.apache.org/documentation/tdb/java_api.html
Just put the libs on your classpath, tweak the code to be js not Java.

Do you know a database written in Perl with DBI interface?

Do you know a database written purely in Perl with DBI interface?
Or what can be used if there is no MySql or Postgresql installed and I want to use Perl only?
Thank you.
Ok, I just wanted something that can be used with Catalyst.
What about SQLite? DBD::SQLite
I believe DBD::CSV is a simple DBD implementation that uses Text::CSV to persist data to CSV files.
That depends greatly on what you consider "database".
If you just want something to store your data, there's a number of Perl databases avialable. Some are listed here: http://www.perl.com/pub/a/2004/09/12/embedded.html
Tie::File
Berkley DB
SQLite
Please note that despite "SQLite is written in C" comments I saw here, the article explicitly states:
Conveniently, the DBI-driver for
SQLite, DBD::SQLite, already contains
the database engine itself as part of
the module - so installing this module
is all that is required to be able to
use SQLite from Perl.
However, NONE of the above is a real database engine, supporting transactions etc..., although some allow SQL-like query language access
I'm not aware of any real database engines implemented in Perl.
Perl rule 34:
If you can imagine it, there's a DBD
module for it ;)
http://search.cpan.org/search?m=module&q=DBD::&s=1
AFAIK there is no database in pure perl that is relational, it's not really economical; you might look in ACME on CPAN.
Essentially you have two choices: a pure perl module that provides a DBD package that wraps around, for example .txt, .csv, or .xml files.
If there is none, you could also implement a BDB/DBM style system of your own using pure perl, much like Ken Thompson did in C with DBM. It however, wouldn't be as complex as having SQL based relational database.
If you expect to use SQL, use an SQL based database.
DBD::DBM is a pure Perl database driver which is part of DBI itself since version 1.42 (April 2004). It can work with a variety of different database formats using the respective modules, e.g. BerkleyDB or SDBM_File (core module).
One needs to combine this with MLDBM to get a usable database (otherwise ony two columns per table are supported).
The documentation of DBD::DBM is quite extensive and provides a good overview of the different options and how to set it up.

Transfering User Names from One Forum to Another?

How do I transfer the users of a vBulletin forum to a new installation of IceBB?
Presumably, they both have a database back-end of some sort, right? SQL dump, followed by patching stuff up in your favorite scripting language, followed by SQL load, seems do-able.
There is a tool called ImpEx for vBulletin to do exactly this. It imports and exports users and data. Doing the SQL yourself can be error prone and difficult compared to using ImpEx.

Laravel 5 Writing Custom Database Driver

I'm working on project and need to implement custom database driver, but can't find any guidelines which interfaces i should to implement.
Is there any resourses available that could help writing custom driver rather thank just diving in code and trying to figure out how current drivers are implemented?
EDIT
By saying "driver" i mean support for example NoSQL dabase using standart Laravel's methods ( Eloquent model and Query builder ), for example:
User::take(10)->get();
For Mysql Laravel uses eloquent
laravel - eloquent
For NoSql like MongoDB, you can use laravel-mongodb
jenssegers - laravel-mongodb
It's even support Hybrid relations between MySql and MongoDB
I have worked on MongoDB (a NoSQL database) in one of my project, where I have to use a jenssengers package https://github.com/jenssegers/laravel-mongodb to use the functionalities. I was not able to use Eloquent in that.
Laravel - eloquent/ jenssegers - Laravel-MongoDB can manage hybrid relations as well.

Resources