database

Why is MySQL with InnoDB doing a table scan when key exists and choosing to examine 70 times more rows?

Hello, I'm troubleshooting a query performance problem. Here's an expected query plan from explain: mysql> explain select * from table1 where tdcol between '2010-04-13 00:00' and '2010-04-14 03:16'; +----+-------------+--------------------+-------+---------------+--------------+---------+------+---------+-------------+ | id | select_ty...

Reverse engineer an ORM

Given a [mysql] database with a given schema, is it possible to generate an ORM interface for it? doesn't matter if its php, python or perl. in other words, I have a database and I have to ask it a few questions. while I could just craft a bunch of SQL queries (okay, several dozen), this is way more interesting to think about. is this ...

Sample application using Northwind 2007 Access database

Is there a sample C# winform application (a starter kit or something ) which use the Northwind 2007 Acess Database version ? some concept like http://northwind.codeplex.com/ ? ...

Generate data for an application

Hi there If your planing to build an application but you don't have enough data to fill a database, how you will generate some ? Do you know any application which can generate data based on some criterias and export it later in MySQL database? Thanks :) ...

How to craete batch files and execute them simultaneously usign C# thread

Hi... I have code for Database which is about of 4000 lines. It takes around 30 40 min. for executing. I want to create 20 batch files containing equal lines of command so that I can start them at same time using thread. Can anyone please guide me how should I proceed so that the time it normally takes to execute is reduced. Thanks, ...

Retriving data from ListView control

I have a ListView control set up in details mode with 5 columns. It is populated by code using the following subroutine: For j = 0 To 14 cmd = New OleDbCommand("SELECT TeacherName, ClassSubject, BookingDate, BookingPeriod FROM " & SchemaTable.Rows(i)!TABLE_NAME.ToString() & " WHERE (((BookingDate)=" & Chr(34)...

What is the preferred way to update database schemas in multiple production environments

I am about to install some 20 servers with the same web application in multiple locations connected to their own local database. I will be updating the web applications remotely (perhaps using debian's package manager) and I'm sure will eventually need to update the database schemas. Since each server could be eventually be using a dif...

Walking through an SQLite Table

I would like to implement or use functionality that allows stepping through a Table in SQLite. If I have a Table Products that has 100k rows, I would like to retrive perhaps 10k rows at a time. Somthing similar to how a webpage would list data and have a < Previous .. Next > link to walk through the data. Are there select statements t...

Database design suggestions for a configurable product eshop

Hello, I am biulding an e-shop that will have configurable products. The configurable parts will need to have different prices and stocks from the main product. What database design would be best in this case? I started with something like this. Features id name Features Options id id_feature value Products id name price P...

How to deserialize to Report2008?

Hi: I have a Report Service running as a web service. I call the web service to get the RDL back as a byte(), then I call XmlSerializer to cast it to a "Report" type autogenerated by the report service The following code works just fine for SQL2005, but it would throw and exception for SQL2008, when tries to deserialize so if the report...

Best method to store Enum in Database

What is the best method of storing an Enum in a Database using C# And Visual Studio and MySQL Data Connector. I am going to be creating a new project with over 100 Enums, and majority of them will have to be stored in the database. Creating converters for each one would be a long winded process therefore I'm wondering if visual studio o...

Syntax error in SQLite.net when passing column name as parameter

I am trying to rename a field in my database through SQLite.net and am getting a syntax error. My SQL that I have tested is: UPDATE candy SET name="Godiva" WHERE name="Sees"; and that works fine. I am using an SQLiteCommand with a CommandText of: UPDATE candy SET @field_name=@new_name WHERE @field_name=@old_name; and my code snipp...

What is the point in using a "real" database modeling tool?

We currently have a 10 year old nasty, spaghetti-code-style SQL Server database that we are soon looking to pretty much re-write from scratch as part of a re-write to a large web application. (The existing application will serve as the functional requirements for the next incarnation of the app). Some have suggested we use Visio to do a...

What are the reasons to use SQL Server instead of MySQL with a complex .Net project?

We currently have a 10 year old nasty, spaghetti-code-style SQL Server database that we are soon looking to pretty much re-write from scratch as part of a re-write to a large web application. (The existing application will serve as the functional requirements for the next incarnation of the app) The new version will be developed in .Net,...

[C#] SQLite - Creating and changing databases on the fly

Today I use SQLite and send a database-file with the project. However I want the database to be created when the user first starts the software. Is there a way to copy the code needed to create a database based on the existing database? The problem is that when a user downloads a new version he might be tricked into copying over his ...

Android threading and database locking

Hi, We are using AsyncTasks to access database tables and cursors. Unfortunately we are seeing occasional exceptions regarding the database being locked. E/SQLiteOpenHelper(15963): Couldn't open iviewnews.db for writing (will try read-only): E/SQLiteOpenHelper(15963): android.database.sqlite.SQLiteException: database is locked E/SQLit...

Do my user need to install a database program to use my database program?

This might be a stupid question but I'm new at all this. I want to create a Windows program that communicates with a database. Is there any way to do this without the user of my program have to install a database program like MySql? I'm going to program it in C#. ...

How to convert EER to SQL Table?

I have no problem with converting ER to SQL tables, but I don't know how can I convert EER to SQL tables? as you Know that EER has "is a" specification and inheritance, but I don't know how relational databases can connect with inheritance specification ...

At what point is it worth using a database?

I have a question relating to databases and at what point is worth diving into one. I am primarily an embedded engineer, but I am writing an application using Qt to interface with our controller. We are at an odd point where we have enough data that it would be feasible to implement a database (around 700+ items and growing) to manage...

Open-source generic web service to database interface?

I'm looking for a thin, generic layer (probably written in PHP) that sits between a database (probably MySQL) and web service clients (which could be anything). I imagine there would be config files of some sort that tell it how to map web service requests to database queries (or other DB commands). It would also need to handle authent...