database

How can I drive a boolean field in SQL Server off of a nullable column?

I'd like to have two columns in a database, one for tracking whether or not the user has submitted something, and another for the timestamp of that submission. How can I structure the table definition so that the state of these two columns is never inconsistent? Basically, I'd like the boolean field to be driven by whether or not a Sub...

Convert MSAccess Project Management Application to PHP/MySQL: Which Methodology?

I've got to convert a not terribly complicated bespoke project management system from MsAccess Application to PHP/MySQL. I've been programming for donkey's years but embarrassingly know practically nothing about modern methodologies. So the old 'learning curve' versus 'improved efficiency' conundrum rears its ugly head once again. Alt...

Data on the Frequency of Edit Operations Required to Correct a Misspelt Word

Does anybody know of any data that relates to the frequency of the types of mistakes the people make when they misspell a word? I'm not referring to words themselves, but tje errors that are made by the typist. For example, I personally make transposition errors the most followed by deletion errors (that is, not including a letter I sh...

VBA for Access 2003 - DDL help with creating access file: setting the Autonumber data type

So I have the below VB that creates an access file in the default workspace, creates a table, create some fields in that table...just need to know the syntax for setting the first data type/field to autonumber...GUID, Counter, etc will not work as in Access SQL ' error handling usually goes here dim ws as workspace dim dbExample as dat...

Online Database

Hello! I want to write an application that reads blogpost from the internet and then present in my own way. The blogposts are stored in databases, so I figured that the only thing I had to do was to query an online database for the posts that I want to show.. But I can´t find a way to opoen a connecion to an online database... anyone ...

SQLite3 DB File On Server - How Can I Use in Objective-C?

I would like for my iPhone application to interact with a sqlite3 database file that is hosted on my server. How can I achieve this with Objective-C? Let me know if you need more details. ...

How should I build a simple database package for my python application?

I'm building a database library for my application using sqlite3 as the base. I want to structure it like so: db/ __init__.py users.py blah.py etc.py So I would do this in Python: import db db.users.create('username', 'password') I'm suffering analysis paralysis (oh no!) about how to handle the database connect...

Database with "Open Schema" - Good or Bad Idea?

The co-founder of Reddit gave a presentation on issues they had while scaling to millions of users. A summary is available here. What surprised me is point 3: Instead, they keep a Thing Table and a Data Table. Everything in Reddit is a Thing: users, links, comments, subreddits, awards, etc. Things keep common attribute like up/down...

PHP mySQL - replace some string inside string

i want to replace ALL comma , into ,<space> in all address table in my mysql table. For example, +----------------+----------------+ | Name | Address | +----------------+----------------+ | Someone name | A1,Street Name | +----------------+----------------+ Into +----------------+----------------+ | Name ...

What's wrong with this SQL query?

I have two tables: photographs, and photograph_tags. Photograph_tags contains a column called photograph_id (id in photographs). You can have many tags for one photograph. I have a photograph row related to three tags: boy, stream, and water. However, running the following query returns 0 rows SELECT p.* FROM photographs p, photograph...

Efficient job progress update in web application

Hi, Creating a web application (Django in my case, but I think the question is more general) that is administrating a cluster of workers doing queued jobs, there is a need to track each jobs progress. When I've done it using database UPDATE (PostgreSQL in this case), it severely hits the database performance, because each UPDATE create...

How do i put this data in my DB?

Hello, i have an array in $this->data that looks like this: Array ( [Boeking] => Array ( [start] => 25/12/2010 [end] => 26/12/2010 [centrum] => Brussels [responsible] => Wouter [email] => [email protected] [materials] => Array ( ...

ASP.net MVC How to run multiple instances of the same app at the same time in different subdomains?

ASP.net MVC How to run multiple instances of the same app at the same time in different subdomains? I have a dozen or so subdomains. sub1.website.com sub2.website.com and the folder structure like this \website\sub1 \website\sub2 If i need to run the same app for all of the subdomains, what would be the best appoach? Host is in t...

Can I use EXISTS keyword in sql query for assignment of result

Can I assign a value with EXISTS in the query. Currently it is giving me error Incorrect syntax near '='. But when I uses this query only it runs as expected. IF EXISTS (SELECT @PK_LOGIN_ID=PK_LOGIN_ID FROM dbo.M_LOGIN WHERE LOGIN_NAME=@LOGIN_NAME AND PASSWORD=@PASSWORD AND FK_ROLE_ID=@FK_ROLE_ID) RETURN @PK_LOGIN_ID ...

Techniques for querying a set of object in-memory in a Java application

Hi All, We have a system which performs a 'coarse search' by invoking an interface on another system which returns a set of Java objects. Once we have received the search results I need to be able to further filter the resulting Java objects based on certain criteria describing the state of the attributes (e.g. from the initial objects ...

Delphi 7 SOAP client DB Grid apply updates and refresh

Is there any single event on the DataSet that I can use to make sure my client has applied updates and has the newest data from the SOAP Server? At the moment I need to add clientDataSet.applyupdates(0); clientDataSet.refresh; for each AfterDelete and AfterPost event on all datasets I use in my SOAP client? It seems rather a lot...

Secure way to backup MySQL databases?

What is the best/secure way to backup a mysql database on windows server (2008)? I have "MySQL Administrator" but that requires that you save passwords for backup project. I'm not keen on doing as anyone gaining access to the server would then have easy access to the database. Can you do anything similar to SQL Server like using Windows ...

[Hibernate] Problem with saveOrUpdate()

Hi, I've problem with Hibernate. I have a class User class User { int id; String name; } where id is native generator in User.hbm.xml , and name is primary-key in DB. In my database , I saved some information about Users. Than, I want to connect with this information about User. For example in my DB i have row INSERT INTO U...

How do I get PHP variables from this MySQL query?

I am working on an Asset Database problem using PHP / MySQL. In this script I would like to search my assets by an asset id and have it return all related fields. First I query the database asset table and find the asset's type. Then depending on the type I run 1 of 3 queries. <?php //make database connect mysql_connect("localhost...

Granting a SQL Server Login Access to a Database - SQL Server

I want to grant access to a database for a SQL Server login. I know about sp_grantdbaccess, however it is deprecated. What can I use instead and how can I check if the login does not already have access to the database? Scenario: UserA creates database - in sys.database_principals I have an entry with name dbo and with the sid of UserA....