database

Returning multiple rows per row (in Zend Framework)

I have a MySQL database containing these tables: sessions -------- sessionid (INT) [courseid (INT)] [locationid (INT)] [comment (TEXT)] dates ----- dateid (INT) sessionid (INT) date (DATE) courses ------- ... locations --------- ... Each session has a unique sessionid, and each date has a unique dateid. But dates don't necessarily...

What fields should be included in in a database table for user authentication?

I am designing a table for the purpose of user authentication. What fields should be included in this table? What is the minimum to be able to track user credentials, track failed login attempts for account locking, actually lock accounts, etc. ...

Database/data storage for high volume of simple transactions

I have written a PHP application which requires storage of millions of integers between 0 and 10,000,000 inclusive. Each number is incremented by one very frequently (on average 100 values are updated every second) and read very frequently (20,000 reads per second). The numbers are reset to 0 either nightly, weekly, monthly or annually. ...

SQL Server Version Updating Tables

I am part of a software development company looking for a good way to update my SQL Server tables when I put out a new version of the software. I know the answer is to probably use scripts in one form or another. I am considering writing my own .NET program that runs the scripts to make it a bit easier and more user-friendly. I was wond...

Too many columns in a single database table?

An application I am dealing has a single table with 170 columns. In my mind, it would make more sense to break this table up into smaller, more logical groupings, though you could have an issue where numerous tables have to be joined if you needed data from columns in the various tables. I am wondering what the pros and cons of these...

problem in restoring database

hi there i had to uninstall sql server 2005, coz it was configured to be used only in windows authentication mode, and install it again in mixed mode. so i had to take a backup of my only database there, and restore it again on installing the sql server back, though the backup was taken successfully but when am trying to restore it, it i...

Getting this error while creating a recordSet in Dreamweaver - Using MAMP

I get this error after installing mamp and setting up my site on dreamweaver. I connected to a database I created in phpMyAdmin, then i tried to create a recordSet for my application then i get this error. While executing addDynamicSource in Recordset.htm, a JavaScript error occured. Any idea anybody what this is and how to fix it. tha...

Is it a good idea to use an integer column for storing US ZIP codes in a database?

From first glance, it would appear I have two basic choices for storing ZIP codes in a database table: Text (probably most common), i.e. char(5) or varchar(9) to support +4 extension Numeric, i.e. 32-bit integer Both would satisfy the requirements of the data, if we assume that there are no international concerns. In the past we've ...

DCHP with database backend

Hi people. Here my first question :P. I am developing some little projectes. I want to change dhcp server rules of IP/MAC without rebooting the server (In a dinamic infrastructure). I think that the best solution is to use a dhcp server with a database backend, in order to change the SQL information (With an easy JDBC client). But I ...

CommandBehavior.SingleRow causing DB connection to remain open?

Recently I was working on a project in VB.NET, and I was encountering a mysterious problem with some of the DB connections. This was a project that I inherited from someone else and they had used something like this: Dim reader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection And CommandBehavior.SingleRow) //a...

How to store a scaleable sized extensible event log?

Hello everyone! I've been contemplating writing a simple "event log" that takes a paramater list and stores event messages in a log file, trouble is, I forsee this file growing to be rather large (assume 1M entries or more) the question is, how can I implement this system without pulling teeth, I know that SQL would be a possible way t...

Exceptions inside repositories: how do you handle them?

An easy one that I am interested in getting your thoughts on: With your repository implementations, do you like to let exceptions be thrown inside the repository and leave the exception handling to the caller, or do you prefer to catch exceptions inside your repository, store the exception and return false/null? ...

How can we migrate to using VS2005's Database Projects?

At my company, our current method of updating the database is to connect using the Server Explorer in VS2005, then modify the stored procedures by opening them and editing. The devs here seem to enjoy that "write and save it like it's code" mentality. It is pretty convenient, how it automatically turns Create into Alter and runs the sc...

There is probably a name for this. Please re-title appropriately.

I'm evaluating the idea of building a set of generic database tables that will persist user input. There will then be a secondary process to kick off a workflow and process the input. The idea is that the notion of saving the initial user input is separate from processing and putting it into the structured schema for a particular app...

Add Database Diagram to Source Control?

Is there any way to add a SQL Server Database Diagram to source control? I can't seem to find a way to script it out of the database. If so, is there a way to get that diagram into a Visual Studio Database Project for easy deployment? ...

How do I Store / Access Translations Efficiently?

I am trying to translate some of the phrases of my website into various languages. so, in my database, I have a table with rows of ID//text//dest_language//text_in_dest_language At the moment, I retreive each translation one by one: get text_in_dest_language where text="Hello World" and dest_languge="zh" This results in 40-50 db call...

Need Help with Transbase database

There is a business need to upgrade the Front end to latest technology using SQL Server 2008 and its features so need to transfer data from Transbase database. Everything works except images. So looking for some help here. There are 3-4 different tables with OLE Object column. We are able to save all of them except 2 tables where we g...

MongoDB or CouchDB - fit for production?

I was wondering if anyone can tell me if MongoDB or CouchDB are ready for a production environment. I'm now looking at these storage solutions (I'm favouring MongoDB at the moment), however these projects are quite young and so I foresee that I'm going to have to work quite hard to convince my manager that we should adopt this new tec...

JSP website pre-database configuration

I'm working on a website in JSP (in GWT really, but on the server side, it's really just JSP), and I need to configure my database. I know HOW to code in the database connection etc, but i'm wondering how/where the database config should be saved. To clarify my doubt, let me give an example; in PHP, a website usualy has a config.php, w...

display mysql results on same page

Ok, so I'm used to working with C# and ASP.NET which automatically allows one to display database results immediately on the same page from which they were requested. I am, however, now using PHP which I haven't coded in in years. I have the results popping up in a separate page because the form tag's 'action' option is set to that spec...