database

Loading huge amount of data from database - what to consider?

I am building an application in Winforms. This will talk to DB(oracle) and load huge amount of data (only for viewing). Apart from caching and paging, is there any other point to consider? Performance is an issue, but so is the consideration of limited memory on user machine. Thanks. EDIT - Additional info: I also have an option to bui...

determine if blob is an image without loading entire field?

is there a way to read only a few bytes out of a BLOB type field in a database (for this question it doesn't matter the DB brand) and determine if the binary content is an image (assume it is one of: JPG, GIF, PNG)? I have a webapp that stores files in the database, and if it is an image, I want to show a thumbnail, otherwise I want to ...

Are the order of rows in a MYSQL table fixed, so that queries always return them in that order?

I have an application which collects data into a mysql table. The table has no unique id column, so I can't reference a specific row by id. I want to write a dump application which every day dumps the new rows added to the table to upload them elsewhere. I could do it by adding a unique id field and storing the last id dumped, but I don...

Webservice Orchestration for database sync

I have two webservices, each service has its own database, one is master (A) and other is slave (B). If a call is made to service B, it also calls A to sync A's database. If for some reason A is not available, B needs to bring A up to date with its data at a later time. Any suggestion on what mechanism can be used for out of process d...

Three table join with joins other than INNER JOIN

I am learning SQL and am trying to learn JOINs this week. I have gotten to the level where I can do three table joins, similar to a lot of examples I've seen. I'm still trying to figure out the tiny details of how things work. All the examples I've seen of three table joins use INNER JOINS only. What about LEFT and RIGHT JOINs? Do ...

MySQL: Why use VARCHAR(20) instead of VARCHAR(255)?

Hello! In MYSQL you can choose a length for the VARCHAR field type. Possible values are 1-255. But what are its advantages if you use VARCHAR(255) that is the maximum instead of VARCHAR(20)? As far as I know, the size of the entries depends only on the real length of the inserted string. size (bytes) = length+1 So if you have the wor...

Best way to cache pages in a database?

I’m working a project involving datamining from various sites, a good analogy is gathering statistical data on eBay auctions. However as well as storing the key data, I really need to ensure access to the original page, and on some sites the original pages may not be permanent – like if eBay removed an auction’s page after completion. I’...

If my database user is read only, why do I need to worry about sql injection?

Can they (malicious users) describe tables and get vital information? What about if I lock down the user to specific tables? I'm not saying I want sql injection, but I wonder about old code we have that is susceptible but the db user is locked down. Thank you. EDIT: I understand what you are saying but if I have no response.write fo...

Why to have a join table for 1:m relation in SQL

What is the benefit of having junction tables between the first 1:m and the second 1:m relations in the following database? The book Joe Celko's trees and hierarchies in SQL for Smarties says that the reason is to have unique relations in 1:m's. For instance, the following tables resrict users to ask the exactly same question twice an...

Maximum execution time in phpMyadmin

Hello When I try to execute (some) queries in phpMyadmin I get this error Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\phpmyadmin\libraries\dbi\mysql.dbi.lib.php on line 140 because I have a very large table (over 9 millions records) I have edited the file C:\xampp\php\php.ini and changed the valu...

How to select all values, not just those in where clause

I have a query that looks like this: SELECT id, GROUP_CONCAT(type SEPARATOR ',') AS type FROM rock_types WHERE type IN("DWS","Top rope") GROUP BY id this returns all the ids that have a type of DWS or top rope or both with the types concatenated. However, there are more types than just those 2. Is it possible to still select ...

Creating music library database that is easily updatable

I am writing a music player for the sake of learning. I am not sure how to design the database part of it (I want to create it myself, not use some version of MySQL). My best idea so far is to create a "song" class, with filename, title, artist, album, etc. variables. Then I would have an array of "songs". This works well enough, but whe...

Syncing a mobile (iPhone) app with web app

Hello, I'm building an iPhone app / web application, and I'm trying to think through the best way to have two-way sync of the databases. I'll probably go with sqlite on the iPhone and mysql on the web (as that's what I know) but am unsure of how to handle keeping them in sync. Here's a sample schema: index_id(autoincrement) | title | ...

A very fast searchable file based Database

Anyone know a very fast file based database , for example http://www2.think-less-do-more.com/avafind/ it indexes entire hard disk (filenames ,attributes etc.. ) into an unknown file format, it searches very very fast, I am looking for a db like that , don't need relational one, just to simply store some text values, but needs to search i...

Efficient way to realize permalinks in php

What is the most efficient way to realize php-driven permalinks? Basically I want to reduce the database accesses to a minimum. What is the best way to redirect to an id stored in the database? ...

Where to find a good database (factory) class with connectionpooling?

I found a lot of information about how to make a database factory or how to deal with connection pooling but i nowhere found a complete solution. I have always used my own solutions, but they're not complete i think or could be improved. Are there some good designed classes any of you use that i can find on the net? Thanks ;-) ...

Access development - keeping Live database in sync with dev database

Hi I'm a MSSQL developer and I've recently been tasked to fix up an Access based system. This change involves making database changes. I dont want to develop on the "live" datbase, i'd rather make a copy of one and then at the end when all testing is complete sync the live one with the dev in terms of the structure. How do I do this w...

invoking trigger on column update

Hi all, I have a condition where in a trigger should be invoked whenever a particular column gets updated in a table but not when any other column gets updated. Is it possible? ...

How do I connect to Interbase 6 on a remote location from .NET?

What drivers should I use? Are they free? How should the connectionstring look like? Thanks ...

Simple, linq-able, file based database

Hey, what's the easiest way to use a file-based database with LINQ in C#? It would be best if I could use it without installing extra components. EDIT: I want to use it for a file index. Not the whole file system, but the database should be not too slow and not too big. ...