The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
2answers
180 views

Query to Access a specfic data in the row using python

Am using wordpress and phpmyadmin for handling my database Below is the code I use to view entries on my form using python. In the form I ask users to check/uncheck specific questions. It works as ...
1
vote
2answers
53 views

How to restore postgres database which is created using pg_dumpall?

I have dumped all of my databases using pg_dumpall and now I want to restore them. I used the command psql -f db.out postgres, but I am still not able to see my databases. Can anyone help?
0
votes
2answers
217 views

SQLAlchemy connection error with Postgres

I am trying to write a basic python script that uses SQLAlchemy to connect to my Postgres database. In the connection details, if I use "LOCALHOST", it connects fine. If I reference the server by name,...
2
votes
1answer
831 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
1
vote
1answer
33 views

MySQL: database setup to properly deliver non-ascii characters

I'm facing the following problem: I have a MySQL database which contains non-ascii characters in some records. Characters like "ñ", for example. What kind of setup do I need to perform at the ...
1
vote
1answer
28 views

select two tables and print the columns side by side with matching key in hive

I have the below tables: table_1 name_1 id_1 value_1 avi 1 21 adi 2 X table_2 name_2 id_2 value_2 avi 1 21 adi 2 22 metadata_info: can be read ...
1
vote
1answer
70 views

Looking for simple contains method when searching text in postgresql

Im new to the PostgreSQL world so I do apologize in advance for not knowing if there is an obvious answer to these questions. Basically I'm looking for two things. First a simple "contains" based ...
1
vote
1answer
4k views

How to run DB2 export command in shell

I am trying to run the following DB2 command through the Python pyodbc module: DB2 export to C:\file.ixf of ixf select * from emp_hc I am successfully connected to the DSN using the pyodbc module in ...
0
votes
1answer
166 views

Why do the queries slow down after a few minutes, when trying to build a DB?

First - I am a complete newb to DBA. Please be gentle. (And I am fairly new to python as well.) Oh, and I have no idea how to change any MySQL settings or the like, so all the MySQL DB settings are ...
0
votes
1answer
657 views

Easy way to automate database synchronization

I have to get data from a remote database and store it in my local database. And mapping between the two database is something like shown in the below image. So, for this I'm looking for a Python ...
3
votes
0answers
32 views

Should I do the maths within PostgreSQL for ACIDity?

It is my first question on Database Administration Stack Exchange. Please be kind if something is not done the nice way.. I would like to be advised concerning the way I'm working on my database, in ...
3
votes
0answers
2k views

DB2 Query Error SQL0204N Even With The Schema Defined

I'm using Python to access tables in DB2 10.1.0 I have a login account named foobar and a schema with the same name. I have a table named users under the schema. When I'm logged in as foobar, I can ...
2
votes
0answers
413 views

MongoDB communication issues on Azure

I have a Python uWSGI app running behind Nginx using pymongo to communicate with a 4 machine replica set running Mongodb 2.6.3. The replica set is configured using domain names for each machine mdb-0[...
1
vote
0answers
43 views

Redis along with Mysql

I'm currently working on a mobile app alike Google Maps or Wave, but also including parking. The application its running with MySQL primarily. With at this stage most of our data is loaded by python ...
1
vote
0answers
18 views

Heirarchial Database with Time Tracking

Working in Python/Django 1.8 I have a problem along the following lines: Assembly Table |Part |Parent (FK to other Part) i.e.: Car |--Tire |--Bolt A |--Bolt B Journey Table |Date |...
1
vote
0answers
72 views

SQLite reference table question

I'm using SQLite and Python for making a sensor network database. I have a table holding the nodes: NODE, another 2 tables for sensor specification: SENSOR_TYPE ("Temperature, Humidity...) and ...
1
vote
0answers
12 views

Adding new sproc to the exisiting database using connectors?

The project I'm currently working on is mostly pythonic, by this reason I'll likely use mysqldb python connector or sqlalchemy. The question arose when I've tried to find out the way of adding new ...
1
vote
0answers
664 views

Creating Pandas DataFrame on Python From a MongoDB Document containing Embedded documents

I am working on a machine learning algorithm on python's scikit.learn, but this time the data are in Mongodb documents format. I would like to pull my data into a dataframe. Here is an exemple of the ...
1
vote
0answers
336 views

Migrate from SQLite to MySQL (then back)

For various reasons, I must use a SQLite database with a local application. However, I wrote a Flask app that enables users to more easily classify items in the database, and it runs very slow on ...
1
vote
0answers
116 views

Trouble adding foreign key on lots of data in Postgres

Working with PostgreSQL 9.0.8 on linux. Can't add foreign key. I have two tables: Table1 and Table2. Table1 has 10 columns and 200 000 rows filled with some data, where first column is 'id' (primary ...
1
vote
0answers
306 views

Does a high CPU usage -say 98%- necessary mean the database will be slower?

I have 4 python scripts each running in their own virtual machine. The scripts are accessing a central postgresql database. All scripts are reading from the same table but posting to different tables ...
0
votes
0answers
11 views

We need to design a schema for storing person profiles, with data sourced from multiple sources

Person profile will have data points such as Name, Email (multiple), Twitter, LinkedIn, Facebook, Google+, DOB, Company, Position, Date of Joining, etc. This data will be collected from multiple ...
0
votes
0answers
28 views

MongoDB avoid $sort + $limit optimization

In my Django app using mongoengine I've got such code: art_cursor = Articles.objects.aggregate({'$match': {'ntype': {'$in': [1,6]}}}, {'$group': {'_id': {'title': '$title'}}}, {'$sort': {'_id....
0
votes
0answers
19 views

Create custom JSON response from PostgreSQL table

Consider the following table: CREATE TABLE IF NOT EXISTS trips ( trip_id SERIAL PRIMARY KEY, start_location TEXT REFERENCES locations(label), end_location TEXT REFERENCES locations(label), ...
0
votes
0answers
38 views

postgresql Idle for transaction while migrating 30GB database

I'm migrating part of a mysql database into a postgresql database with a different Schema. I've written a python script, using mysql-connector and psycopg2 modules. It takes care(should) to convert/...
0
votes
0answers
9 views

Inserting data from external PC faster than from localhost

I've been benchmarking the performance of a new virtual server in order to find out the best engine and database structure for my setup. Currently I am using python with mysql-connector both on the ...
0
votes
0answers
126 views

psycopg2 - drawbacks of reusing cursors?

I am new to Python and the psycopg2 module. context Working on a script that select data from MySQL, perform some operations (conversion of data-types and other "transformations"), and finally ...
0
votes
0answers
71 views

No foreign key constraint with PRAGMA foreign keys

This is my code. It's SQLITE3 in Python 3. conn = sqlite3.connect(db) c = conn.cursor() c.execute('BEGIN') c.execute("PRAGMA foreign_keys = ON") c.execute('CREATE TABLE Product(...
0
votes
0answers
84 views

MySQL – Backup/Restore Selected Tables/Fields Only

I support a Python application (includes some C modules) that utilises a MySQL database. A number of clients are running this in a standalone environment but have agreed that we can use their data ...
0
votes
0answers
81 views

UPSERT-ing large batches in PostgreSQL 9.3 on AWS RDS

Consider the following location updates table , which keeps the most recent location update of each car_id. The table has the following columns: car_id - a textual primary key geom - a PostGIS ...
0
votes
0answers
89 views

PostgreSQL becomes very slow after heavy utilization

I have built a Python web application and I am hosting it in a 2GB RAM Debian Server. My application uses PostgeSQL 9.1 with PostGIS. One of my tasks involves importing data from big csv files. ...
0
votes
0answers
112 views

New Table vs Java Beans to allow user to dynamically change data representation?

I am building a database to store the assessment records of students, along with other relevant information and functionality like reporting on average scores etc. Currently my company uses Excel for ...
0
votes
0answers
100 views

MongoDB stops responding after 2 days of working

I've written small application in Python (I used Twisted). Program receives data and writes it to MongoDB. Every 2 days MongoDB stops responding: 2015-02-11T10:47:20.918+0100 [initandlisten] can't ...
0
votes
0answers
91 views

MongoDB GridFS delete operation too slow while mongod process takes up 100% CPU

I'm using Python (CPython 2.7.3 on Debian 7.8 amd64) with pymongo driver (version 2.7.2) to connect to a MongoDB (db version v2.4.12) database which has solely been used to store files in a GridFS ...
0
votes
0answers
350 views

mongodb configuration issue

I am editing the configuration of running mongodb in an 'amazon ubuntu instance' (with more than 30 GB data), and I attached some volumes for data, log, and journal I followed mongodb-ec2: ...
0
votes
0answers
176 views

Storing DB credentials in an application source code?

I am making an app which connects to a DB, and the app will have plenty different userslogins. Is it a good design choice to have a specific DB login/password for the application, using which the ...