database

Books/articles/recommendations on how to write a tool to migrate database data from one version of a Hibernate enabled Java application to the next

We develop and support and application that uses Hibernate as an Object-Relational Mapping tool to persist our Java objects into the database. Unfortunately, there have been some changes in object model, and thus the database schema, between OurApp 1.0 and OurApp 2.0. So, we would like to write an automated tool to migrate the data from ...

loading view based on user input

May be this is quite simple for many of the experts here. I am a newbie for iphone dev. I have a view controller showing userid and pwd text buttons. When user enters userid,pwd and click "login" button, it should go to DB on server and verify. If it is correct then another view with searchform is loaded. Can someone help me with how...

Using Functions/Objects in PHP's db2_bind_param

I'm trying to bind some variables to a db2 query using db2_bind_param, but they're stored in an object and assigning them to temporary vars offends me. Is there a method of passing $obj->func($var) or $obj->property to the db2_bind_param function? eg. Works: db2_bind_param($SQLStmt, 1, "var1", DB2_CHAR); ... db2_execute($SQLStmt); D...

Storing files on Database

Hi, i have to save a file in any format (XLS, PDF, DOC, JPG ....) in a database using Java. in my experience i would have do this by storing the binary data of the file into a BLOB type field, someone told me that an alternative is coding the binary data as Text using BASE64 and store the string in a TEXT type field. Which one is the be...

Using Active Record on object split across two tables in codeigniter

I have a controller that is represented in the database by two tables, pages and page_contents. pages contains the author information, unique id for the the page, and creation timestamp. page_contents contains the page uid as a FK, the contents of the page, last editor, and edit timestamp. When a page it requested I need to pull the o...

PHP Parsing URL

Ok, i'm trying to get data from a database to be pulled according to the url. I have a database that is holding data for some announcements for individual customer websites. The websites are in individual directories on my website. (i.e., www.domain.com/website1/index.html, www.domain.com/website2/index.html, www.domain.com/website3/i...

Eliminating extra DBQueries in django by storing the absolute_url

Using Django blogging, I have a template that looks like: <a href="{{ post.get_absolute_url }}">{{ post.title }}</a> This looks innocuous enough, but it ends up generating yet another lookup of the user of the blog post, something that I (in most cases) already know. However that isn't my point. The URL looks like: http://localhost...

Store variables online and retrieve it in Ruby script?

Are there any online services/servers that could store information like: username email company information So that it could be retrieved by Ruby script? ...

NSArray objects go out of scope after returning pointer

I am attempting to use the below code in a function to return an array of dictionary objects. Unfortunately, after the return to the next function in the stack all of the rows in the mutable array have become 'out of scope'. From my understanding, the array should retain the row (dictionary) object automatically so even after the retur...

Access database using Silverlight

What's the best way (e.g. framework) to access a database using Silverlight? ...

PHP Sign up script not working! mysql insertion failed

Cannot find the bug here, think so this whole script is fagged up, still can not see any signs of success as such. The problem is when the form is hit with the specified details i.e. username , password and an e-mail address are not inserted into mysql database and I am unable to verify through PHP "How to check if details are present in...

Database design problem.

Hi, I'm working on a database design for a building monitoring system. It goes a bit like this: There's a building. A building has multiple areas which can contain loggers or groups of live feed sensors. A logger has a single sensor and it's data is collected by handsets which is then downloaded into the system later. So for example:...

Database connection code runs on Linux but not Windows.

Hi, We have the following code that runs in Linux Ubuntu, but not on Windows XP or Windows 7. Do you know what could be the problem? Here's the code snippet: if (logger.isDebugEnabled()) { logger.debug("before getting connection"); } String url = "jdbc:mysql://XXX.XXX.XXX.XXX"; Connection conn = DriverMana...

Running a PHP script at a specific place in the code.

Ok, So I have a external php script that get data from a DB and displays it in a table. I want to run it in a specific div in my html so the data gets echoed out in the right place? Any ideas how to do that? Html div <div id="statsContent"> <?php include('updatestats.php'); ?> </div> Heres the PHP code. <?php //Start session ses...

Android Database information gone

I have an app that has multiple databases. Not multiple tables in a single database file, but literally multiple databases. For the sake of clarity, lets say that Database #1 is a Car Database, and #2 is a Truck database. For the Truck database, I have an Activity that allows you to see various bits of information that is compiled from a...

Database "dynamic" types + Serialization

I have a set of classes, where each class represents a diferent type of a database field. For example, a very basic subset of it would be: public abstract class DbObject { internal DbObject() { } } public class DbInteger : DbObject { public int Data { get; set; } public DbInteger(int data) { this.Data = data; } } public class ...

mysql: proper way to handle relation between users and teams?

Newish to mysql DBs here. I have a table of USERS and a table of TEAMS. A user can be on more then one team. What's the best way to store the relationship between a user and what teams he's on? Lets say there are hundreds of teams, each team consists of about 20 users, and on average a user could be on about 10 teams, also note that us...

Need info on Oracle database server

Hi all, I am not sure If I'm correct in posting in this forum but I need info. I am doing University project which needs couple of oracle database server which are online. I have a cloud application which would access this servers. I tried to find online if I could rent database servers for a week for the test with no luck. Could somebo...

Database Design: Working with SQL Server; Server Management Studio Sucks...MySQL WorkBench Rocks...Alternatives?

Currently I have laid out most of my design in MySQL Workbench. It appears I will be deploying my DB in SQL Server however. So far my experience with Microsoft SQL Server Management Studio 2008 R2 has sucked due to one flaw. When you save your DB Diagram, it creates the tables in the database. I have attempted design in SSMS which sucke...

How do I create tables in VS 2008?

I am running VS 2008 Standard and SQL Server Express. I created the tables in the Database Designer (creating and xsd), and created the database. How do I get the tables from the Database Designer into the database? Also, is there some documentation available? Thanks! ...