I found out two possible solutions for implementing the database structure for social networking sites like Facebook.
1.: Creating a 'Relationships' table and inserting every friendship into it. For example: user A adds B as friend (A-B), then the logic puts (A-B) and (B-A) into the 'Relationships' table. Then it indexes the first attri...
I am inserting a record to orcle db through java application. The date value inserted as 02/10/0010 instead of 02/10/2010 HH:MM:SS AM/PM? I am using oracle jdbc connection. Does it problem with JDBC driver ?
Any input on this.
...
I'm working on a PHP content management system and, in testing, have noticed that quite a few of the system's MySQL tables are queried on almost every page but are very rarely written to. What I'm wondering is will this start to weigh heavily on the database as site traffic increases, and how can I solve/prevent this?
My initial thought...
Hi, there. I am trying to implement a feature into my app to copy the current database unto the sdcard. Are there any tutorials or code snippets to achieve this. I've already looked at this site, http://mgmblog.com/2009/02/06/export-an-android-sqlite-db-to-an-xml-file-on-the-sd-card/ ... but I wont be able to import the data with this m...
I have an sqlite table that shows scores from different game modes. In one of the columns, I don't want the score to show up unless the user reaches the final 5th level, but I also don't want it to be recorded as a 0 either. I want it to be as if the game was never played. No score recorded at all. Here's what I have....
if(appDeleg...
So I have an web app, where users can pay for certain extra features, and also subscription.
At first it was just a few simple things, and I had one Payment table, which had an "item" field, to specify what the user was paying for.
But now would need to come other items, with various accompanying parameters. Even the subscription could...
It seems like to combine two or more tables, we can either use join or where. What are the advantages of one over the other?
...
I've some huge text files to process and make sense out of the data. Part of the task is to save this data into a database. I want to use Ruby, with postgres or mysql, postgres being the first choice. What libraries should I include? There is no model, its going to be plain SQL statements. How to do this without rails?
...
i have a question about storing data for a desktop application,
if i'm to deployed an application without a MS SQL database,
how could i facilitate the retrieving/storing of data.
I know i can also serializes the data objects into a file (such as XML file), is there any other more efficient or effective way?
...
I'm using Kohana 3.
I'm writing an update query, and it is working for everything except this one section.
If I do a var_dump() on the results of $db->execute() I get either a 1 or 0 to say it failed or not. It is failing in this example (returning 0).
How can I figure out what error is happening? It justs seems to be silenty failing ...
hi
how to access my web application database in android emulator, i want list out my database values. These are in my web application.
database name employees and table: employee_data
i want to get employee_data data on android emulator.
...
I am starting out writing java code and interacting with databases for my "nextbigthing" project. Can someone direct me towards the best way to deal with adding/updating tables/records to databases? Here is my problem. There is too much repitition when it comes to DB code in java. I have to create the tables first (I use mysql). I then c...
WHERE column = value ->add(column, value);
WHERE column <> value ->add(column, value, Criteria::NOT_EQUAL);
Other Comparison Operators
> , < Criteria::GREATER_THAN, Criteria::LESS_THAN
>=, <= Criteria::GREATER_EQUAL, Criteria::LESS_EQUAL
IS NULL, IS NOT NULL Criteria::ISNULL, Criteria::ISNOTNULL
LIKE, ILIKE Criteria::LIK...
how to rename the database using query?
...
Hello,
I am running a query to populate a dropdown menu, however the column I am using a list of company names, this means that the company name is often repeated, is there way to only get each repeated value only once? So for instance if I have in the table something like,
Company 1
Company 1
Company 2
Company 3
Company 4
Company 4
...
i want to write a simple web app that can connect to databases and display simple text and images. I know a bit of programming - mainly C. Also i have a very short time frame for learning the language and technologies associated with it. Which language would be good/ also what would be a good starting point
...
Hi,
I have an environment with 4 servers and 2 oracle database servers which have streams between them for instant 2 way replication.
I have a servlet (I cannot control which of the 4 servers it goes to) which checks if a job is running and if not it starts the job in a thread. Only one of these jobs should be running at any time. I ...
Can anyone recommend the best practice for storing general site preferences? For example, the default page title if the script doesn't set one, or the number of featured items to display in a content box, or a list of thumbnail sizes that the system should make when a picture is uploaded. Centralizing these values has the obvious benefit...
I'm trying to map 2 tables together in Fluent Nhibernate, but the only way to join them is based on using the LEFT function on one of the columns. So a SQL join would look like this:
select * from TableA INNER JOIN TableB ON LEFT(TableA.ColA, 12) = TableB.ColB
Is there any way to map this in NHibernate?
...
Considering this MySQL query:
SELECT
someColumns
FROM
someTable
WHERE
someColumn IN ( value1, value2, value3 )
... how can I guarantee that the rowset comes out ordered in the exact order of the values given to the IN () clause? I presume this is not guaranteed without giving it an ORDER BY clause, is it?
PS.:
The values to the...