Some issues with timezones in PHP have been in the back of my mind for a while now, and I was wondering if there are better ways to handle it than what I'm currently doing.
All of the issues revolve around reformating database stored dates:
When dealing with a site that has to support multiple timezones (for users), to normalize the ti...
I am considering writing a simple database application for my wife, but I'm hung up on good programming practice, and want to have a human readable source for storing the database schema.
Only, I don't know of any tools for the job, and I can't believe that they don't exist---probably I just don't know what to ask google, but I'm not f...
There seems to be three common approaches for mapping an application end user to a database user.
One to One Mapping: Each Application user (bob, nancy and fred) also get a corresponding database user account (bob nancy and fred).
N to M mapping: Each application user is mapped to a database user that represents their role. bob and...
Whenever we have to update the database; we delete the values from the table first and then add the latest values. This ensures that everything is updated correctly.
This adds little bit overhead to the system but we haven't faced any performance issues because of this.
Is this always the best thing to do?
...
I found a bug in Delphi 2009's implementation of TFields and wrote a quick patch. I copied DB.pas to my projects folder and added it to the project's file list, but now I can't get it to compile. The first two error messages don't even make any sense when I go to the indicated places in the code.
Surely if anything can be counted on t...
I have a contact database where I can send an email to a single contact or to a group of contacts based on a query - however I would like to add a checkbox function so if I decide I want to send an email only to a handful of people in one of my query lists, I can check their name and it will send.
The issue I'm having is I don't underst...
I have a couple of tables in my database, one called Task, and another called User. The Task table has two columns CreatedBy and ModifiedBy that map to the UserId column in the User table.
I want to add the User table to the dbml file and add the associations. I notice now that when I look at class I have two properties one called Use...
I've created a database in Visual Studio 2008 in an App_Data folder of a MVC Web Application project. This results in an mdf file for the database that can be explored in the Server Explorer tab. You can create a SQL script for changes you do to the database.
So I'm wondering how you run these sql change scripts to an mdf-file in Visual...
My webapp will need to use multiple database shards, and occasionally need to query these shards in parallel. Are there any web scripting languages that have mature, stable support for parallel non blocking database access? If so, can you point me in the right direction? Free open source is preferred, but I mostly want something that ...
I've built a nice website system that caters to the needs of a small niche market. I've been selling these websites over the last year by deploying copies of the software using Capistrano to my web server.
It occurs to me that the only difference in these websites is the database, the CSS file, and a small set of images used for the ind...
Hi, I have a single large table which I would like to optimize.
I'm using MS-SQL 2005 server. I'll try to describe how it is used and if anyone has any suggestions I would appreciate it very much.
The table is about 400GB, has 100 million rows and 1 million rows are inserted each day.
The table has 8 columns, 1 data col and 7 columns us...
In my database schema I have an entity that is identified. The identifier can be reused and thus there is a one-to-many relation with the entity. Example: A person can have a nickname. Nicknames are not unique and can be shared amongst many people. So the schema might look like:
PERSON
id
name
nickname_id
NICKNAME
id
name
The issue i...
I have a table in a DB (Postgres based), which acts like a superclass in object-oriented programming. It has a column 'type' which determines, which additional columns should be present in the table (sub-class properties). But I don't want the table to include all possible columns (all properties of all possible types).
So I decided to ...
Good day,
I have about 4GB of data, separated in about 10 different tables. Each table has a lot of columns, and each column can be a search criteria in a query. I'm not a DBA at all, and I don't know much about indexes, but I want to speed up the search as much as possible. The important point is, there won't be any update, insert or d...
What are the things that you would consider when defining indexes, clustered and non-clustered, for SQL Server? Are there any anti-patterns that DB newbies should be aware of? Please explain the "Why" or provide references if possible.
...
I'm trying to connect to a remote database (hosted on Netfirms www.netfirms.ca if anyone is curious) using hibernate. My mapping file is as follows:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:...
Hi,
do you know any good algorithms that match two strings and then return a percentage in how many percent those two strings match?
And are there some, that work with databases too?
...
The following SQL separates tables according to their relationship. The problem is with the tables that sort under the 3000 series. Tables that are part of foreign keys and that use foreign keys. Anyone got some clever recursive CTE preferably or a stored procedure to do the necessary sorting?? Programs connectiong to the database are no...
I'm using this database where the date colomn is a numeric value instead of a Date value.
Yes, I know I can change that with a mouseclick, but all the applications using that database were made by one of my predecessors (and everyone after him just ignored it and built on). So if I'd change it to Date a lot af applications would fail. ...
I'm currently estimating how to best share data between offices at different geographical locations.
My current preference is for using SQL Server Merge Replication and have a main database and handful of subscribers.
The system will also need to allow a few work sites to work disconnected (no or little connectivity on construction site...