database

Ideal database for geo (map) data

I'm looking for suggestions for an ideal database or data structure for storing a map. Essentially, the map consists of "ways" which are like roads, paths, etc. Ways contain nodes (which have a latitude and longitude coordinate, and sometimes an altitude.) Any such database or structure: should be able to locate all the nodes in a bo...

How do you connect to a recently create postgres database?

I am just learning sql and starting with PostgreSQL. Here is what I am trying to do: psql postgres CREATE DATABASE newdb; Then I want to do something like this (in the same psql session) CONNECT DATABASE newdb; Of course this doesn't work. But after doing the statement I should be able to do something like: CREATE TABLE newtable ...

Is there any multicore exploiting NoSQL system?

I am playing with MongoDB since yesterday and absolutely love it. I am trying to import lots of data (2 billion rows) and index it but it doesn't seem to be using the 8 cores that my system has adn the import is going at normal rates (60000 records/sec). I can only imagine how long it might take to index two columns in this collection. A...

UUID primary keys and Memcached

With Data being cached so often now and the database is only being accessed when there is new data (and then that data is cached lol) is there even a real performance difference for using Int primary keys vs UUID primary keys. For example, lets assume im building NetFlix. A new movie gets added to the database, and the movie listing al...

Encrypting a Sqlite db file that will be bundled in a pyexe file.

I have been working on developing this analytical tool to help interpret and analyze a database that is bundled within the package. It is very important for us to secure the database in a way that can only be accessed with our software. What is the best way of achieving it in Python? I am aware that there may not be a definitive soluti...

Max tables in a MySQL database

Is it bad to have too many tables in a database? I have about 160 tables in one database. Is it better to split it into several database rather than using a single database? Single database is more convenient for me. ...

count number of tuples without COUNT. Is it possible?

Hi, I would like to know if there is any way of counting the number of tuples in a table without actually using the COUNT function? A B C XXXX YYYY IIII XXXX SSSS PPPP RRRR TTTT FFFF KKKK AAAA BBBB If I would like to know how many times XXXX has appeared with...

Android database setting ImageView

I have a database with 5 columns, 1 column which is a TEXT with the name of a drawable that is /res/drawable folder. private void fillData() { mCursor = db2.getAllAchievements(); startManagingCursor(mCursor); String[] from = new String[]{achHelper.ROW_NAME, achHelper.ROW_DESCRIPTION, achHelper.ROW_POINTS, achHelper.RO...

How to flush binary logs

I read a comment on another post that InnoDB can be optimized for speed by not flushing binary logs on every commit. This is the first time I hear about this, so what are these binary logs and what's this flushing all about? Why should I do it (and when not to do it) and how? ...

What exactly happened with the indexing operation?

I was indexing a huge table today containing 2 billion records. I thought MySQL would eat away my 2TB drive... The disk consumption kept increasing to 400GB and then 500GB and then finally drops to 180GB and MySQL says successfully added the index. Why the space increase and what happened in the end? Can someone please give me some point...

General purpose open source taxonomy database

I am looking for a database which could help me group thousands of English-language keywords to few general disciplines. For example: I HAVE THIS => I WANT TO HAVE THIS cat => animal chair => household wine => drink deer => animal beer => drink glass => household, drink total 50 000 keywords => total <100 disciplines I guess that orga...

User content site wide search - PHP/ MySQL

For a user content website I am creating, it has lots of sub-sections: Movies, Jobs, People, Photos, Mail, etc. It's like a yahoo portal but very very detailed with information search, like I a niching as deep as possible per topic unlike any site out there. I have the site being developed in codeignitor php and mysql. Search can be glob...

Null pointer execption

i am facing null pointer exception in hibernate: org.hibernate.dialect.function.CastFunction.render(CastFunction.java:11) hibernate code is: ("Select date_format(str_to_date(form.dobDate,'%Y%m%d'),'%M (%Y)') as Month"); ...

Updateing Android application content via internet ?

Hi, i want to develop an Android application that will take the content from internet (server) and present it in the application. (ex. i take the todays weather forecast, put the numbers in SQLite database or .txt file , put the database/txt file on internet server so when i open the application, the app connects&downloads the database ...

Single query or multiple queries

I have a table having 4 columns and I need to insert over 5k rows. Is it good to insert them using 1 query, or each row having its separate query. The database is mysql. ...

CoreData referencing

My application is CoreData based but they may be a common theory for all relational databases: I have a Output-Input to-many relationship in my model. There are potentially an unlimited number of links under this relationship for each entity. What is the best way to identify a specific input or output? The only way I have achieved thi...

How to alter columns with ActiveRecord in Rails?

I'm new to ActiveRecord. I realized that I had forgotten to add a default value for a column in one of my tables. I want to create a migration to fix this, but I can't figure out how. Is there an alter_column method that you can call during migrations? If not, how can I do it? EDIT: I just tried using change_column, but this causes an e...

Is there a rational reason that Oracle's error feedback is lousy for this example?

See example: http://stackoverflow.com/questions/189557/ora-00942-table-or-view-does-not-exist-how-do-i-find-which-table-or-view-it-is Basically in a case like this Oracle responds with something like: SQL Error: ORA-00942: table or view does not exist Obscure error messages from Oracle when using an ORM lib like Hibernate aren't exact...

Database design for a small CRM/invoicing system

I'm currently developing a small customer relationship and invoice management system for my client. And I have run into some small issues which I would like do discuss. What is the best practice around orders, customers and products. Should my client be able to delete orders, customers and products? Currently I have designed my databas...

Query for a column to be compared against two values.

Hi, I have a table with three columns and I have fetch a column whose value matches with value 'aaaa' and 'bbbb' columnA ColumnB ColumnC data1 yyyy aaaa data2 zzzz mmmm data1 hhhh nnnn data3 aaaa bbbb So, if I query with "Select * from ...