database

Storing and loading program data, C# WPF

I'm writing a utility program with C# in WPF that allows users to create role-playing scenarios, including monsters, items, characters, etc. The user will create or import the elements (monsters, etc) and then use the imported elements to create scenarios. Everything used by the program is created within the program, so I don't have an...

Data Versioning Advice

Hi, I'm going to be developing a site where users will have the opportunity to edit previously submitted form data. What I have been asked to do is to track all edits via some form of versioning system in the database. I'm still not entirely sure of the structure of the data i'll be working with yet, but I'm trying to think of the best a...

Rotating product of the day in Rails

Hi all- I am creating a site similar to the infamous Woot in one particular way: I would like to rotate through products at a rate of one per day. I am using RoR, and would prefer to dynamically choose a product, and not have to enter one each day. So here are the requirements: 1) Get a new product each day 2) Select dynamically f...

How to relate two tables without a foreign key?

Can someone give a demo? I'm using MySQL,but the idea should be the same! EDIT In fact I'm asking what's the difference between Doctrine_Relation and Doctrine_Relation_ForeignKey in doctrine? ...

MongoDB Concurrency

I'm a little confused about MongoDB's read locking. How many concurrent read operations can a single collection support? ...

Delphi DB Aware visual attractive tag component available?

I need to implement a tag system for video program and before I build something myself, is there an attractive drag-n-drop tag component that will filter a table for me? ...

how to store data with many categories and many properties efficiently?

We have a large number of data in many categories with many properties, e.g. category 1: Book properties: BookID, BookName, BookType, BookAuthor, BookPrice category 2: Fruit properties: FruitID, FruitName, FruitShape, FruitColor, FruitPrice We have many categories like book and fruit. Obviously we can create many tables for them (M...

ETL : Tracking changes to data using Materialized View log

I am into designing ETL with source and target database as oracle Standard Edition. For ETL purpose I need to get the changed data everytime.Client does not want any changes to be made in source objects. Is it feasible to create Materialized view log on source database using dblink to track Inser/Update/Delete on the identified tables....

How to provide global functionality in multi-user database app

I have been building a multi-user database application (in C#/WPF 4.0) that manages tasks for all employees of a company. I now need to add some functionality such as sending an email reminder to someone when a critical task is due. How should this be done? Obviously I don’t want every instance of the program to be performing this functi...

Setting the primary key of a object type table in Oracle

I have two Oracle questions. How can I set the primary key of a table when the table is made up of an object type? e.g. CREATE TABLE object_names OF object_type I have created a Varray type, CREATE TYPE MULTI_TAG AS VARRAY(10) OF VARCHAR(10); but when I try to do SELECT p.tags.count FROM pg_photos p; I get an inv...

Using php variable inside a query

Hi, i am using a query inside php as $query = 'SELECT * from #__chronoforms_UploadAuthor where text_6 like "%'.$_GET['title'].'%" and text_7 like "%'.$_GET['author'].'%" limit 0,1'; where i am trying to insert a php variable instead of 1 in the limit.. $query = 'SELECT * from #__chronoforms_UploadAuthor where text_6 like "%'.$...

How to customize the full text search ?

Full text search is becoming a tedious job using the relational databases’ approach. Can anybody suggest an alternate option if any or way to customize the full text search ? ...

Java library to partially export a database while respecting referential integrity constraints

My production database is several GB's uncompressed and it's getting to be a pain to download and run locally when trying to reproduce a bug or test a feature with real data. I would like to be able to select the specific records that interest me, then have the library figure out what other records are necessary to produce a dataset tha...

How do I select count() and LIMIT?

SELECT * FROM ...LIMIT 5, 10 But what if I want the total rows? I don't want to make another query without the limit. I just want this one query to return the total rows if I didn't put the LIMIT in there. ...

How do I execute SQL_CALC_FOUND_ROWS in python MySQLDB

cursor.execute("SELECT SQL_CALC_FOUND_ROWS user_id FROM...limit 5") rows = cursor.fetchall() ... total_rows = cursor.execute("SELECT FOUND_ROWS()") #this doesn't work for some reason. Edit: I tried SELECT FOUND_ROWS() FROM my_table...and the numbers are funky. ...

Evaluate column value into rows

I have a column whose value is a json array. For example: [{"att1": "1", "att2": "2"}, {"att1": "3", "att2": "4"}, {"att1": "5", "att2": "6"}] What i would like is to provide a view where each element of the json array is transformed into a row and the attributes of each json object into columns. Keep in mind that the json array doesn...

Database structure and source control - best practice

Background I came from several years working in a company where all the database objects were stored in source control, one file per object. We had a list of all the objects that was maintained when new items were added (to allow us to have scripts run in order and handle dependencies) and a VB script that ran to create one big script ...

What would be the most efficient way to do this search (mysql or text)?

Suppose I have 500 rows of data, each with a paragraph of text (like this paragraph). That's it.I want to do a search that matches part of words. (%LIKE%, not FULL_TEXT) What would be faster? SELECT * FROM ...WHERE LIKE "%query%"; This would put load on the database server. Select all. Then, go through each one and do .find >= 0 This ...

Does anyone know what was/is used as the DBMS for the infamous NSA call database?

Another question on SO suddenly got me wondering what the largest database in the world is (and how big it could be). A quick Google search turned up this: the NSA call database, created by the U.S. National Security Agency. Supposedly this database contains over 1.9 trillion records containing details relating to phone calls placed thro...

Use of databaseIncrementSize variable on LucidDb

What happens if I set this variable to 0? What are its side effects? I'm currently having trouble with the db.dat file, it's currently on 60 gB. Can I solve this issue setting the databaseIncrementSize to 0? I'm currently reading this link Data in LucidDB is stored using 32K pages in an operating system file named db.dat. Pages...