database

How would you represent a hashtable collection in a database schema?

If you were trying to create a domain object in a database schema, and in your code said domain object has a hashtable/list member, like so: public class SpaceQuadrant : PersistentObject { public SpaceQuadrant() { } public virtual Dictionary<SpaceCoordinate, SpaceObject> Space { get; set; } } ...

Explain db tag storage method

from this post http://stackoverflow.com/questions/334183/what-is-the-most-efficient-way-to-store-tags-in-a-database It was recommended to store tag tables like this. Table: Item Columns: ItemID, Title, Content Table: Tag Columns: TagID, Title Table: ItemTag Columns: ItemID, TagID And another SO post said the same thing. Can anyone ...

Scalaris: P2P key-value database - your opinion please.

Why wouldn't you use Scalaris? ...

Database and connections

I am interested in knowing how databases handle connections that are not explicitly closed by the entity that initiated the connection. Say I have a database that can accept only 2 concurrent connections at a time. I have a piece of code that opens a connection and never closes it. This piece of code runs forever, but it uses the conne...

Is it possible to increase the max columns of an Oracle database to store huge arrays?

For reasons that are beyond my control I need to store huge arrays (10000+ entries) in database rows, and it has to be easy to access each index of the array individually, which means I'd rather avoid serialization/blobs, if at all possible. So my first idea, and the actual question here, is can I increase max columns for Oracle in anyw...

How to perform SQL LEFT JOIN's using Django?

Essentially I need a count of each Entries Comments: SELECT e.*, COUNT(c.id) as comments FROM blog_entry e LEFT JOIN blog_comment c ON e.id = c.entry_id GROUP BY e.id, e.name, e.name_slug, e.date_published, e.category, e.image, e.body, e.is_published, e.views, e.subscription_sent ORDER BY e.date_published DESC LIMIT 15; But I don't kn...

Upload Image to Server using PHP. Store file name in a MYSQL database, with other profile info.

Hi I have read many forums and websites that tell you how to upload an image to a server and I have managed to get this working, I can upload a file to a my server but storing the file name does work on the following example I found and I also need to create a form that allows more data to be entered to the database. I am stuck with this...

Database/Web servers as a Virtual Machines vs Bare Metal?

Hi! I manage a database (Oracle 8i) and web server (IIS) for about 50 simultaneous users on average and a theoretical limit of 100 simultaneous users. A mid level system. We just got a dual-socket Quad-core XEON - 16GB RAM - SAS-RAID-10 beast and I am exploring the possibilities of taking these two separate servers and merging them in...

Growing MS Access File Size problem

I have a large MS Access application with a lot of computations in VBA code. When I run it it eventually crashes due to excessive file size. There are a lot of intermediate tables and queries created and subsequently deleted, but Access does not reclaim the space. I have diligently closed all intermediate record sets and set all tempo...

iPhone SQLite DB and Web-based DB synchronization and interaction recommendations

I'm in the process of developing my second iPhone application, and am looking for architectural recommendations on DB handling. The idea is: 1. A database of information is stored on a server (LAMP stack), and information is delivered to the device via JSON. This part has been implemented. The user is able to "favorite" an item in th...

Staging database predicament

Suppose that there are 3 databases for Production Staging Dev As far as I know, Staging database need to be in sync with Production database But, When we are developing, we can do whatever we want with Dev database and change schema. Now here comes the Chicken & Egg problem. To test in Staging, Staging database schema need to be...

How to display source of DB2 SQL UDF

Is there any way to see SQL UDF body in DB2 control center? ...

How to increase performance for MySQL database

How to increase the performance for mysql database because I have my website hosted in shared server and they have suspended my account because of "too many queries" the stuff asked "index" or "cache" or trim my database I don't know what does "index" and cache mean and how to do it on php thanks ...

ORM performance cost

Does anyone have any experience that indicates what kind of performance hit a developer could expect by choosing to use an ORM (in Django, RoR, SQLAlechemy, etc) over SQL and hand-designed databases? I imagine there are complicating issues, including whether specifying a database within the constraints of an ORM increases or decreases th...

Querying based on a set of Named Attributes/Values

I am working with a set of what is essentially Attribute/Value pairs (there's actually quite a bit more to this, but I'm simplifying for the sake of this question). Effectively you can think of the tables as such: Entities (EntityID,AttributeName,AttributeValue) PK=EntityID,AttributeName Targets (TargetID,AttributeName,AttributeValue) P...

open 2 database in wince

Is it posible to open more than 2 databases in WinCE ? I work with Sql CE 3.5. Can I get example for open 2 connections? ...

How can I get column names from a table?

I need to query the database to get the column/field names, not to be confused with data in the table. For example, if I have a table named EVENT_LOG that contains eventID, eventType, eventDesc, and eventTime, then I would want to retrieve those field names from the query and nothing else. Please help? Thanks in advance. ...

How do I make a connection to an MS Access database using Codegear C++ builder (2007)

This seems to be the hardest thing to get help with - there are no books, no useful google results, and borland's own help facilities are far to complicated for me to isolate the answers I need. I want to make a connection to an already existing microsoft access database using builder. I want to be able add/delete/read the records. t...

Implementing an efficient system of "unread comments" counters.

I am trying to find an optimal solution for the following problem: there is a need to design a database (postgres-based), the system of triggers and counters in it, which will form a system of efficiently querying, updating and storing information on 'how much unread comments exist in each article (or blog entry, or smth. similar), that ...

Entity/Attribute alternative - dynamically created tables

I like pure relational design but sometimes there is a need for an Entity/Value method of storing data. Especially where the user needs to frequently create a new type of data. I have seen in some commercial software that they dynamically create standard tables rather than use EV tables. Obviously this isn’t a solve-all solution and ca...