database

ASP.NET 4.0 Database Created Pages

I want to create ASP.NET 4.0 dynamic pages loaded from my MS SQL server. Basically, it's a list of locations with information. For example: Location1 would have the page www.site.com/location/location1.aspx Location44 would have the page www.site.com/location/location44.aspx I don't even know where to start with this, URL rewriting ma...

In Symfony 1.2 how can I get the current database name from the database.yml file in Propel?

I have a raw sql query I need to run, but the database name changes in each environment (live: db, dev db_test) I need to get the current database name from the databases.yml file. How can I get just the current database name? I am using the Propel ORM ...

Normalize database or not? Read only MyISAM table, performance is the main priority (MySQL)

I'm importing data to a future database that will have one, static MyISAM table (will only be read from). I chose MyISAM because as far as I understand it's faster for my requirements (I'm not very experienced with MySQL / SQL at all). That table will have various columns such as ID, Name, Gender, Phone, Status... and Country, City, Str...

How to update multiple rows with one single query

I use Postgresql + PHP. Say I have this table: Books ( id, title, year ) and this array of titles in PHP: $titles = array ("bible","kafka","Book of Eli"); now I want update all rows where the title is in the $titles array above. So I need a query like this: UPDATE books SET year = '2001-11-11' WHERE title is in $titles; Is is ...

What are the best practices for writing a DTO layer in an enterprise ASP.net application?

Are there any open source alternatives that come with backed in caching etc? ...

Is it viable and necessary to encrypt bytes?

We have a requirement from customer that if someone gets access to the database, all data that includes personal information should be encrypted, so that when they do select calls, they shouldn't be able to see anything in clear text. Now this isn't any problem for Strings, but what about bytearrays? (that can potentially be quite huge (...

Efficient update of SQLite table with many records

I am trying to use sqlite (sqlite3) for a project to store hundreds of thousands of records (would like sqlite so users of the program don't have to run a [my]sql server). I have to update hundreds of thousands of records sometimes to enter left right values (they are hierarchical), but have found the standard update table set left_va...

attempt to write a readonly database in Android2.1

This is the error: android.database.sqlite.SQLiteException: attempt to write a readonly database This is my code: SQLiteDatabase db = mDatabase.getWritableDatabase(); db.beginTransaction(); try { // add new records ContentValues newRecord = new ContentValues(); newRecord.put(Emergencydetails.EMERGENCYNUMBER, emergencyNumber....

Booking logic and architecture, database sync: Hotels, tennis courts reservation system ...

Hello Stackers, Imagine that you want to design a tennis booking system. You have 5 tennis clubs as partners with no online api allowing you to check on their side if a court is booked or not: You have to build this part as well. Every time a booking is done on their side you want it to be known by our system. Probably using a POST req...

Which would be better? Storing/access data in a local text file, or in a database?

Basically, I'm still working on a puzzle-related website (micro-site really), and I'm making a tool that lets you input a word pattern (e.g. "r??n") and get all the matching words (in this case: rain, rein, ruin, etc.). Should I store the words in local text files (such as words5.txt, which would have a return-delimited list of 5-letter ...

Which DB Server should I use?

I have to develop a new (desktop) app for a small business. This business currently has an Access database with millions of records. The file size is about 1.5 GB. The boss told me that searching on this DB is very slow. The DB consists of a single table with about 20 fields. I also think the overall DB design isn't great. I thought to ...

How to find date ranges in records with consecutive dates and duplicate data

There's probably any easy solution for this, but I can't see it. I have a table with consecutive dates and often duplicate associated data for several of these consecutive dates: Date Col1 Col2 5/13/2010 1 A 5/14/2010 1 A 5/15/2010 2 B 5/16/2010 1 A 5/17/2010 1 A 5/18/2010 3 C 5/19/2010 3 C 5/2...

Have 2 separate tables or an additional field in 1 table?

Hello, I am making a small personal application regarding my trade of shares of various companies. The actions can be selling shares of a company or buying. Therefore, the details to be saved in both cases would be: Number of Shares Average Price Would it be better to use separate tables for "buy" and "sell" or just use one table ...

how to access picture stored in database via http request in rails

As per title. And is there anyway to cache such data? thanks ...

Database doesn't update using TransactionScope

I have a client trying to communicate with a WCF service in a transactional manner. The client passes some data to the service and the service adds the data to its database accordingly. For some reason, the new data the service submits to its database isn't being persisted. When I have a look at the table data in the Server Explorer no n...

Strange data swapping error occurs when I attempt to update rows in my table from another table in my sql database...please help!

So I have a table of data that is 10,000 lines long. Several of the columns in the table simply describe information about one of the columns, meaning, that only one column has the content, and the rest of the columns describe the location of the content (its for a book). Right now, only 6,000 of the 10,000 rows' content column is filled...

Saving data from flash using amfphp!

I know how to get the data from my database, but i can't seem to figure out how to send data to the database from flash using amfphp!Please give me an as3 and php service example.Thanks a lot ! ...

how to backup database from sqlexpress

Hi all Please help me to backup my database from sqlexpress. ...

Can't update rows in my database using Entity Framework...?

Okay, this is really weird. I made a simple database with a single table, Customer, which has a single column, Name. From the database I auto-generated an ADO.NET Entity Data Model, and I'm trying to add a new Customer to it like so: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Test { ...

PHP - static DB class vs DB singleton object

I don't want to create a discussion about singleton better than static or better than global, etc. I read dozens of questions about it on SO, but I couldn't come up with an answer to this SPECIFIC question, so I hope someone could now illuminate me buy answering this question with one (or more) real simple EXAMPLES, and not theoretical d...