database

How to get just the size of the value in BerkeleyDB?

Is there a way to get only the length (in bytes) of a value stored in BDB? I don't need the entire data array, only its size. ...

django ORM : how to make an select query with OR between two fields

I am new to django and need some quick help. How will the following sql statement be translated in django ORM? SELECT * from table_name WHERE field1 = v1 OR field2 = v2 Thanks in advance! ...

How do views reduce code duplication?

Hi! I read something like this about db views: Views are incredibly powerful and useful for one reason that stands out above all the other very good reasons. They reduce code duplication. That is, in most cases, the bottom line. If a query will be used in three or more places, then a view will drastically simplify your ...

MySQL inner join problem or other equal solution

Hello, For a few hours I was figuring out how to make an inner join these tables(tables are simplified for this question): Table message have these fields: | id | content | Table message_relation have these fields: | id | message_id | sender_id | receiver_id | Table user have these fields: | id | name | What I want to do with th...

How to secure phpMyAdmin

Hi, I have noticed that there are strange requests to my website trying to find phpmyadmin, like /phpmyadmin/ /pma/ etc. Now I have installed PMA on Ubuntu via apt and would like to access it via webaddress different from /phpmyadmin/. What can I do to change it? Thanks Update For Ubuntu 9.10 and Apache2, the corresponding sett...

Best approach to optimize a record history database

I have a database that keeps record history. For each update to a record, the system will "deactivate" the previous record (along with all it's children), by setting the "Status" column to "0". Now it's not a problem yet...but eventually this system is going to have a lot of records, and history is more important than speed right now. B...

Install client with system.data.sqlclient.dll

I am install an c# winforms app 3.5 to a client that references a mdf file that will in SQL server express. I installed .net 3.5 sp1 so the latest .net data providers for SQL server should be there?? I am getting an error for system.data and the above dll. What are the dependencies am I missing? ...

Error while synchronizing local cache database

Using visual studio 2008 , after selecting cached tables from northwind database and while synchronizing local cache database this error message is prompted! http://www.http://www.freeimagehosting.net/uploads/7cecc7881b.png ( i can't post the pic directly since im a newbie) I would apperciate your help guys Thanks Natasha ...

connecting to database with asp in windows 7

I have windows 7 64bit and I can't connect to database it gave me http 500 error any one can help me ? also I have windows vista ...

Html / Email / Distribution list problem from a noob

I need to create a feature for a website that will allow a user to enter their email in order to receive a free promotion (which will be emailed immediately) and be added to an announcement list. I haven't done any web programming and am wondering where I should start? Should I just create a database and everytime an email is entered, ad...

How to store a numeric value which can have other statuses in a database?

I need to store a set of numbers in a database which are imported from a spreadsheet. Sometimes a number is just a number. But in other times, a value can be "missing", "N/A", or blank and these all represent different things. What would be a good approach to store these numbers in the database? Originally I only had to account for N...

Sharing a database connection with included classes in a Sinatra application

I'm converting a part of a rails application to its own sinatra application. It has some beefy work to do and rather than have a million helps in app.rb, I've separated some of it out into classes. Without access to rails I'm rewriting finder several methods and needing access to the database inside of my class. What's the best way to...

Text mining on large database (data mining)

Hello, I have a large database of resumes (CV), and a certain table skills grouping all users skills. inside that table there's a field skill_text that describes the skill in full text. I'm looking for an algorithm/software/method to extract significant terms/phrases from that table in order to build a new table with standarized skill...

How do I write this GROUP BY query in MYSQL?

Suppose I have a column called "fruits" I want to select all of the top fruits, ranked by fruits (and group by + count). Fruits: orange orange apple banana apple apple In this case, the select statement would return: apple, 3 orange, 2 banana, 1 ...

Single HTML Table from multiple MySQL tables

Hi! I've been struggling for a while with this one; I'll try to explain it here as simply as possible. Consider this MySQL table: +----------+-----------+---------+--------+ |status_id |session_id |pilot_id |present | +----------+-----------+---------+--------+ |1 |61 |901 |1 | |2 |63 |901 ...

rails Creating a model instance automatically when another is created

Hello I have a user model and a ratings model. Whenever a new user is created I want to create a new feedback model with it automatically. Each user model has one feedback model and each feedback model has many ratings. My Classes class User < ActiveRecord::Base end class Feedback < ActiveRecord::Base belongs_to :user has_many ...

How to design data storage for partitioned tagging system?

How to design data storage for huge tagging system (like digg or delicious)? There is already discussion about it, but it is about centralized database. Since the data is supposed to grow, we'll need to partition the data into multiple shards soon or later. So, the question turns to be: How to design data storage for partitioned tagging...

When NOT to use Cassandra?

There has been a lot of talk related to Cassandra lately. Twitter, Digg, Facebook, etc all use it. When does it make sense to: use Cassandra, not use Cassandra, and use a RDMS instead of Cassandra. ...

What is the usage of Local Database Cache project type in Visual Studio?

What is the usage of Local Database Cache project type in Visual Studio? ...

PHP mySQL database check

Hi guys, I am having endless troubles with duplicate entries, so I need to check the database, and if a user has already entered that day, their entry will not be submitted and they will be redirected to a landing page that tells them they have already entered that day, and that they may only enter again tomorrow. The field I would like...