database

Java handling large amounts of data

I have a Java application that needs to display large amounts of data (on the order of 1 million data points). The data doesn't all need to be displayed at the same time but rather only when requested by a user. The app is a desktop app that is not running with an app server or hitting any centralized database. My thought was to run a d...

Cannot connect to SQL Server Database

I cannot connect to SQL Server Database. I am trying to setup Membership with roles on my website using the MSDN Tutorial. It used to work only locally on my machine, however after following advice given on different forums, and on stackoverflow, the situation worsened, and now I can't even connect to the SQL Server Database. When I ru...

SELECT to pick users who both viewed a page

I have a table that logs page views of each user: +--------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+----------------+ | view_id | int(11) | NO | PRI | NULL | auto_increment | ...

long running queries: observing partial results?

As part of a data analysis project, I will be issuing some long running queries on a mysql database. My future course of action is contingent on the results I obtain along the way. It would be useful for me to be able to view partial results generated by a SELECT statement that is still running. Is there a way to do this? Or am I stuck ...

Generic SQL Proxy - Does it exist?

I am working on a concept product which tries to solve the domain problems of 'dynamic data masking'. This is an area where you don't get a lot of inputs when you do your standard google search. The idea is to ecrypt/substitute/shuffle/mask data in any enterprise context, regardless of technology. So, for instance, if were a call center...

Is it better to create Oracle SQL indexes before or after data loading?

I need to populate a table with a huge amount of data (many hours loading) on an Oracle database, and i was wondering which would be faster, to create an index on the table before loading it or after loading it. I initially thought that inserting on an indexed table is penalized, but then if i create the index with the full table, it wil...

complex combine sql

query 1 : this will count all the record with email '[email protected]' select count(*) as total from userbase join extrauserinfofromhrms on userbase.username = extrauserinfofromhrms.useremail right join logevent on userbase.username = logevent.useremail join eachworkflow on logevent.workflowid= eachworkflow.workflowid where logevent.actio...

Should I store a field PRICE as an int or as a float int the database?

In a previous project, I noticed that the price field was being stored as an int, rather than as a float. This is done by multiplying the actual value by 100, the reason being was to avoid running into floating point problems. Is this a good practice that I should follow or is it unnecessary and only makes the data less transparent? ...

Rails MySQL query time confusion

Hi, I have a count calculation query which I am running thousands of times in my Rails app, once for each customer in the db. When I run the query in my MySQL client with query cache disabled the query takes last than 1ms. However, when I run my task from the Rails console with query output enabled I've noticed that after the first ...

When does it make sense to have a single transaction per multiple database connections?

Can anyone help me see in what kind of scenarios it would make sense to have one shared database transaction and multiple connections? Thanks. ...

What is the most easy way to get ddl sql-script from HSQLDB?

In other words, how to export sql-script for building database and putting data into it from HSQLDB? ...

what is the best way to create this database

hello what is the best way to create a database for Questions and Answers Script the user can submit a question with a set of choices among which the right answer exists the database must save the question, all the choices and the right answer. the best way that comes to my mind is to make 2 tables: Questions Table: ID Question Rig...

How to make lookup tables shared to multiple site with the same DB and every site can have a customized list of this lookup ?

I want to having all common data (i.e. nationalities) identical in all site (the main webmaster/administrator who should decide either to make a certain list global or not) how to achieve this goal in the database design or in the system architecture ...

Java embedded database persistence

When using embedded java databases, can someone explain how the database persists data across sessions? Does it create a local file on the PC that is reloaded when the app connects to the database? Or would I need to explicitly dump/reload the contents on exist/restart? thanks, Jeff ...

How can i see differences between two .sdf files?

I need a tool that show me the differences between two .sdf files. Is there something I can download or do I have to write some code? ...

partial results from a long-running SELECT query?

We are issuing some long running queries on a mysql database. (The context is offline data analysis, not an application.) How we will proceed in research terms depends on the results we obtain along the way. It would be useful for us to be able to view (partial) results as they are generated by a SELECT statement -- before the query comp...

Should I start user IDs from 1 or 1000 in database? Why?

Should I use high numbers for user IDs in database? Are there any benefits with starting user_id from 1000 (from <9000 users project) or 10000 for more...? ...

MySQL: Appending records: find then append or append only.

I'm writing a program, in C++, to access tables in MySQL via the MySql C++ Connector. I retrieve a record from the User (via GUI or Xml file). Here are my questions: Should I search the table first for the given record, then append if it doesn't exist, Or append the record, and let MySQL append the record if it is unique? Here is...

read-access to a MyISAM table during a long INSERT?

On mysql and using only myisam tables, I need to access the contents of a table during the course of a long-running INSERT. Is there a way to prevent the INSERT from locking the table in a way that keeps a concurrent SELECT from running? This is what I am driving at: to inspect how many records have been inserted up to now. Unfortuna...

iPhone Core Data does not refresh table

Hi all, I'm trying to write an application with Core Data, and I have been able to successfully read and write to the core data database. However, if I write to the database in one view controller, my other view controllers will not see the change until the app is closed then reopened again. This is really frustrating. I'm not entirely ...