database

Multi-Threaded Database Queries

So we have this ultimate fail vendor (it's a long story, but trust me here) that has created an application that has separate, but identical in design, databases that we need to query (10 of them actually). Each of these databases is for a different "location" - but it's all still information relevant to all locations. I've written some...

Working with a database

I have an existing program for a bank account, the user can create an account then withdraw or deposit money to the account. As a transaction is processed, labels are being used to show the current information such as (Beginning Balance, Transaction Fee, Withdrawal Amount, and Ending Balance). Now, I need to be able to keep track of ...

EAV Solutions/Packages/Vendors?

I was recently exposed to the concept of an Entity Attribute Value database model via. the Magento e-commerce system. Varien (the company behind Magento) has used a relational database (mysql) to create an EAV style model using PHP Objects. I'm curious if there are "native" EAV database solutions out there. The "featured recently on ...

Cursors vs duplicate code/logic

Hello, I heard it's not good to use cursors, as they "unnatural" to DBMS and they provide bad perfomance. But imagine the following situation: I have a stored procedure and I need to call this stored procedure for every customer from France (for example). I have a few options, such as using cursor, write all stuff in one query and call s...

MySql Book recommendation for experienced database developer/designer

Hi, Any recommendations for a solid, comprehensive coverage of MySql for someone who is very experienced database-wise, but needs to get the MySql architecture, differences and peculiarities? thanks, Chris ...

Any drawbacks to storing an integer as a string in a database?

I have id values for products that I need store. Right now they are all integers, but I'm not sure if the data provider in the future will introduce letters or symbols into that mix, so I'm debating whether to store it now as integer or string. Are there performance or other disadvantages to saving the values as strings? ...

How does a large MySQL database become efficient?

Do really large (say, 100 million rows) databases regularly get broken up? I'm totally unfamiliar with scaling -anything-, but thought that maybe one database could act as a key to larger chunks of the actual data, becoming an index that would say "Oh yeah, that query needs the 20,000,000-25,000,000 block" and sends the query into that b...

XML or SQL?

I am just beginning to get into desktop application development, and have chosen C# to do so. After making some basic programs, I am wanting to get into more useful creations for myself. I was thinking about making a Project time tracker, as well as a password safe type program of my own. Both of these require taking in information that ...

Is there a better way to index multiple columns than creating an index for each permutation?

Suppose I have a database table with columns a, b, and c. I plan on doing queries on all three columns, but I'm not sure which columns in particular I'm querying. There's enough rows in the table that an index immensely speeds up the search, but it feels wrong to make all the permutations of possible indexes (like this): a b c a, b a,...

need help with database creation

Hi! I need to develop a database for A level students, and I'm having problems categorising their subjects. They have 13 subjects altogether and each student can choose as many subjects and any combination from 13 subjects as he likes. How can I cope with this problem? How can I create a database for keeping the record of each student...

How to maintain subcategory in MYSQL?

I am having categories as following, Fun Jokes Comedy Action Movies TV Shows Now One video can have multiple categories or sub categories, let's say VideoId: 23 is present in Categories Fun, Fun->Comedy, Action->TV Shows but not in Action category. Now I am not getting idea that hwo should I maintain these categories in Database....

Hibernate: Query entities which contain a specified element in a CollectionOfElements?

Let's say I have this entity (for Hibernate): @Entity public class Person { @Id @GeneratedValue(strategy = GenerationType.AUTO) Long id; @CollectionOfElements @IndexColumn("phones_index") Set<String> phones; } For example, I want to get instances of Person where their phones contain "555-1234". How can I do a ...

Are there any database implementations which keep all history?

Using a version control system for your source code (like subversion) makes sense because it allows you to back out of mistakes, audit changes, make painless snapshots, discover exactly where something went wrong so that you can improve your process etc. For the same reasons it makes sense to do change tracking of business data, and many...

Realtime data transfer between two or more Oracle databases.

Hi, I'm not a techie as such but have a question which I would like some views on. Currently we have 4 applications runnings on either Oracle 10g or 9i and use OAQ for data transfer but Oracle Streams for within day data transfer. Streams is currently viewed as bringing tight coupling between the applications and such will not be our ...

How can I use and access an SQLite DB using PHP and Wamp Server?

I know PHP 5 already supports SQLite but for some reason I can't get it to work. I followed the instructions from http://www.scriptol.com/sql/sqlite-getting-started.php. I also made sure that the following are not commented out from php.ini: extension=php_pdo_sqlite.dll and extension=php_sqlite.dll. But when I open the PHP file from loc...

Cross Database SQL Scripts

I'm working on a project where we talk directly from one database to another. We have a master database where the client updates their website and then changes are pushed from one database to the other through numerous SQL scripts. The master database works as a preview site allowing them to see changes before pushing them to live. At t...

How is a search in a Database realized?

Hi I'm trying to make a search function to my website : unfortunately i don't know how ? is a the LIKE enough for a search function ? e.g: SELECT * FROM Employees WHERE (Title Like 'Title%') or are there more Professional ways ? ( e.g. regular Expressions ) ...

Database connection pooling and connection.close()

In the scenario where a connection is got from a database pool(like Commons DBCP, etc) and when the connection is closed using connection.close(), how is the connection returned to the pool? Is there come callback method in connection object which is called on connection.close() which returns the connection back to the pool from which ...

create database with specific data file location in Mysql for one database at runtime

Hi All, Can anyone give any input on how to create database in mysql where it should create its data file at runtime instead of storing it on default location specified in my.cnf. Is there any way for doing this in mysql anyone come across. Thanks in advance. ...

OVER clause in Oracle

What is the meaning of the OVER clause in Oracle? ...