database-abstraction

mysqli or PDO - what are the pros and cons?

In our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. There is little realistic likelihood of us ever moving to another RDBMS. I prefer PDO for the single reason that it allows named parameters for prepared statements, and as far as I am a...

What PHP / MySQL drivers or Database Abstraction Layers Support Prepared Statements?

I am working on a project that is built on an extended version of the default PDO and PDOStatement classes and as such it uses PDO style named parameters instead of the "?" placeholder for variables. However, the client is now requesting that we look into using a different driver because their version OS X Web Server apparently doesn't...

Database Abstraction - supporting multiple syntaxes

In a PHP project I'm working on we need to create some DAL extensions to support multiple database platforms. The main pitfall we have with this is that different platforms have different syntaxes - notable MySQL and MSSQL are quite different. What would be the best solution to this? Here are a couple we've discussed: Class-based SQL ...

How To Handle Communication Between the Domain and Database Layers?

I am fairly new to using separate layers for the business logic (Domain) and database access logic, but in the course of working things out I've come across a problem to which I still feel I haven't found a great solution. Clarification My existing solution uses Data Mappers to deal with the database interactions directly. However, as ...

Database Abstraction - what are the options?

How can I abstract my database from my application so that it is unaware of the database type? I have to design a .Net 3.5 WPF application that must support either SQL Server or Visual FoxPro as the data repository. My design goals are to: make the type of data repository invisible when writing code in the Data Access Layer make it as...

What are good python libraries for the following needs?

What are good python libraries for the following needs: MVC Domain Abstraction Database Abstraction Video library (just to create thumbnails) I already know that SQLAlchemy is really good for Database Abstraction so don't bother with it unless you want to suggest a better one. Edit: This might seem stupid to mention but I'm talk...

Database abstraction layer design - Using IRepository the right way?

I'm in the process of designing my ASP.NET MVC application and I ran across a couple of interesting thoughts. Many samples I have seen describe and use the Repository pattern (IRepository) so this is the way I did it while I was learning MVC. Now I know what it's all doing, I starting to look at my current design and wonder if it's the...

Where do ORMs fall through?

I often hear people bashing ORMs for being inflexible and a "leaky abstraction", but you really don't hear why they're problematic. When used properly, what exactly are the faults of ORMs? I'm asking this because I'm working on a PHP orm and I'd like for it to solve problems that a lot of other ORMs fail at, such as lazy loading and the ...

Database abstraction/adapters for ruby

What are the database abstractions/adapters you are using in Ruby? I am mainly interested in data oriented features, not in those with object mapping (like active record or data mapper). I am currently using Sequel. Are there any other options? I am mostly interested in: simple, clean and non-ambiguous API data selection (obviously)...

Database Abstraction & Factory Methods

I'm interested in learning more about design practices in PHP for Database Abstraction & Factory methods. For background, my site is a common-interest social networking community currently in beta mode. Currently, I've started moving my old code for object retrieval to factory methods. However, I do feel like I'm limiting myself by ke...

[PHP PDO] Database abstraction class design question

Hi SO, I am in the process of designing a web app (really it's a hobby, I'm trying to teach myself design, and what better way is there than doing it :). Anyways, I was thinking about how I would deal with my database. I am comfortable with PDO and I was thinking of leveraging PDO in my abstraction class. I am thinking of making a si...

Database access abstraction classes

Currently, I have a database access class named DB, which uses PDO. I Then have a handful of sub-classes for accessing each table: Users Images Galleries Text Videos This was nice when I first started my project, but now I'm not sure if it's that great, as I have a method for each database query that I use within each of these classe...

Cross Database Table Joins in Drupal ?

Is it possible to do cross database joins in drupal? Say you have two databases, drupal and old_data_source. You want to join drupal.node to old_data_source.page. db_set_active() can be called to use multiple databases. However can't find anything about cross database table joins! (I'm looking into this as part of a migration script a...

what is data abstraction exactly means

Hi all, what is data abstraction means? can i get some sample examples as well as real time examples in our daily life ...

Is there a way of using PHP-ActiveRecord as symfony's ORM/abstraction layer?

I just discovered PHP-ActiveRecord not too long ago after struggling for nearly a month to write my own ORM (I'm hard headed like that) and I fell in love with it. I had looked at Doctrine and Propel before but decided to run away due to the sheer complexity and learning curve. With AR, I don't have the anxiety and learning difficulty I ...