database

How can I create a sample SQLLite DB for my iPhone app?

I'm diving in to iPhone development and I'm building an iPhone app that uses the Core Data framework and my first task will be to get the model setup with a view that will display it. Thus far, I have the model defined and my Managed Object Files created, but I don't have a database with any sample data. What's a quick way to create...

Will MySql caching cause performance problems?

I am about to upload my website onto a VPS. It is a classifieds website, where all data is stored in MySql and Solr. I wonder if when using MySql:s cache, the server will slow down? Ie, if somebody makes a search for the first time, and MySql is to cache the query, will the caching make the server slower than if it would not cache any...

Relational vs. Dimensional Databases, what's the difference?

I'm trying to learn about OLAP and data warehousing, and I'm confused about the difference between relational and dimensional modeling. Is dimensional modeling basically relational modeling, but allowing for redundant/un-normalized data? For example, let's say I have historical sales data on (product, city, # sales). I understand that t...

Are there any databases that support protocol buffers?

Are there any databases, in either the SQL or NoSQL worlds, that support protocol buffers? (Support could mean various things, but hopefully would include being able to index on fields in protocol buffers.) ...

Database/NoSQL - Lowest latecy way to retreive the following data...

I have a real estate application and a "house" contains the following information: house: - house_id - address - city - state - zip - price - sqft - bedrooms - bathrooms - geo_latitude - geo_longitude I need to perform an EXTREMELY fast (low latency) retrieval of all homes within a geo-coordinate box. Something like the SQL below (...

Compare values for audit trail

I'm attempting to develop an audit trail/tracking solution for an existing database written in PLSQL/PHP - however I'm still unsure as of yet on an easy (to implement and maintain) solution for tracking changes to fields/values. For instance, the project tracking portion of the DB APP tracks over 200 fields and ideally I'd like a nice wa...

Multi-variable indexes in postgres

Im looking at an application where I will be doing quite a few SELECTs where I am trying to find column_a = x AND column_b = y. Is the correct to create that index that something like the following? CREATE INDEX index_name ON table (column_a, column_b) ...

SQL Server many-to-many design recommendation

I have a SQL Server database with two table : Users and Achievements. My users can have multiple achievements so it a many-to-many relation. At school we learned to create an associative table for that sort of relation. That mean creating a table with a UserID and an AchivementID. But if I have 500 users and 50 achievements that could ...

What to do if 2 (or more) relationship tables would have the same name?

So I know the convention for naming M-M relationship tables in SQL is to have something like so: For tables User and Data the relationship table would be called UserData User_Data or something similar (from here) What happens then if you need to have multiple relationships between User and Data, representing each in its own t...

Where can I find my iPhone app's Core Data persistent store?

I'm diving into iPhone development, so I apologize in advance if this is a ridiculous question, but in a new iPad app project using the Core Data framework, here's the generated code for creating the persistentStoreCoordinator... - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { ...

Is the set of data always normalized in one form or the other in Databases

Suppose I have a set of data, given the data and the relation schemas can I assume that the set of data is normalized in one form or the other. In my opinion raw data given, has to be normalized into some form. However a discussion with a friend has led to ask me this question here. To expound more on the question, I would say given a s...

Cassandra Production ready on Windows?

Question anyone know of any success stories of Cassandra running on windows in a production environment? I'm doing some work on Cassandra and trying to find the correct platform for it currently the platform is windows running MS-SQLas the data store. what are the dis-advantages if any when running Cassandra on a windows environment. ...

How to show images in div that stored in db

I decided to store uploaded to servlet pictures in DB. But how to show them in browser (in particular div with css image-background style) without page reload? In details: I have an full-AJAX web client that works with java servlet. Thanks. ...

How do i start developing a database application using Oracle + Net Beans (Java) ?

I have thought of creating my first database application for one of my projects using Oracle and Java. I have chosen Netbeans as my development environment. I have a few questions to getting started. Please bare with me as I'm a complete beginner to Oracle + Netbeans This will be a data intensive (yet still for a college project) datab...

Using jQuery to store basic text string in mySQL base?

Could someone point me in the right direction here? Basically, I've got this jQuery code snippet: $('.bggallery_images').click(function () { var newBG = "url('" + $(this).attr('src'); var fullpath = $(this).attr('src'); var filename = fullpath.replace('img/Bakgrunner/', ''); $('#wrapper').css('background-image', newBG);...

Logging SQL Statements in Android; fired by application.

Hi. I have a small Android app and currently I am firing a sql statement in android to get the count of rows in database for a specific where clause. Following is my sample code: public boolean exists(Balloon balloon) { if(balloon != null) { Cursor c = null; String count_query = "Select count(*) from balloons where...

How should I store an Java Enum in JavaDB?

How should I store an Java Enum in JavaDB? Should I try to map the enums to SMALLINT and keep the values in source code only? The embedded database is only used by a single application. Or should I just store the values as DECIMAL? None of these solutions feels good/robust for me. Is there any better alternatives? Here is my enum: imp...

Data type mismatch in criteira expression

I'm getting this error: Data type mismatch in criteira expression when trying to execute this query in access: select sum(total_sum) from totals_table where tot_date >= '3/01/2010' and tot_date < '4/01/2010' P.S. tot_date is of type Date/Time and tot_sum is of type Number ...

Java class in DB

Hi! Can anyone explain why was idea to store Java class in Db? What it is good for? And how to create stored procedure with Java class? Best regards! ...

JAXB, BigDecimal or double?

I working on different web-services, and I always use WSDL First. JAXB generates for a Type like: <xsd:simpleType name="CurrencyFormatTyp"> <xsd:restriction base="xsd:decimal"> <xsd:totalDigits value="13"/> <xsd:fractionDigits value="2"/> <xsd:minInclusive value="0.01"/> </xsd:restriction> </xsd:simpleTy...