database

Database Design Decoupling

Hi, I am working on a .NET web project with an SQL Server back end. There is a core part of the database that is populated with stock data. This data is loaded daily by a loading application. This data should remain readonly to the website. By this I mean, that I do not want a Web developer to modify the tables that are are specific ...

Store Application Progress to Database

Hi, I have a daily launched multi-threaded loading service. I would like to keep tack of the percentage progress of the loader. I was thinking that it would be good to have an update column on a database table that writes the %Progress. Is this a good idea or will there be a large overhead(5k updates per minute). Is there a better way t...

which database type are good for arrays ?

i want my database to support one company haveing many users how can i do that? exampleusers table(UID,username,password)company table(CID,companyname,usersthatistheownerofthecompany) how can i do that? what should i do ? should i make an array in php like 1241,423,4123 *uid's that will be inserted on usersthatistheownerofthecompany row ...

Basic data storage with Python

I need to store basic data of customer's and cars that they bought and payment schedule of these cars. These data come from GUI, written in Python. I don't have enough experience to use a database system like sql, so I want to store my data in a file as plain text. And it doesn't have to be online. To be able to search and filter them,...

Data storage format for iPad app. Export to excel

I am fairly new to Objective C and iOS programming but am constantly trying to learn as much as I can. I am about to start an iPad project which will involve storing large amounts of data which will need to be exported to one extremely large excel spreadsheet.(it's for a friend....they currently enter massive amounts of data into excel ...

CakePHP, setting recursive to -1 for a model so it doesn't do "joins"?

I have 2 models that are associated but don't want it to use joins when I make database updates.. from the cakephp cookbook, I can't quite gather how I am supposed to set "recursive" to -1, also, do I do it for the model that has the association, the other one, or both such as if model1 "belongs to" model2 and I am trying to make it so...

Very simple query on mySQL (beginner question)

Hi ! I have a very simple question for a beginner in SQL. I have defined 3 tables in my database : "DOCTOR", "PATIENTS", "VISITS". For simplicity purposes, I have only a one-to-many relationship btw these tables : One doctor has many patients, but a patient can see only one doctor and one patient can make many visits... in my table "VISI...

jQuery validation: check for existing username in DB

Hello, I want to put together the functionality of these two links: http://www.bitrepository.com/a-simple-ajax-username-availability-checker.html http://bassistance.de/jquery-plugins/jquery-plugin-validation/ (demo: http://jquery.bassistance.de/validate/demo/) It is actually adding the email existence check to the jQuery Validation plu...

Android app with cloud database

Hello - I am quite familiar with web programming (HTML, PHP, MySQL) and semi-familiar with Android Java programming, and would like to begin a project that combines the two together. Can someone point me into the right direction for how I would access/manipulate a web-based MySQL database from an android app? Thanks in advance! ...

phpmyadmin error "#1062 - Duplicate entry '1' for key 1"

I dropped all tables from a database then restore(import) a backup. and getting this error. Should i repeat the process. or something else? Why this error is coming? ...

I want to replace the "left outer join" with an alternate basic query, how can I do it?

The query looks like this: Select t1.*, t2.balance from t1 left outer join t2 on (t1.id1 = t2.id1 and t1.id2 = t2.id2) where t1.name = 'name'; I was good until I was using native queries but now I need to use Hibernate's JPA implementation for all the queries. The involved table are not associated in any way. That's why I want to use...

Importing csv file into postgres

Using Mysql Administrator GUI tool - I have exported some data tables retrieved from an sql dumpfile into csv files. I then tried to import these csv files into a postgres database using the postgres COPY command. I've tried entering "COPY articles FROM '[insert .csv dir here]' DELIMITERS ',' CSV;" and also the same command without the ...

detecting when data has changed

Ok, so the story is like this: -- I am having lots of files (pretty big, around 25GB) that are in a particular format and needs to be imported in a datastore -- these files are continuously updated with data, sometimes new, sometimes the same data -- I am trying to figure out an algorithm on how could I detect if something has changed...

C# SQL query exception

I'm using C# in .NET 2.0 and I'm trying to access and manipulate a database. I can read as many times from the DB as I want and everything works, but as soon as I try to insert an item I get the following error message: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed. I've tried to l...

Adding new columns to a column database having billions of rows.

I want to add a new column to a table which already consists billions of rows. The new columns are derived from existing columns. For example, new_col1 = old_col1 + old_col2 new_col2 = old_col1 / old_col2 I am trying to do this in following way - Add new columns ALTER TABLE table_name ADD ( column_1 column-definition, colum...

How to actually use liquibase in a maven project with svn.

Hello Experts ! Last week i read about liquibase quick start and all the related tutorials but i feel like i don't get the whole drift about using it for consecutive change in the database and i have some questions still opened. i'm developing an application in netbeans using maven with 3 modules: dbunit module, service module a...

django is "unable to open database file"

hello, after running "python manage.py syncdb" i gett an error saying "unable to open database file". here is the important part from my settings.py: DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'apps.db' # Or path to database file if using sqlite3. DATABASE_...

How can I prepare the logs or textfiles to be read by MySQL using Load DATA INFILE INTO ?

What is the best way to prepare the log files before inserting their values in the MYSQL database using LOAD DATA INFILE '/tmp/someFile.txt' INTO TABLE How can I make sure and make the data log file ready to be read by such command ? Someone told me by scripting (using sed,grep,cat,sub ...) .. how can I do that or what are the to...

MySQL Transaction From PHP

QUERY 1: $link = mysql_connect('localhost', 'root', ''); mysql_select_db('rems', $link); mysql_query('SET AUTOCOMMIT=0; START TRANSACTION', $link); mysql_query('DELETE FROM admins WHERE admin_id=4', $link); mysql_query('ROLLBACK; SET AUTOCOMMIT=1', $link); QUERY 2: $link = mysql_connect('localhost', 'root', ''); mysql_select_db('rems...

How to implement tagging if sharing tags with different entities?

I know the tagging stuff has been mentioned many times, but I can't seem to see any that address this question. From this thread http://stackoverflow.com/questions/20856/how-do-you-recommend-implementing-tags-or-tagging I can see the best way to setup tags is likely Item (item_id, item_content) Tag (tag_id, tag_title) TagMapping(m...