database

Storing Business Hours in a Database

I'm currently trying to work out the best way to store a business' hours of operation in a database. For example: Business A has the following hours of operation Monday: 9am - 5pm Tuesday: 9am - 5pm Wednesday: 9am - 5pm Thursday: 9am - 5pm Friday: 9am - 5pm Saturday: 9am - 12 Midday Sunday: Closed Currently I'm have a data model si...

Storage of many log files

I have a system which is receiving log files from different places through http (>10k producers, 10 logs per day, ~100 lines of text each). I would like to store them to be able to compute misc. statistics over them nightly , export them (ordered by date of arrival or first line content) ... My question is : what's the best way to ...

Any Rails-Migration-like framework suggestions for .NET?

The idea of "rails migration" is awesome and I'm going to use this way in my coming new project on .NET platform for db schema version control. MigratorDotNet seems like something I need but some limitations block me, such as no stored procedure support. Are there any better solutions for that? ...

Connection pooling for a rich client accessing a database directly

I have a legacy application WinForms that connect directly to a SQL Server 2005 database. There are many client applications open at the same time (several hundreds), so I want to minimize the number of connections to the database. I can release connections early and often, and keep the timeout value low. Are there other things I need...

Does MSCRM web-service support database transactions?

One would assume with any web-based data application that database transactions would be an integral part of the design. Looking around at CrmService, I can't find anything that suggests that transactional 'CRUD's are available. Is it the case that this is not supported/implemented in MSCRM? If it is, and i have missed it, could someone ...

Can I change foreign key IDs when deleting the FK row?

I need to make a column unique in one of our database tables, and we want to completely remove any duplicates from the table. There is however a snag, in that there are a bunch of dependencies to other tables that will be affected. For example, let’s say we’ve got the following relationship: ------------------- ------------------- * ...

sql server connection error

I keep getting the following error when I try to register a db server: TITLE: Connect to Server Cannot connect to p3swhsql-v14.shr.phx3.secureserver.net. ADDITIONAL INFORMATION: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that u...

Problem with QSqlTableModel -- no automatic updates.

After setting up a table model in Qt 4.4 like this: QSqlTableModel *sqlmodel = new QSqlTableModel(); sqlmodel->setTable("Names"); sqlmodel->setEditStrategy(QSqlTableModel::OnFieldChange); sqlmodel->select(); sqlmodel->removeColumn(0); tableView->setModel(sqlmodel); tableView->show(); the content is displa...

Providing customizable forms to non-technical users

I'm curious how others have offered customizable forms to their website's users (who are primarily non-technical). It is possible that there is a library out there that achieves this, but I have not seen one. Some of the concerns are: Options for each form element What kind of options to provide to the user, keeping in mind that all o...

How to do monthly refresh of large DB tables without interrupting user access to them

Hi all, I have four DB tables in an Oracle database that need to be rewritten/refreshed every week or every month. I am writing this script in PHP using the standard OCI functions, that will read new data in from XML and refresh these four tables. The four tables have the following properties TABLE A - up to 2mil rows, one primary k...

SQL: Help me optimize my SQL

Hi I'm looking to optimize my SQL. My database schema is: HOMES home_id address city state zip primary_photo_group_id HOME_PHOTOS photo_id (primary key) home_id (home primary key) photo_group_id (a photo group is the same image, resize from thumbnail to large size) home_photo_type_id (the size of the image be it a thumbnail or a...

SQL: Help with LEFT OUTER JOIN

It appears my SQL isn't limiting results based on price. In my previous post, http://stackoverflow.com/questions/1039771/sql-help-me-optimize-my-sql, people indicated that I should use a LEFT OUTER JOIN. SELECT homes.home_id, address, city, state, zip, price, photo_id, photo_url_dir FROM homes LEFT OU...

Modifying an Oracle number column

I have a table where one of the columns is Number(22, 12) where is should be Number(22,2). Since it has data in it I can't just modify the column to the correct precision. What would be the most efficient way to go about fixing the column? One thing I didn't mention before is that the table has several indexes, triggers and is linked ...

How should I escaping quotes and line breaks for Oracle SQLLoader (sqlldr) importing?

Hello. FIRST: Yes, I know about CONCATENATE and CONTINUEIF, but I might not be smart enough to understand the documentation. I don't "get" how they solve my problem. Thank you... I am in the position of having to create a file for importing into an Oracle DB by way of sqlldr. The columns are required to be delimited by "~" (Don't ask....

General Oracle Results Table

I am designing a new laboratory database. I want all the raw results (for all tests) in one table (RESULTS). However, the numerical values vary greatly in quantity and precision. For example, some results are simply a whole number count, while other results come from highly sensitive equipment. Which case below is ideal (and why)? O...

why FK constraint does not work in MySql

I have created two tables ORDERS and ORDERITEMS with the following constraint: alter table OrderItems add constraint FK_Reference_30 foreign key (orderId) references Orders (orderId) on delete restrict on update restrict; If I want delete one entry in ORDERS table and that orderId is used in ORDERITEMS table, I should get error or w...

General Oracle Data Collection Storage

I am designing a new laboratory database. I want to store the raw results for all tests together. In some cases, the result is a single value. However, the result is sometimes a raw waveform or signal. Which case below is ideal (and why)? ... or provide your own ideal option. Option 1: Store each individual data point as a separate...

DB Schema Organization

I'm currently in the planning phase of building a scheduling web app (for volunteer staffing of events), and I've got a question for those with more experience. Background: There's a calendar of events, and any user at any time can register for any of the events. At a later time, but before that event, one of the admins will step in an...

Representing a tree structure out of a db

Hi to all, I've read about various ways of representing hierarchical structure within a relational database like Adjacency List. I have decided to try a straight forward way like a table (oversimplified) done like this: id | name | parent where parent is a inner reference to id. This should be enough to represent a simple tree of undef...

How do I find the database file on an Android virtual device?

My plan is to prepopulate a database on a virtual device and then include database in the distribution of my app. However, I can't find the database file. Is it on my hard disk some where? How do I get it? I tried connecting using adb, I did an "ls" and then got really scared by this obscure list of directories: sqlite_stmt_journals ...