Questions tagged [database-abstraction]

85 questions
3
votes
3 answers

Joomla - Where to edit the insert SQL?

I'm learning to create MVC component right now. I studied the code that was created using the component creator. Now I wanna to locate the SQL insert function after the save button is click in the edit form, where does the form send to to call the…
3
votes
0 answers

Perl Model class for both ORM and web forms

Is there a perl module or a framework which will let me define my data model for both database and web forms in one place? Something like a fusion of Class::DBI with CGI::Formbuilder? So that I'll be able to define my data classes, their…
3
votes
2 answers

Simple database abstraction for PHP and MySQL

This is my very first post here, please let me know if I can improve the question. I'm in the process of updating a website. In short: it handles user subscriptions and keeps track of sales (products I make). I want to keep my options open for…
Fabien Snauwaert
  • 4,995
  • 5
  • 52
  • 70
2
votes
2 answers

Using static methods to interface with a database - any potential problems?

I'm looking at a class handling database access for an MVC3/.Net application. The class is static, and provides nice convenience methods for common DB queries - all sorts of twiddly stuff like "GetColumnBValueForColumnA()", as well as much more…
blueberryfields
  • 45,910
  • 28
  • 89
  • 168
2
votes
1 answer

Scala: ResultSet translation into a different kinds of multimaps

I am going to create wrapper over JDBC ResultSet in Scala. This wrapper is intended to be a function ResultSet => ParticularType. The problem is I can't find a common solution for making MultiMaps. Here is the way I am fetching…
2
votes
3 answers

php shared db connection ( design pattern help )

I have a small php app that I want to build a layer of db abstraction on top of with a few "model" type classes. I'm using ezSQL_mysql to do the db work. My question is what is the best way to design the app? Should I use a singleton pattern to…
bonez
  • 685
  • 1
  • 16
  • 39
2
votes
1 answer

PHP SQL Query building engine

I'm looking for query building engine for PHP (not ORM!) which would satisfy some criteria specified below. Unfortunately, after looking into Doctrine, Propel, Adodb, Zend_Db, etc. I couldn't find any that really fits the profile - they are either…
StasM
  • 10,593
  • 6
  • 56
  • 103
2
votes
2 answers

How do I query for an object with an object array property in MySQL?

I have seen this asked before in different ways, but I'm hoping for a straight answer. If I have two classes, Parent and Child, stored in two different MySQL tables, what is the best way of querying for a complete Parent object, with a list of all…
tcmoore
  • 1,129
  • 1
  • 12
  • 29
2
votes
1 answer

Using interfaces with golang and database abstraction

I am trying to figure out how to build a datastore abstraction in Go. I think I understand the basics of interfaces. However, the problem I have is all of the examples online only show you the most simple case, nothing beyond it. What I am trying…
jordan2175
  • 878
  • 2
  • 10
  • 20
2
votes
1 answer

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…
Mike Moore
  • 7,228
  • 10
  • 42
  • 63
2
votes
0 answers

Derived Classes in Php Phalcon

I am fairly new to php phalcon and the language itself. I am making a website that involves an abstract class and derived classes. The Abstract Class:
Rabbiya Shahid
  • 422
  • 3
  • 14
2
votes
1 answer

How to create database table in titanium by using model?

I have below 2 approach to create Db table in titanium. Approach 1 -- Create a sqlite database, using queries in the titanium code. like Ti.Database.open("DBName"); and then create tables using sqlite queries var db =…
शु-Bham
  • 952
  • 1
  • 7
  • 14
2
votes
1 answer

Create and Update as one action in CRUD

Is there a reason why Create and Update are distinct when making MVC application in PHP? I see why they are distinct in theoretical explanations, but is it worth keeping separate actions and views for create and update in CRUD controller? If I only…
Jaroslav
  • 1,389
  • 14
  • 27
2
votes
1 answer

Best practice for abstracting database interaction in Laravel 4

I currently have a situation where a user is able to complete a form which can result in the creation of several different models. For example, they post an advert of a car for sale, but in doing so, they needed to create a new brand and also a new…
Ben Thompson
  • 4,743
  • 7
  • 35
  • 52
2
votes
1 answer

Protocol buffer Database abstraction framework

Has anyone heard of an enterprise grade database abstraction layer that builds on Google Protocol Buffers I can foresee such a DB tool set would have great possibilities from mobile computing all the way through to enterprise system development.
Timothy C. Quinn
  • 3,739
  • 1
  • 35
  • 47