database

Design patterns to ease migration of SQL code between vendors

I am looking at ways which a developer can take advantage of implementation specific advanced features(T-SQL, PL-SQL etc) and at the same time makes it easy to migrate the ANSI compliant SQL code to a new database. By that I mean, how to efficiently abstract the ANSI compliant SQL code and move it across different databases? ...

Have I understood Database design correctly?

Have I understood db design correctly? A user can have one or multiple professions Each profession has multiple qualifications associated with it A user can have none or all of these qualifications. Are there any improvements that should be made? simplicity should be maintained. I intend to shorten table and column names. UPDATE:...

Android database - Cursor cause crash.

Hi! Im trying to program with database in Android. So far i have made the database and written to it. The problem: When i try to read the data back from the database the program "stoped unexpectedly". I have tested to find what cause the crash and has found that it's this line: Cursor c = db.getAllTitles(); But i dont understand why ...

Looking for distributed, in-memory Graph DB

Is there a database which will satisfy all (or at least most) of this requirements? Graph oriented - optimized for storing graphs and traversal(e.g HyperGraphDB, Neo4j) Running in memory, but having a persisted storage (e.g. Redis) Distributed (e.g. membase) Had .NET adapter (TCP/IP, not HTTP REST) Or am I asking too much? Thanks in...

MySQL syntax error

Hello, I get the following syntax error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* ,MATCH(city) AGAINST ('""' IN BOOLEAN MODE) FROM `` WHERE MATCH(city) AGAINST ' at line 1 The corresponding code for this error is the following...

Interbase PSQL return values

Hi, I wrote a very simple script. I am new to PSQL and I wanted to return some values based on a very simple loop. CREATE PROCEDURE DRAW_DOWN RETURNS( I_VAL INTEGER) AS DECLARE VARIABLE STARTING_BALANCE INTEGER; DECLARE VARIABLE TRADING_SERIES INTEGER; DECLARE VARIABLE I INTEGER; BEGIN SUSPEND; I_VAL = 1; WHILE (i < 5) DO BEGIN /*RA...

Inserting SQL Data into Linked (Foreign Key) Tables in SQLite

I have two tables linked by a foreign key. Example: "CREATE TABLE one (id INTEGER PRIMARY KEY, data REAL, time TEXT NOT NULL DEFAULT (datetime('now')));" "CREATE TABLE two (id INTEGER PRIMARY KEY, parent INTEGER, CONSTRAINT fc_two FOREIGN KEY (parent) REFERENCES one(id));" So I'd like to do an INSERT INTO with an embedded JOI...

Update Google Maps Javascript objects every 1 min using fresh data from database using C#??

Hi all! I'm trying to update a Google Map (API V3) with markers using my friends locations stored in a database. I want to refresh the map every minute or so... kind of like google latitude which shows where yours friends are on the map. Here is SOME of my Javascript: Please note that all i need to do is get a list of locations from the...

Get value inserted in RowGuid?

Hi, i have a simple table "MyTable" with single colum "id" which type is uniqueidetifier and rowguid is set to true. I insert new values like this INSERT INTO MyTable DEFAULT VALUES how to get inserted by server guid ? Best Regards, Iordan ...

MYSQL - Difference between IN and EXIST

MySql question: What is the difference between [NOT] IN and [NOT] EXIST when doing subqueries in MySql. ...

Best way to handle refunds or/ store credits in a database?

Let's say I've got a web application that is a store of some kind. I have a table that holds all of the monetary transactions. custid, orderid,amount paid...etc And this table is being used for sales reports and what have you. Now we want to give a customer a credit of some kind, either a gift certificate or a refund. is it a bad i...

How to Exclude Data for Specific Tables

I am using mysqldump to create a canonical installation script for a MySQL database. I would like to dump the data for able half of the tables in the database, but exclude the data from the other tables. I am aware of the following two commands: --no-data --ignore-table But the first applies to all tables, and I believe the second exc...

Suitable kind of database to track a high volume of changes

I am trying to implement a python script which writes and reads to a database to track changes within a 3d game (Minecraft) These changes are done by various clients and can be represented by player name, coordinates (x,y,z), and a description. I am storing a high volume of changes and would like to know what would be an easy and prefera...

How to share data across an organization

What are some good ways for an organization to share key data across many deparments and applications? To give an example, let's say there is one primary application and database to manage customer data. There are ten other applications and databases in the organization that read that data and relate it to their own data. Currently this...

How can I optimize my database?

Hi, I am creating a platform for some clients. Each client needs to have contacts and manage them in groups, categories (which depends of the group) and subcategories (which depends of the category). The database is going to be very big, and Im afraid about the performance. I want to optimize the database; now, I have these options: M...

VB.NET DataGridView "An item with the same key has already been added." while using a unique index

VB.NET 2010, .NET 4 Hello, I've looked around and can't seem to find a solution to my problem. I have an EventLog object which inherits DataGridView and has a public variable EventList which is a List(Of EventLogItem). EventLogItem has seven properties which describe the event, including Index which is set to EventList.Count each tim...

Activate Upon Scanning?

I'm not sure if this is where I need to be asking this question, but here it is. My company is preparing to release a software program in the format of PIN cards (similar to phone cards). Each card will have a PIN on it under a scratch panel. The PIN can then be used to download the software program from our website. I need to figure o...

Validate email with database

I have created a form and have validated everything using PHP, but can't figure out how to validate email from database. If I have the entered username in the database, I want it to display an error. I have connect.php and just for an example - here's how i validate password - if(!empty($_POST['password'])) { if($_POST['password'] !...

Propel ORM data fixtures

If I have a yml data fixture file called mydata.yml User: anonymous: nickname: anonymous first_name: Anonymous david: nickname: david first_name: David How do I tell propel where to find this file. Do I need to add any instructions to the build.properties and how do I run it to insert the data into the database ...

mysqldump Fully Qualifies Triggers with Database Name

I'm am trying to use mysqldump to export a database which needs to be imported using a different database name. Looking at the SQL generated by mysqldump, it appears that triggers are the only object names which are fully-qualified with the source database name thus foiling my needs. Is there anyway to direct mysqldump to not fully-quali...