database

SubSonic 2.1 using multiple databases

Hello, I want to use SubSonic 2.1 to connect to 2 different databases (each having different tables). What is the best way to do this? What is the best way to seperate the generated code between the 2 databases and how can I switch between databases? ...

Synchronizing DataGridView (DataTable) with the DB

Hi! I have the following situation: there is a table in the DB that is queried when the form loads and the retrieved data is filled into a DataGridView via the DataTable underneath. After the data is loaded the user is free to modify the data (add / delete rows, modify entries). The form has 2 buttons: Apply and Refresh. The first one ...

Hibernate and Sql Server best Practicies

Hi all, Our application uses Hibernate with Sql Server 2005. Being a DBA, I am not an expert of Hibernate yet. And our developers do not understand Sql Server very well, so I need a middle ground to make sense out of this. I am looking for some info on how Hibernate works with Sql Server 2005. Any best practices or any issues with th...

Using SUM so that NULL in columns make sum NULL

I have a a table with a column groups INTEGER NULL. It has values groups 5 7 <NULL> If I do a select sum(groups) form table_name I would get 12. How can I get null, when the column being summed has a null. ...

Database - where should I start from?

I am new to programming (1 year of C#-winforms) and am from a non CS background. I have not worked with databases yet. As an application programmer, how much should I know? and where should I start from? EDIT: Specific topics, books, tutorials, blogs would be appreciated. ...

To use other table as a WHERE criteria in SQL

I am trying to search questions which have a given tag. How can you fix the following problem? Tables questions | tags -------------------|----------------- question_id | tag title | question_id was_sent_at_time | My code SELECT question_id, title FROM questions WHERE question_...

How to create a Foreign Key with "ON UPDATE CASCADE" on Oracle?

In MS SQL Server it is possible to create a foreign key with ON UPDATE CASCADE option, so whenever you update one of the columns in the primary key, the foreign keys in other tables will also be update by the DBMS. So, how to do it in Oracle? ...

What is a good alternative to text files as Database for java 1.3?

Hi All! I know... you must be calling me nuts by now, for using text files as databases. If thats ok to you, certainly using java 1.3 will be enough to call me insane. Let me explain (yes there's an excuse for that): I work for a company that for a thousand reasons can't (or won't) upgrade to java 5 or 6 and so on... It doesn't allow...

Ruby on Rails + Sql Server 2005

This has been addressed some time ago, but I've not had any luck following the steps outlined or advice suggested. Here's my situation: I've installed SQL Server '05 and have another (non-Ruby) application utilizing it successfully. I've got Rails up and running successfully (but only for MySQL.) I've installed the Rails sqlserver adap...

Serialize MS Access Database Objects to Text File(s)

Is there some code out there that lets me serialize all the objects in an MS Access MDB File. All the Objects like Table definitions, Table Data, Query defintions, Report definitions, VB Modules should be written to one or multiple text files. It is not necessary to reverse the operation (but would be nice to have). I want to put the t...

Is JDBC secure?

I am new to JDBC, and the new project require me to use JDBC. What I want to know is, is the JDBC secure? How to prevent "Mysql Injection"-like problem? What are the security issues that I need to pay attention when I use JDBC? And how to ensure, I mean optimize the security, in order to prevent from hackers to hack the database? ...

How can I postpone database updates in Rails?

I'm building something akin to Google Analytics and currently I'm doing real time database updates. Here's the workflow for my app: User makes a RESTful API request I find a record in a database, return it as JSON I record the request counter for the user in the database (i.e. if I user makes 2 API calls, I increment the request count...

List of all tables in database, and number of rows in each one?

Does anyone know what MySQL statement I would use to return results containing a list of all the tables in a database and the number of rows in each one? ...

How to get the schema informataion/dump (without data) for an oracle database instance in xml format?

Well.. the question is descriptive enough I guess. What I am looking for is an exact equivalent of the below MySQL command in oracle- mysqldump --xml --no-data -u[username] -p[pass] [db_instance] > [someXMLfile] Where on a linux box do I have to run the oracle command? Straight inside the shell would do? ...

Designing tables for storing various requirements and stats for multiplayer game

Original Question: Hello, I am creating very simple hobby project - browser based multiplayer game. I am stuck at designing tables for storing information about quest / skill requirements. For now, I designed my tables in following way: table user (basic information about users) table stat (variety of stats) table user_stats (conne...

Constants in Oracle SQL query

I am new to Oracle (though familiar with SQL) and have to write a fairly complex query where a value derived from the current date is used many times. Rather than calculate the value each time, it would seem obvious to declare a constant for the purpose. However, when I then try to use my DateIndex constant in the subsequent SELECT sta...

Unable to export Access DB table

Hi, I have an access db and am looking to export the tables to csv. All tables except one can be exported but one table gives me the error: Microsoft Jet database engine could not find the object". Make sure the object exists and that you spell its name and the path name correctly. Any ideas? ...

bulk insert in db table

Hello, I'm having an array I want to insert in a single query in a table. Any idea? ...

How should i design that database in asp.net?

Hi, i am e newbie programmer and i want to improve a "student program" for schools. In the program i want to add lesson information. For example: Student X Lesson name 1st exam 2nd exam 3rdexam mathematics 80 70 80 history 70 70 70 ... I have a database that called KFS with three ...

Programmatically verify database structure in C++

How would I verify a database is structured how my C++ program expects? Our source control was very weak in the past so we have many production installs out there using databases which are missing columns and tables which are now required in the current version of the C++ program. I'd like to have my app check to make sure the database...