database

Refreshing a web page inserts data again to DB.

I've a php web page with a form. After filling the form in web page, I can submit it to the server. But after that, if I refresh the page, it inserts the same record to the database. Is there any solutions to this problem? ...

INNER JOIN vs MultiSelect in PosgreSQL

There are many disputes about what should use developers in sql queries. I guess I ask old question :) Buy can somebody completely explain what is big difference in these two methods? is there maybe some misunderstanding in database theory of programmers? Can somebody give good article about this question or just say - what is a differen...

Database design: Running totals of row counts

I have run into the following situation several times, and was wondering what best practices say about this situation: Rows are inserted into a table as users complete some action. For example, every time a user visits a specific portion of a website, a row is inserted indicating their IP address, username, and referring URL. Elsewhere,...

Is it possible to create references in Google App Engine?

Let's say I have a datastore that contains mother, father, and child objects. Inside the Mother and Father objects I have a field called child which stores a reference to their child. Is it possible to reference this child from both mother and father without creating duplicate child instances for each (in the style of OOP). Is this how d...

Using Hibernate to persist a one-to-many list with a superclass type

Somebody asked this question on the Hibernate forums and I'm linking to it here because I have the same question. Nobody seemed to be of any help there so I'm hoping this might be more useful. Here it is: Question on Hibernate forum Thanks. ...

a system design question

I was asking the following question during interviewing in a company working on cloud computing, and did not answer well. Any suggestions on how to analyze this question will be greatly appreciate. Our company has hundreds of millions of users and we expect zero down time in production, explain techniques and programming practices that ...

Using ASP.NET tables generated by aspnet_regsql.exe in a SQLite database

I'm building a small ASP.NET MVC site where I want to use SQLite. While I already know how I will be connecting to the database (using DbLinq), I don't understand how to put the ASP.NET tables generated by aspnet_regsql.exe into an SQLite database. I've used the regsql tool before with SQL Server, but never with SQLite. How do I create ...

In Django, how do I set the default so that every model is created with INNODB?

Right now, Django defaults to MYISAM...but I want to change it so that everytime I create a new table it is innodb. ...

Atomicity of field for part numbers

In our internal inventory application, we store three values (in separate fields) that become the printed "part number" in this format: PPP-NNNNN-VVVV (P = Prefix, N = Number, V = version). So for example, if you have a part 010-00001-01 you know it's version 1 of a part of type "010" (which let's say is a printed circuit board). So, i...

Why would you use two (or more) databases instead of one? [Scripting]

Many database libraries come setup for multiple database connections - but I've never actually known of an scripting application that needed to connect to two databases during it's run. (compiled, daemon-running languages are a different matter). I understand having database slaves so that you can spread the load out - but usually on s...

Table design for user's information aswell as login credentials ?

Hi, Initially I would like to ask you to forget about hashing passwords or w/e related to passwords, this question is not related to securing passwords, etc and I do know/understand how this should be done. What is the best approach to store the data in question, considering performance on read/write - to build one or more tables? Sin...

Error with android database program

06-29 01:24:15.882: ERROR/AndroidRuntime(747): Uncaught handler: thread main exiting due to uncaught exception 06-29 01:24:15.922: ERROR/AndroidRuntime(747): java.lang.RuntimeException: Unable to start activity ComponentInfo{one.two/one.two.Arrival}: java.lang.NullPointerException 06-29 01:24:15.922: ERROR/AndroidRuntime(747): at and...

Free/OSS Data model diagram generator from DDL

I am looking for some free/oss to reverse engineer from DDL a data model diagram. My database is Oracle if that matters. Do any exist? ...

Oracle Schema upgrade with new constraint- how can I reduce upgrade down time ?

I have a oracle repository up and running and has say 10 million records. One of the table is say CREATE TABLE TABLE_A NAME VARCHAR2(128), VER VARCHAR2(128), TYPE VARCHAR2(32), DESCRIPTION VARCHAR2(256), CONSTRAINT TABLE_A_PK PRIMARY KEY ("NAME","VERSION"); This table is being used for long and now say I have a requirement to change...

How do you Move Dev Database Changes to Production Database?

I have been working on a project and gotten it through the first stage. However, the requirments ended up changing and I have to add new tables and redo some of the foriegn key references in the DB. The problem I have is my lack of knowledge of dealing with doing this kind of change to a staging then production database once I get the d...

How to set all column atrribute"UpdateCheck" quicly for all tables?

Hi, i need to set LINQ UpdateCheck attribute of columsn in every tables in mine db, is there any quick way to set all column's updatecheck attribute? ...

is there any trick to do wildcards search on apache cassandra?

i need to do something like this on apache cassandra, SELECT * FROM mytable where address = "%indonesia%" any idea how to do it on cassandra? ...

which query is better and efficient - mysql

I came across writing the query in differnt ways like shown below Type-I SELECT JS.JobseekerID , JS.FirstName , JS.LastName , JS.Currency , JS.AccountRegDate , JS.LastUpdated , JS.NoticePeriod , JS.Availability , C.CountryName , S.SalaryAmount , DD...

Before starting the Database model

What you do before starting the Database model diagram? I mean how you form the Requirements, Specifications etc. Use cases is one thing but anything else? Some best practice or a rule of thumb? Being a self learner I want to see how it goes in the hands of professionals? ...

comparing a column with itself in WHERE clause of oracle SELECT

Hi, I have a multi-table SELECT query which compares column values with itself like below: SELECT * FROM table1 t1,table2 t2 WHERE t1.col1=t2.col1 --Different tables,So OK. AND t1.col1=t1.col1 --Same tables?? AND t2.col1=t2.col1 --Same tables?? This seems redundant to me. My query is, Will removing them ha...