database

Killing the mysqld process

I have a table with ~800k rows. I ran an update users set hash = SHA1(CONCAT({about eight fields})) where 1; Now I have a hung Sequel Pro process and I'm not sure about the mysqld process. This is two questions: What harm can possibly come from killing these programs? I'm working on a separate database, so no damage should come to o...

In Django, how do I filter where language column = "null"?

MyTable.objects.filter(where language column = null) How can that be done? Thanks. ...

Python: mysqldb install error

So i've been pulling my hair out trying to install the mysqldb package. When i run the build i get a long transcript of errors, heres just part of it, i would posit it all but its huge list of errors [rv@med240-183 MySQL-python-1.2.3c1]$ sudo python setup.py build [sudo] password for rv: running build running build_py copying MySQLdb/re...

Which of CouchDB or MongoDB suits my needs?

Where I work, we use Ruby on Rails to create both backend and frontend applications. Usually, these applications interact with the same MySQL database. It works great for a majority of our data, but we have one situation which I would like to move to a NoSQL environment. We have clients, and our clients have what we call "inventories"--...

Comparing two Oracle schema, other users

Hello! I have been tasked with comparing two oracle schema with a large number of tables to find the structural differences in the schema. Up until know I have used the DB Diff tool in Oracle SQL Developer, and it has worked very well. The issue is that now I need to compare tables in a user that I cannot log into , but I can see it thro...

Help with database design

Hey im new to database design and having trouble trying to figure this one out. I have two tables Team and Fixtures. Team has rows of football teams and Fixture has 2 of those football teams in each row (home and away team). I want to link team id to home_team and away_team but it doesnt allow me to. Please tell me how i can solve this. ...

Is there a way to store a one (unique) data element in SQLite?

I need to use SQLite database file as a file for storing information, and I want to store the version of the file in the SQLite database file. How can I do this? I mean, how to store unique (only one) data in SQLite? I don't want to use store the info by making table for this, as the version info is just one number. ...

Does column ordering in databases affect performance?

I am using Django with MySql. I have a CharField with max length of 64 as the 2nd to last column, and a Boolean as the last column. Will reversing the order of these provide better optimization of space? ...

Validating Login / Changing User settings / Php Mysql

Hi everyone, my questions are about login, and changing already saved data. (Q1) 'Till now I've only saved input in the tables of the database (registration steps), now I need to check if the input (login steps), are the same of my table in database, in fact I have 3 types of users, then I'll have to check 3 kind of tables. Then if the ...

How to design a generic database whose layout may change over time?

Here's a tricky one - how do I programatically create and interrogate a database whose contents I can't really foresee? I am implementing a generic input form system. The user can create PHP forms with a WYSIWYG layout and use them for any purpose he wishes. He can also query the input. So, we have three stages: a form is designed an...

Using Django Admin for a custom database solution

A client wants to have a simple intranet application to manage his process. He runs a Quarry and wishes to track number of loads delivered per day and associated activities. Since I knew about Django's excellent Admin interface, I figured I could define the "Schema" in models.py and have Django Admin generate the forms. I did exactly t...

help optimize sql query

I have tracking table tbl_track with id, session_id, created_date fields I need count unique session_id for one day here what i got: select count(0) from ( select distinct session_id from tbl_track where created_date between getdate()-1 and getdate() group by session_id )tbl im feeling that it could be ...

create database on sqlite3 (foreign key issues)

Hi everyone I have 3 tables: CREATE TABLE Destination (DestinationID INTEGER NOT NULL PRIMARY KEY, Destination TEXT NOT NULL, NoGoing INTEGER NOT NULL); CREATE TABLE User (UserID INTEGER NOT NULL PRIMARY KEY, UserName TEXT NOT NULL); CREATE TABLE Query (UserID INT...

Using NVL function in SQL, please help!

I'm needing to select first and last name in a table which is working fine in the following SQL, but the part that isn't working is the NVL function. The file should show all pilots at a company that fly helicopters and IF they don't have a licence the field HT_NAME should come up as 'N/A' and the field for end hours flown should be 0. I...

Separate tables for just one field can be logical ?

If I have one table which has a City field and as expected this field will repeat itself so only separate it to another table can be ok for normalizing concepts? I mean separated table who has only one field can be meaningful and can help performance gaining? ...

PHP e-commerce site talking to internal database for stock / ordering?

Hi. I'm working on an e-commerce site (either bespoke with PHP, or using Drupal/Ubercart), and I'd like to investigate the site interacting with an internal (filemaker) database we use to manage stock and orders. Currently we manually transfer orders from the web site to our own database, and the site does not check or record changes in ...

Is there any free/open source software/tool which can generate DDL out of a VSD file ?

Hi, Is there any software/tool which can be used to generate DDL(Data Definition Language) from the ER Modal diagram ? Currently I am using Microsoft's Visio Architect to generate DDL from a VSD file. I want an open source or free software which can serve the same purpose. ...

Embed a database in the .apk of a distributed application [Android]

Hi everybody, My question is I think quite simple but I don't think the answer will be... I have quite a lot of content to have in my application to make it run properly, and I'm thinking of putting all of it in a database, and distribute it in an embeded database with the application in the market. The only trouble is that I have no ide...

Simulating relations in MongoDB

Being one of the most popular NoSQL solutions MongoDB has most of the advantages of this approach. But one issue I'm still struggling with is how reflect object relations in NoSQL data store, specifically - MongoDB. For example, let's consider a simple data model: User, Post and Comment. It is clear to me that comments have no value on ...

Wordpress database query running slow - one of the columns doesn't exist!

Hi there. I'm having some problems with the query that wordpress runs. That's the one: SELECT DISTINCT ID,post_title,post_date,post_content,MATCH(post_title,post_content) AGAINST ('S') AS score FROM wp_posts WHERE MATCH (post_title,post_content) AGAINST ('S') AND post_date <= 'S' AND post_status = 'S' AND id != N AND post_type = 'S' ORD...