database

Populate radiobutton group with data from squlite database

Hi! I am writing a game app for Android, where a question word with four different alternatives will show that the user can choose between. I have a database and i can insert from the app, but what would be the easiest way to use a select statement, and then parse the response and populate the five different positions in the radio group...

What logic to use to rollup/merge multiple person entities as the same? (tight, but fuzzy enough to broaden matches)

I have multiple instances of people entities which are often times the same person. Where the address First-Last is the same at the same address, it's a no-brainer to merge/rollup them. However, due to data entry inconsistencies, there must be a way to deviate a bit from the exactness. I think the credit card industry does this a little...

Why/when/how is whole clustered index scan chosen rather than full table scan?

IMO, please correct me... the leaf of clustered index contains the real table row, so full clustered index, with intermediate leaves, contain much more data than the full table(?) Why/when/how is ever whole clustered index scan chosen over the full table scan? How is clustered index on CUSTOMER_ID column used in SELECT query which ...

Is there a reason to use Base2 lengths for columns in SQL Server?

Possible Duplicates: varchar Fields - Is a Power of Two More Efficient? Nvarchar or varchar what is better use multiply of 2 or rounded full numbers?? Out of sheer habit I define the sizes of columns that I use in SQL Server to be Base2 sizes. For example, here's a table that I'm working on: ID int FirstName nvarchar(64) L...

PHP, cUrl and ASP

I'm tryng to get data using PHP's cUrl extension. The page runs ASP. I do two cUrl requests, the first one to get Models, and the second one to get the Model Age. I don't know why, but __EVENTVALIDATION is the same in both requests. I'm posting the following data: Array ( [ScriptManager1] => UdtMarca|ddlMarca [ddlAnoValor] => 0 ...

DataSet contents incorrect

Hi! I'm populating a Repeater Control dynamically based on a querystring value. On Page_Load, the page executes a function that gets info from the database and loads it into a DataSet is then used to populate the repeater. The issue is that directly after truncating the table, it still appears to be returning a row... Here's my code: ...

What are some good, fast persistant storage options for key->value data?

For a small PHP app I am writing, we need to store a large number of records that have a hash key, and a few simple field values ('host', 'path'). eg: '4420ffb32a' => array( 'host' => '127.0.0.1', 'path' => 'path/to/resource', ); What is the best persistent storage for data like this? Would MySQL be the best choice, or is it overk...

Proper way to maintain an extended android media database a la MediaStore?

Based on the results of my query in this thread, I've decided that I need to maintain my own database of metadata for the media that I'll be accessing. It seems like MediaStore is a very good start for this, as it will give me a good deal of information and is regularly updated by the MediaScanner. In an ideal world, I would add a few co...

Many to many objects relations in Java Google App Engine

Maybe I misunderstood this but from what I read I may have several problems creating many to many objects relations in the data store. So I hope I am wrong. Can anyone provide me with ideas on realizing such a system on GAE/J? What I need is many students can have many files (meaning Student A can have File A and Student B can have File...

Downgrade SQLServer CE database

I have a SQL Server CE database I am developing with and would like to downgrade the version so that 2005 Management Studio will open it. Currently, I have to use VS 2010 to open it, but it is a real pain to use that way. I know I could install the 2008 version of SSMS, but the machine I use has serious problems with all installs. There...

Git, robots and diverging branches

I am trying to use git as something it wasn't made for - a database. Please feel free to tell me that this is a stupid idea. Setup One branch (let's call it robot) is being updated automatically by a script on a daily basis. The data comes from some other publicly available database. Initially the master branch is the same as the ro...

SQL connection performance

I am trying to load the tomcat log of combined pattern to MySQL db,now I push each record to db when it is parsed. First,read a line from the InputStream, then parse it to a LogItem which is used to wrap a log record, then Using the MySQLDbManager to insert the record to db, MySQLDbManager hold a reference of a database connection po...

What could make this dsl easier to type or read?

I've written a working grammar to replace dbunit in scala called ScalaDBTest. The whole program works - only took 2 days to write. I got a lot of polishing to do. Anyway, the grammar I'm using for the DSL to input data into the database is malleable and I'd like some feedback on it. The basic syntax looks like this. It's pretty simple...

How to view Execution Plans for Oracle Database in Java

With SQL Plus for Oracle Database, I can call SET autotrace on and then see Execution Plan, statistics, etc. The problem is that I want access to information about the Execution Plan and statistics in my Java program. I typically have done something like this to execute a sql statement, Connection connection = //INITIALIZE HERE; St...

Index performance with WHERE clause in SQL

I'm reading about indexes in my database book and I was wondering if I was correct in my assumption that a WHERE clause with a non-constant expression in it will not use the index. So if i have SELECT * FROM statuses WHERE app_user_id % 10 = 0; This would not use an index created on app_user_id. But SELECT * FROM statuses WHERE app_...

How do I insert a CURRENT_TIMESTAMP into a PostGreSQL configured Drupal instalation

Hey there, I'm using drupal and a pgsql database, but after long searches I still can't figure out how to put a CURRENT_TIMESTAMP or now() into the database when inserting a row into a table. Putting now() on the default value of a column won't work, because drupal won't accept it on the database schema, so that's out of question. The c...

Rename Uploaded File in PHP

What I want to do is add a number to the beginning of the file name so I don't have a duplicate file name in the folder. So I choose my file "example.pdf" and upload, I got the the part of the code that looks like this: move_uploaded_file($HTTP_POST_FILES['ufile']['tmp_name'][0], $path1); In this line of code above can I add a variab...

Postgres inheritance for maintainability

Edit: TMI in initial question, cut to essentials. I'm thinking of a schema to support updating entries and version tracking. This is for a slowly changing dimensions scenerio, with a twist. To support the behavior I want, the basic schema is replicated three times: public tables, private tables, and change tracking tables This...

NOSQL database Selection for forum.

Hi i am developing a FORUM i am using asp.net, c# language for code. I have read a article about NoSql i inspired a lot from there advantage over RDBMS (sql) so i was thinking that should i use NoSql concept for Forum DataBase or not. I am not a expert in database. So can u suggest me should i use NoSql? Currently I am using sql(rdbms)....

Get Last ID From The table [ Entity Framework ]

Could someone guide me on this. I am using EntityFramwork4 , I want to get the ID of the last row of a table. Could someone having experience using this tell me , how can i get the last id from a database table. ...