The tag has no wiki summary.

learn more… | top users | synonyms

40
votes
5answers
5k views

Why can't RDBM's cluster the way NoSQL does?

One of the big plusses for nosql DBMS is that they can cluster more easily. Supposedly with NoSQL you can create hundreds of cheap machines that store different pieces of data and query it all at ...
15
votes
3answers
2k views

Why does ANSI SQL define SUM(no rows) as NULL?

The ANSI SQL standard defines (chapter 6.5, set function specification) the following behaviour for aggregate functions on empty result sets: COUNT(...) = 0 AVG(...) = NULL MIN(...) = NULL MAX(...) = ...
6
votes
1answer
748 views

Find the highest graded student, using Tuple Relational Calculus

Suppose I have a table of students, containing their ID and their grade: ----------------- | id | grade | ----------------- | 1 | 83 | | 2 | 94 | | 3 | 92 | | 4 | 78 | ...
4
votes
1answer
149 views

Symmetric self-referential many-to-many

I'm trying to model a hierarchy of categories where a category can have multiple parents ( an overlapping tree model as described in this book ) I have the following tables video_categories int ...
3
votes
1answer
72 views

What does the “structured” in Structured Query Language mean?

What makes SQL "structured"? Are structured query languages distinguishable from unstructured ones? And when we say that SQL is "declarative", is that a related concept?
3
votes
0answers
51 views

Logical optimization of joins and selections

I am studying query optimization. I have read that it might be preferred to apply relational selections before a logical join operation. Is there a scenario where joining first and then applying ...
2
votes
1answer
79 views

How to select nodes where all children is satisfied?

I have a tree structure of light bulbs. I want to turn on all the light bulbs starting from the leafs of the tree. A light bulb cannot be turned on unless all its immediate children are turned on. ...
2
votes
2answers
702 views

How does ORDER BY really work? [duplicate]

I have one question that confusing me. By logical query processing, the SELECT clause comes before the ORDER BY clause, and in theory, every step in a query creates a virtual table. So, how is it ...
2
votes
1answer
2k views

Check if relation is in BCNF

I have the following relation and function dependencies. R = ABCDE F: C->AB, D->A, BE->CE, E->B I have to check whether this relation is in BCNF. Wikipedia states: ...if and only ...
2
votes
2answers
92 views

What do you call a relationship between two entities without a foreign key?

Let's say I have two tables that are related in that one table contains a field that is a key to the other table. In other words, it would be a 1:1 or 1:* depending on constraints. Let's call it an ...
2
votes
0answers
266 views

Transform XPath map into XML document using relational data

Background Most modern databases have XML functions that can be used to extract data in an XML format. I want to avoid the task of manually calling XML functions to extract the data. This problem ...
2
votes
1answer
158 views

Configuration options for relational algebra evaluator “ra.jar”

I am participating in the Stanford Database Class, and there are some problem sets to be solved in "mathy" relational algebra syntax. The course instructors demand from students to use this ...
1
vote
1answer
542 views

Is this partial dependency?

I have this relation: R = ABCDE F: AB->DE, AC->B, DE->C, AE->C, C->AB. Is AC->B a partial dependency in F? I'm guessing it is, because C->AB can be decomposed to C->A C->B ...
1
vote
1answer
90 views

An example of a relation without any functional dependency?

I have to find a really bad example where you cannot apply Heaths Theorem because of a missing functional dependency. But am I right, that every relation has at least one functional dependency? Or ...
1
vote
1answer
34 views

Estimating a Size of Joining a Relation with itself

I'm studying size estimation of logical query plans in order to select a physical query plan. I was wondering what is the size of joining (natural join) a relation to itself? e.g R(a,b) JOIN R(a,b)
1
vote
1answer
123 views

Separating tables vs having one table

At the moment I have a table setup that looks somewhat like this: create table tbl_locationcollections ( id int(11) PRIMARY KEY IDENTITY, --(Primary Key), name varchar(100) not null, ...
1
vote
1answer
147 views

Approach to Analyzing Database Requirements

When presented with requirements for a database driven system, I always find it useful to imagine a world with no computers, where data records were kept in filing cabinets and data was collected by ...
1
vote
1answer
32 views

What is the difference between a union and an “isa” disjoint relationship?

To me, it seems that a union and an "isa" disjoint relationship are the same. What is the difference between the two?
1
vote
0answers
30 views

Keys of a relation

I got relation: R = { (ABCDEF) , (A B F -> C, B C -> F, F -> A, F -> B, D E -> E, E -> D)} keys of this relation are: {BCE}, {EF} But i dont get it... why? Why not only {EF}.. it got less ...
1
vote
0answers
100 views

Closure of attributes definition clarification

A databases book I am using states [1]: The closure of {A1, A2, ..., An} under the FD's in S is the set of attributes B such that every relation that satisfies all the FD's in set S also satisfies ...
1
vote
1answer
94 views

Relation candidate keys

I have the following relation: R = ABCDE F: AB->DE, AC->B, DE->C, AE->C, C->AB I need to determine this relations candidate keys. Now, if I understood the defintion correctly: ...
0
votes
1answer
38 views

autonumber and one-to-many relationship

I have a main table with an autonumber key. I need to introduce a new table, related to the main table in a one-to-many relationship (i.e. a record in the main table could conceivably link to several ...
0
votes
1answer
158 views

Event Management System

I'm working on a "Event Management System" Online Software Project where the system requires the following: Viewers can sign up for their user account Events can be created by the admin from the ...
0
votes
1answer
35 views

Referencing a Join table

I have a relationship that I am trying to represent in a database. Imagine I have series of many to many relationships... Say student to proffesor, and professor to classes... A student can many ...
0
votes
3answers
91 views

Column partially determining accepted values of another column, should be somehow normalized?

I have a table that describes a set of properties (yes it's metadata, in this case there's a valid reason to have it in the database); among other things I tell the type of the data that can be ...
0
votes
0answers
15 views

Correct way of representation in tuple relational calculus

Given the schema: Customer=(C-name,C-street,C-city) Borrower=(C-name,Loan-no) Depositor=(C-name,Account-no) and 3 relations more(not useful in this context),the tuple relational query for: "All ...
0
votes
0answers
33 views

Decomposition into BCNF where an attribute appears in multiple functional dependencies

I am trying to decompose my relation: R = (A, B, C, D, E) with Functional Dependencies F = {D -> BC, E -> B, A -> B, B -> D} The problem is that D appears in two dependencies and in ...
-1
votes
1answer
28 views

Relation that combines entries with their subsequent entries, in order of date

I need to come up with a query that can do the following: I have a table with a bunch of transaction records, whose attributes are not important, other than the attribute Date. I need to come up ...
-1
votes
1answer
112 views

What is the real-world purpose of an optional 1:1 relationship?

I know that one-to-one relationships can be used to split data into multiple tables for performance or security and that it is used to create a is-a-relationsship. But aside from that things, what is ...