database

EAV Database Sheme

Hello Stackoverflow comunity! I believe that my question has to do with all db guru here! Do you know the EAV DB Scheme ( http://en.wikipedia.org/wiki/Entity-attribute-value_model ) and what they say about the performing of this model. I wonder, If I break this model into smaller tables what the result is? Let's talk about it. I hav...

iPhone Core Data - Access deep attributes with to many relationships

Hi everyone, Let say I have an entity user which has a one to many relationship with the entity menu which has a one to many relationship with the entity meal which has a many to one relationship with the entity recipe which has a one to many relationship with the entity element. What I would like to do is to select the elements which be...

Unrecognised database format

Hey, I would like to load some data from an access-database in my C#-application. But when it tries to make a connection with the database, I get this error: Unrecognised database format How do I solve this? This is my code: private void btnBrowseDB_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(...

How to optimize an SQL query with many thousands of WHERE clauses

I have a series of queries against a very mega large database, and I have hundreds-of-thousands of ORs in WHERE clauses. What is the best and easiest way to optimize such SQL queries? I found some articles about creating temporary tables and using joins, but I am unsure. I'm new to serious SQL, and have been cutting and pasting result...

PHP calling PostgreSQL function - type issue?

I have a function in PostgreSQL / plpgsql with the following signature: CREATE OR REPLACE FUNCTION user_login(TEXT, TEXT) RETURNS SETOF _get_session AS $$ ... $$ Where _get_session is a view. The function works fine when calling it from phpPgAdmin, however whan I call it from PHP I get the following error: Warning: pg_query() [functi...

How do I remove the first 8 characters from a Microsoft Access database field?

Hi, I've got an Access '07 database that imports data from text files. The problem is one of the fields that is taken in comes with a date value before a place value that I don't need. For example, the field comes in like so: 01012010DUBLIN whereas I need it to just display DUBLIN. I'm stumped on this and any help would be greatly appre...

Datamapper Clone Record w/ New ID

class Item include DataMapper::Resource property :id, Serial property :title, String end item = Item.new(:title => 'Title 1') # :id => 1 item.save item_clone = Item.first(:id => 1).clone item_clone.save This does "clone" the object as described but how can this be done so it applies a different ID once the record is saved, e.g...

make website page get news articles from feeds

Hi, I would like to start publishing some news articles from time to time. An option would be to create a new web page for every article but this sounds like it can be done easier. For instance I noticed clear channel uses some kind of feed, like: http://www.z100.com/cc-common/news/sections/newsarticle.html?feed=104650&article=701140...

How to merge data from two separate access 2007 databases

Hi, I have two identical databases with same structure, database a in computer a and database b in computer b. The data of database a*(a.accdb)* and database b*(b.accdb)* are different. then in database a i have for example ID:1, 2, 3 and in database B i Have ID:4,5,6 Then i need merge these databases data in only one database(a or b, ...

MS Analysis Services OLAP API for Python

I am looking for a way to connect to a MS Analysis Services OLAP cube, run MDX queries, and pull the results into Python. In other words, exactly what Excel does. Is there a solution in Python that would let me do that? Someone with a similar question going pointed to Django's ORM. As much as I like the framework, this is not what I am ...

SQL Server 2008 database mirroring madness

I'm trying to get database mirroring to work on SQL Server 2008 between two computers. I checked connectivity, but here's what I end up with: on the principal machine, the server can connect to the mirror but refuses to set up a mirroring partnership due to it being 'unable to connect' (I checked connectivity, everything works). The wei...

Major performance difference between two Oracle database instances

I am working with two instances of an Oracle database, call them one and two. two is running on better hardware (hard disk, memory, CPU) than one, and two is one minor version behind one in terms of Oracle version (both are 11g). Both have the exact same table table_name with exactly the same indexes defined. I load 500,000 identical row...

PHP - How to make/generate a graph image depending on values in a database?

Hello. How could I make an image graph from values in a database? The idea came from "Steam", which uses a graph to show how many users are online. How could I do the same thing? It seems like the graph is one whole image; not made up of parts. Here's an image of the graph from Steam: Thanks. ...

what does "domain" and "persistence" mean?

i always encounter these 2 words. i know that when you are talking about domain model you are talking about objects. and persistence layer is a layer you store your data, eg. mysql database. but could someone explain these words more thoroughly? why is it called domain? why persistence? thanks! ...

Struggling to create correct relationships in MS Access

http://img714.imageshack.us/img714/7820/croppercapture1.png Basically: an award(course) has many units, which can be either optional or core(mandatory), depending on the award. So for example: the unit 'Advanced Software Engineering' maybe a core unit for the award 'Software Engineering BSc' but only an optional unit for the course 'Web...

difference between uni-directional and bi-directional relational relationship?

i wonder what these two words mean. i encountered them in Doctrine's documentation. but i cant understand what they mean. ...

Database - Designing an "Events" Table

After reading the tips from this great Nettuts+ article I've come up with a table schema that would separate highly volatile data from other tables subjected to heavy reads and at the same time lower the number of tables needed in the whole database schema, however I'm not sure if this is a good idea since it doesn't follow the rules of ...

How do you store sets in Cassandra?

I'd like to convert this JSON to a data model in Cassandra, where each of the arrays is a set with no duplicates: var data = { "data1": { "100": [1, 2, 3], "200": [3, 4] }, "data2": { "k1", [1], "k2", [4, 5] } } I'd like to query like this: data["data1"]["100"] to retrieve the sets. Anyone know how you might m...

how to get Contact database schema.

Dear, is there any link that provide me the Contact Schema. when i store new phone number in mobile, the informaion store in the database. so i need schema to create my own table for back purpose. i have alreay get People table column by the follwoing code. boolean displayFlag = false; String str = ""; Uri CONTACT_URI ...

Data sync solution?

For some security issues I'm in an envorinment where third party apps can't access my DB. For this reason I should have some service/tool/script (dunno what yet... i'm open to the best option, still reading to see what I'm gonna do...) which enables me to generate on a regular basis(daily, weekly, monthly) some csv file with all new/modi...