The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
64 views

Proof for this answer

I am not sure whether this is offtopic. However, please read on. A person whom I know has encountered a problem in the answer key published by CBSE, India. As their key challenging form contains a ...
3
votes
1answer
31 views

The key of the relation resulting from a full outer join

What is the key of the relation resulting from a full outer join? If there is no key, how is it said that the relational algebra is closed under its operators and the result of each operator is also a ...
0
votes
0answers
19 views

Using logic or in relational algebra

In relational algebra I can obtain the courses taught in Fall 2009 or Spring 2010 with Π_{course_id} (σ_{semester=“Fall” Λ year=2009} (section)) ∪ Π_{course_id} (σ_{semester=“Spring” Λ year=2010} ...
0
votes
1answer
54 views

How to enforce that one row in a parent table MUST be associated with at least a row in a child table [duplicate]

I have a one to many relationship enforced via FK, classic example order and order_item, whereby a fk on the order_item to the order table enforces that one item belongs to one order, and one order ...
0
votes
0answers
11 views

Translating duplicated data entries into Domain Relational Calculus

Given a following table named BOOKING, which contains three columns, guest_name, room_number and booking_date, how do I find the all the guest_name that have the same room_number and booking_date? I ...
2
votes
0answers
50 views

Tuple Relational Calculus help? [closed]

I have the following three questions in relation to the following diagram: 1) How many copies of the book titled “The Lost Tribe” are owned by the library branch whose name is "Sharpstown"? ...
0
votes
0answers
25 views

Is there a standard direction to read cardinality relationships in?

I'm reading some documentation, and before getting egg on my face for questioning it, I'd like to check the standard way of reading UML cardinality relationships. The docs I have look like the image ...
0
votes
0answers
20 views

expressing constraints in relational algebra

I need to express this constrain in relational algebra: I have some table with one column with all possible values: ALL_VAL and table with some values from ALL_VAL that not mach some rule: ...
1
vote
0answers
39 views

In terms of relational databases is a Relvar the equivalent to a Schema?

I've been reading up on relational databases and the term Relvar and schema keeps coming up. From my understanding: A relvar is a variable holding a relation. A schema is a logical definition of a ...
1
vote
1answer
77 views

Relational Algebra Queries - How to Approach Problems?

I have the following schema: employee(sin, emp_name, emp_address, salary, supervisor_sin, dept#) works_on(emp_sin, project_number, hours) The question is: Assume that no employee works on more ...
1
vote
1answer
631 views

3NF Decomposition - I'm not sure about this example

I am trying to make sense of an example of 3NF decomposition using the 4-step algorithm mentioned by Ullman here, but I'm not understanding what my lecturer is doing with the last step (or, worse, I'm ...
0
votes
1answer
38 views

Database relationship refresher

All, After several years of programming applications, I'm looking to refresh my understanding of databases. What I knew to begin with was fairly basic, and honestly, it's disappeared over time. I ...
1
vote
1answer
50 views

Is this table in third normal form?

I have a table L(A, B, C). Functional dependencies are: A->B, A->C, B->A, B->C. Is this table in 3nf? My thoughts: A and B are keys of this table. Table is in 3nf if there are no transitive ...
2
votes
2answers
115 views

Algebra of joins, is there ever a need to repeat a table in a series of joins?

First, I'm just asking about inner joins. And, I'm thinking self joins or reflexive joins through a join table are special cases which depend on how the data is structured (e.g. city - state - ...
4
votes
1answer
124 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 ...
0
votes
1answer
117 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 ...
2
votes
1answer
167 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
35 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 ...
6
votes
1answer
2k 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 | ...
1
vote
1answer
138 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
95 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
votes
1answer
51 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 ...
2
votes
2answers
211 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 ...
0
votes
1answer
602 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 ...
2
votes
1answer
112 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. ...
0
votes
1answer
40 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 ...
1
vote
1answer
224 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, ...
0
votes
3answers
113 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 ...
2
votes
0answers
401 views

Transform XPath map into XML document using relational data [closed]

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
2answers
2k 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 ...
1
vote
0answers
427 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
votes
1answer
200 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 ...
1
vote
1answer
176 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 ...
50
votes
5answers
9k 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 ...
4
votes
1answer
220 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 ...
2
votes
1answer
325 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
1k 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 ...
2
votes
1answer
4k 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 ...
1
vote
1answer
135 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: ...
18
votes
3answers
4k 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(...) = ...