relational

Is my Relational Algebra correct?

I have a database assignment which i have to create some relational algebra for two problems. I feel fairly all right with the majority of it, but I just get confused when trying to project attributes out of a table which is joined to another table. for example is this correct? Q1) List the details of incidences with no calls made, so ...

Why should I use document based database instead of relational database?

Why should I use document based database like CouchDB instead of using relational database. Are there any typical kinds of applications or domains where the document based database is more suitable than the relational database? ...

Easy way to store and retrieve objects in Java without using a relational DB?

Do you know of an "easy" way to store and retrieve objects in Java without using a relational DB / ORM like Hibernate? [Note that I am not considering serialization as-is for this purpose, as it won't allow to retrieve arbitrary objects in the middle of an object graph. Neither am I considering DB4O because of its restrictive license. T...

What is the best way to represent a many-to-many relationship between records in a single SQL table?

I have a SQL table like so: Update: I'm changing the example table as the existing hierarchical nature of the original data (State, Cities, Schools) is overshadowing the fact that a simple relationship is needed between the items. entities id name 1 Apple 2 Orange 3 Banana ...

How to Convince Programming Team to Let Go of Old Ways?

This is more of a business-oriented programming question that I can't seem to figure out how to resolve. I work with a team of programmers who have been working with BASIC for over 20 years. I was brought in to help write the same software in .NET, only with updates and modern practices. The problem is that I can't seem to get any of ...

Is there a simple way to do GUI input for a relational database?

I'm building a student rostering application for a friend and I'm just about done except for the GUI. I'm writing it in wxpython but I'm not sure how to proceed with the input fields because it is a relational database. Is there a simple way to do this? ...

Get Common Rows Within The Same Table

I've had a bit of a search, but didn't find anything quite like what I'm trying to achieve. Basically, I'm trying to find a similarity between two users' voting habits. I have a table storing each individual vote made, which stores: voteID itemID (the item the vote is attached to) userID (the user who voted) direction (whethe...

Tuples in Ruby

Does anyone use tuples in Ruby? If so, how may one implement a tuple? Ruby hashes are nice and work almost as well, but I'd really like to see something like the Tuple class in Python, where you can use . notation to find the value for which you are looking. I'm wanting this so that I can create an implementation of D, similar to Dee for...

Tricky relational DB design question

Hi, I have a tricky problem that I've been messing about with for a few days now and cant find an optimal solution for. These are my tables: site site_node page The site node table contains a list of nodes representing a hierarchy (using nested set). Each node must have one or more associated pages. Each site must have one associate...

relational database and net structure

The company Microsoft could be referred as "microsoft", "ms" or "m$" etc. We may say these names are alias to one single identity. If you want to store the "alias" relationship, you might have to do it as the following pairs microsoft ms ms microsoft microsoft m$ m$ microsoft ms m$ m$...

JPA tutorials

Let's say that I'm new to JPA, is there a way to get my skills up to speed? Are there any good tutorials? ...

Autofill IDs in a form with a relation

I have created a blog, it will have posts, and the posts are created by the users. I already have a login system in my blog. And I have made the relation between a user and his posts. Now when I want to add a new post I want Rails to autofill the user_id field. Should I add a hidden field and add the user_id from the session where I sav...

What are the best practices in building multi-tenancy applications?

What are the best practices in building applications that support multiple tenants such as Software as a Service? Links to white papers that expand on this topic are greatly appreciated. ...

Storing folder hierarchy in relational database

I have objects representing folders and I'm wondering if they should be represented in the database. On the one hand it seems like the easiest way would be to not represent folder objects and just store a path value for objects contained in a folder. Problems I see with this is that you can't persist an folder whose descendants do not ...

Another Many-Many Scenario

My database model has 2 particular tables in it that require a many-to-many relationship. The tables are Systems and Users. One user can be a member of more than one system and one system has more than one user in it. system_id is the PK in the system table and user_id is the PK in the user table. I have them linked with system_id as a...

Question about 3rd Normal Form

The following table : EmpId State Zip 1 FL 342008 2 CA 342001 is not in 3rd normal form because State is dependent on the primary key(EmpId) transitively. So, if I break it like this : (EmpId,State) (State,PIN) it's in 3NF. I could also break it like : (EmpId,State) (EmpId,PIN) and it will again be in 3NF. Bu...

What is the best way of relating relational database tables into Java classes?

Hello I wonder if anyone can advise me here; I have an application which has classes like this: Code: public class Order implements Serializable { private int orderNo; private int customerNo; private date orderDate; public int getOrderNo () { return orderNo; } public int getCustomerNo () ...

Domain and Tuple relational calculus

Is there a "real" difference between the above two? Other than the tiniest minute difference between their syntax? ...

Google's BigTable vs. A Relational Database

Duplicates Why should I use document based database instead of relational database? Pros/Cons of document based database vs relational database I don't know much about Google's BigTable but am wondering what the difference between Google's BigTable and relational databases like MySQL is. What are the limitations of both...

Globalization with NHibernate

How would you build your domain objects and create its respective NHibernate mapping files for a multi language application. The UI part is stored in resource files but user data needs to go into the database. I want to do the following: Product p = DALProduct.getByID(2) p.name //results in the language of the current UICulture I hav...