Laravel with DB2 Database - php

Hi guys I'm new with Laravel and I want to use it to build a REST API and the routing is just great my only problem now is the database , I read that Laravel only supports just four database systems http://laravel.com/docs/database#configuration and I need to use IBM DB2 , so is there any alternative to this? I mean like another library and if is possible to integrate with this framework. (I'm not using ODBC)

You can swap out Eloquent and use Doctrine which supports DB2.
Doctrine is on composer so can be easily loaded.

Related

Using Laravel with external API instead of database

I've been trying to make a mobile app which uses an API to fetch resources. So far, so good. Now I need to make the website and I want to use the same API.
The API is built on the top of Slimframework and illuminate/database. So I'm wondering is it good to use Laravel for something that has no connection to the database directly?
For example, components such as Auth will require to supply a different driver and etc.
Would you recommend using Laravel 4.2 for this kind of purpose? What kind of advice can you give me?
It's time to switch now laravel 5.0. I would recommend you to use Laravel for your purpose.
Yes, that is ok, try using Laravel 5 instead 4.2

Laravel (Main Website) + Node (Scraper) + DB

I am creating a website using the Laravel framework that requires the utilization of some data. This data is being collected by a scraper implemented with Node.js. My approach is to collect the data and store it on a database (MongoDB) and read it with Laravel.
I came across this solution, should I work with it?
Is there another way to push data from Node.js into MongoDB and then read the same MongoDB in Laravel?
Your Node.js app should save data into your MongoDB database, and your Laravel app should read that data only when needed - your solution is clearly not the way to go.
There is a library that allows using a MongoDB just like a standard database using the same Eloquent methods : laravel-mongodb, you should definitely check it out and use it (or find an equivalent).

Using MySQL and Cassandra in Codeigniter

I am using Codeigniter to develop my application. I am using MySQL database and I need to integrate Cassandra db in my site. So i need to use both of them in my framework.
I get the code from the following link for using Codeigniter with Cassandra, but I need to use both cassandra and mysql. Is it possible to use both? Half of the project is completed i am using MySQL.
I only need to integrate Cassandra, but the files downloaded from github the code is intergrated with cassandra. I can't find the steps or separate plugin cassandra files to integrate with Codeignitor.
yes its possible. cassandraci is a library whose function you can access with
$this->db->query()->insert('key', array());
$r1 = $this->db->query()->get('key');
only if you autoload that db class. Read more

Obtain database data into fixture files

does anyone know if there is anyway to obtain the data from an oracle database into fixtures files? Even using any symfony2 method or bundle?
PD: I'm working with the latest stable symfony2 version.
You can use: https://github.com/symfony/DoctrineFixturesBundle and implement ContainerAwareFixture, then you should have access to your Oracle connection.

Data import and migrate using Doctrine

I need to load data from an old DB into a migrated schema of this DB using Doctrine migration system.
I guess Doctrine might help me in this process.
I tried and lost a few hours using ETL scripts programs, without success.
From my point of view I need to :
Create a DB with the V0 schema
Load the data from the old DB (schema are identical)
Migrate DB to latest version using Doctrine migration
Extract data
Load it in the new DB
WHat do you think of this process?
Do you think it is feasable using Doctrine?
I tried a few searches on Google without success.
I am currently reviewed the features of Doctrine_Core class.
Thanks for your help
Yes, it is possible to migrate data from one database to another using Doctrine.
It sounds like you're trying to do a one-time database revision and migration and that your applications are not currently written using Doctrine. In that scenario, database abstraction has little or no benefit, unless you're also rewriting the applications to use it.
If you have no prior experience using Doctrine then I seriously doubt that writing custom migration classes in it will be easier than doing it with whatever database API you are already experienced using. It makes sense to use the migration classes (some times) if you are already using Doctrine for your development. Otherwise it's another layer and API you don't need.
I'm using Doctrine 1.2, which has some nice features for migrations but also a number of bugs and omissions of expected functionality. Reportedly version 2 improves on this but I haven't used it yet.

Categories