We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [relational-theory]

On this site this tag applies to questions about Relational Model theory. The Relational Model for database management is an approach to managing data using a structure and language consistent with first-order predicate logic. In the Relational Model of a database, all data is represented in terms of tuples, grouped into relations. A database organized in terms of the Relational Model is a relational database.

Filter by
Sorted by
Tagged with
4
votes
1answer
96 views

Do my relational algebra operations produce the desired results?

I have these tables: Sailors sid sname rating age --- ------ ------ --- 22 dustin 7 45 31 john 8 55 58 ben 10 35 Boats ...
1
vote
1answer
118 views

How to prove “A->B,C then A->B and A->C” from Armstrong Axioms

I know that this is true but I don't understand how to prove it. The Problem: Prove or disprove that if A->B,C, then A->B and A->C This answer is similar but it does not prove the relation using ...
2
votes
1answer
176 views

BCNF decomposition excercise

I have a relation R(A,B,C,G,H,I) with the functional dependencies (FDs for brevity) F = {A→B; A→C; C,G→H; C,G→I; B→H}. I want to decompose it into BCNF. So, we have AG as candidate key. I consider ...
0
votes
0answers
334 views

3NF Decomposition Check

I've solved, or I think I have, two book problems an 3NF, but I'm still a bit unsure about my understanding of it all and want to be sure I did it correctly. For the first one I have R(ABCD) and ...
1
vote
0answers
220 views

Quantifiers in Tuple Relational Calculus (Existencial and Universal)

Suppose this state for the relation schema Company I'm stuck trying to understand how, why and when I should use Quantifiers (Existencial and Universal) Examples: Here I understand how the ...
6
votes
2answers
2k views

How are joins Commutative and Associative?

I have read all over the place that joins are associative and commutative. So A join (B join C) should be the same as (A join C) join B. But I have a really hard time understanding how this can be ...
4
votes
2answers
187 views

Is combining independent tables called normalisation?

So, at workplace, we currently store our audit logs in different tables, depending on what it is e.g. login/access info, configuration changes, etc. These are all independent data with no foreign ...
3
votes
3answers
112 views

How to handle variations of the same data point?

I have a database with three tables: books, authors and books_authors books_authors is a “junction” table (i.e., it represents a conceptual level many-to-many relationship), so if it has a row ...
2
votes
0answers
120 views

Understanding multivalued dependencies

This is my first time studying multivalued dependencies and there is a question that was posted by my lecturer as a class exercise. I have an answer, but I'm not 100% sure it was right. Please let me ...
1
vote
1answer
1k views

Converting a relation into BCNF

I understand that to convert to BCNF, we need to take into account all violations and decompose as necessary with each FD. For example, if we had R(A,B,C,D) with FD's AB->C, B->D, C->A. We can ...
3
votes
0answers
2k views

How do you perform the chase test?

Trying to follow the chase algorithm as I understand it, If two rows agree in the left side of a functional dependency (FD for brevity), make their right sides agree too. Always replace a ...
3
votes
1answer
3k views

Converting SQL to Relational Algebra / Calculus

I have designed a schema and generated a few SQL queries. I'm using PostgreSQL. For example: CREATE TABLE train ( train_code SERIAL PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE journey ( ...
1
vote
2answers
2k views

Find the highest graded student in each state, using Relational Algebra

Suppose I have a table of students, containing their ID, grade and state: ------------------------- | id | grade | state | ------------------------ | 1 | 83 | CA | | 2 | 94 | TX ...
-1
votes
1answer
326 views

Normalizing with “Relational Database Tools” [closed]

I am trying to use the Relational Database Tools to check if my schema is in Boyce-Codd Normal Form and to understand the relevant functional dependencies. However, I am having trouble "converting" ...
2
votes
0answers
26 views

Do Selection attributes have to appear in Projection list in Relational Algebra

In extended relational algebra (aggregation being allowed) do you have to project all attributes that you use in a statement? So for example in the query below the attributes A.FO_ID and A.Arrival are ...
26
votes
6answers
2k views

Why the term “relation(al)”?

In english, we might talk about the relation between, say, Bob and Tim. Perhaps they're cousins. The term "relation" in this context makes sense to me. In the context of relational databases, I ...
1
vote
2answers
2k views

Counting distinct entries in a column using relational algebra

So I have a table similar to this one. Each user has posted a review about one or more hotels(A,B,C,D) but on different dates so there are no duplicate tuples even though a person might have reviewed ...
1
vote
1answer
75 views

Finding fuctional dependencies and candidate keys

I have number of files, each containing all reviews for a specific hotel (one file corresponds to one hotel, e.g. hotel_2194.dat). Each review is of the type: <Author>PERKEISHA <Content> ...
7
votes
3answers
1k views

What are object-relational databases, and why is this model necessary in spatial databases?

Over in GIS SE, many of us use ESRI geodatabases. ESRI describes geodatabases as being object-relational. What are object-relational databases, and why is it necessary to use this model in spatial ...
0
votes
1answer
252 views

How to write double Natural Join in SQL?

Let be the following database : Product(Constructor, Model, Type) PC(Model, Speed, RAM, HD, CD, Price) Laptop(Model, Speed, RAM, HD, Screen, Price) Printer(Model, Color, Type, Price) ...
2
votes
1answer
163 views

Lossless Join Decomposition Criteria

On Wikipedia, it says: The decomposition is a lossless-join decomposition of R if at least one of the following functional dependencies are in F+ (where F+ stands for the closure for every ...
0
votes
1answer
41 views

Progression to 3NF

my relation is: H = {A,B,C,D,E} A -> C {A,D} -> E B -> C {B,D} -> E C -> B E -> C I have to convert this relation to 3NF. The candidate key : {A,D} First step is minimalization. ...
0
votes
1answer
959 views

Next step in progression from 3NF to BCNF

I am working with relation H that is detailed below: H = {A,B,C,D} It shows the following functional dependencies (FD[s]): F = { A -> B, B -> C, {C,D} -> A} The candidate keys are {A,D}, ...
3
votes
1answer
151 views

Identifying the normal form that a certain relation complies with

I have a little problem with a normalization exercise. I have the following relation: R = {L,K,D,S,O,W} which presents the functional dependencies (FD) shown below: F = { {D,S,K} -> {O}, {...
9
votes
4answers
672 views

First Normal Form: Definitive Definition

I am trying to get a definitive version of what is First Normal Form. Everything I read has a slightly different spin. Many authorities, such as Date, say that by definition a relation is always in ...
2
votes
1answer
967 views

Proof that Inner Join is Commutative

I'm trying to prove to myself that the order of inner joins doesn't matter, but, in an abstract sense, I'm coming up with nothing. How would one go about proving that the order of a set of INNER ...
4
votes
2answers
991 views

Is a relation R(A,B,C) with functional dependencies {AB->C, C->B} in BCNF?

If not, then how do I make it BCNF while being lossless and dependency preserving? I can see that the primary key of R is AB. And in BCNF every functional dependency should be of the form [Key] -> [...
5
votes
2answers
311 views

How can I represent the entity types depicted in an ERD as relations with attribute names?

I have created the entity-relationship diagram (ERD) shown below (for brevity, each individual bubble-shaped box portrays multiple attributes): Considering such an ERD, I have to convert each entity ...
1
vote
1answer
475 views

can a table in 2nd normal form have a FD in which the non prime attribute depend on a super key having an extraneous attribute?

For 2NF every source I can get hands on says the following: The non prime attribute must be fully dependent on a candidate key. But can the non prime attribute be dependent on a super set of the ...
10
votes
3answers
1k views

Integrity constraints in a relational database - should we overlook them?

I’m in a permanent discussion with the developers of the company where I work because they say it is better to get rid of relationship enforcement (via FOREIGN KEY constraint definitions) in a ...
4
votes
1answer
216 views

What can be represented in a relational database that can't be represented in a graph database?

I read Blockeel's article that is comparing different paradigms how to represent data. He mentions following advantages of the relational paradigm in comparison to graph paradigm: They can naturally ...
3
votes
3answers
971 views

Storing historical records and extracting data from a given period

This a question about database modeling and PostgreSQL. This post partially answers the question but I need advice on more technical stuff: columns and query to extract the data. I need to store ...
0
votes
4answers
313 views

Database design to record occurences in tv show

I want to make a database where I record the guests of each episodes of a tv show. I want to be able to do the following stastics: What guest had the most appearences? Which two (or three) guests ...
4
votes
1answer
621 views

What is the correct term to describe a single “data point” in a database?

I'm not sure if this question is appropriate, but anyway here goes. I want to communicate the number of "data points" in my database. That is every single value, including more generic values such as ...
2
votes
3answers
88 views

Is Order part of a result set?

This question got me thinking: ROW_NUMBER() OVER (PARTITION BY B,A ORDER BY C) doesn't use index on (A,B,C) In it the questioner states two functions give the same result set, however they don't ...
1
vote
0answers
220 views

How does one map nested multi valued attributes?

Let's say one has an Entity E. E has a multivalue Attribute M1 and a simple attribute A1. However M1 consists again of a multivalue Attribute M2 and a simple Attribute A2. How would one map this ...
1
vote
1answer
814 views

A tuple relational calculus equivalent for the given SQL query

Well, here's a SQL query: select Employee.Name,Department.Name from Employee,Department where Employee.Dept_no=Department.No I have tried a tuple relational calculus on it as: {t|Ǝ s ∈ Employee (s[...
2
votes
1answer
2k views

Estimate result size of Natural Join

I have the following tables R1(A, B, C) with 1.000 rows R2(C, D, E) with 1.500 rows R3(E, F) with 750 rows where a bold letter denotes a primary key. I need to estimate the number of rows of the ...
0
votes
1answer
274 views

How to express functional dependency in relational calculus and SQL?

I want to express in relational calculus and SQL the following functional dependency associated with Vote. This is the first time I try to implement it in actual SQL and relational calculus. Vote: #...
2
votes
1answer
77 views

What a closure `F` of a family of functional dependencies is?

I have some issues to determine what a closure F of a family of functional dependencies is. I know its definition is F⁺= {X → Y\F⊨X → Y} One example Let be the following relation R(Student,...
4
votes
1answer
149 views

What normal forms are these two relations in?

I have a set of relations {A, X, Y, Z}: Given that the functional dependencies: AX→Y, AX→Z, Y→A, Z→X, I would think that this relation would be in the normal form 1NF, because there is a partial ...
2
votes
2answers
565 views

Dependency preserving decomposition

Let be the following relational scheme: F={AB → C; AC → B; AD → E; B → D; BC → A;E → G} Is the following decomposition without loss of dependency? R¹=(A,B),R²=(B,C),R³=(A,B,D,E),R⁴...
1
vote
1answer
481 views

Why does 3NF Normal form allow transitive dependency of prime attributes?

I'm a beginner in Relational Design, and I came across the definitions of 3NF and BCNF. According to 3NF, Any non-trivial functional dependency X-> A shouldn't exist unless X is a super key or A is a ...
1
vote
1answer
270 views

Decomposition In Boyce-Codd Normal Form may lose relations?

Let be the following Realtion R={UtilisateurID, Nom, Prenom, AdresseEmail, Login, Passwd, ServeurMail} with the functional dependencies: F = { UtilisateurID → Nom, Prenom UtilisateurID, ...
0
votes
1answer
277 views

Grouping operator in DBMS (γ) is duplicate-impervious. Why?

I'm reading Database Systems by Ullman where its mentioned that γ is duplicate-impervious. I don't understand why a simple group operation should cause elimination of duplicates. Aliter, Duplicate-...
3
votes
1answer
6k views

How to decompose this relation into 3NF relations?

Today I read about the 3NF decomposition algorithm. It said: Find a minimal basis of F, say G For each FD X → A in G, use {X, A} as the schema of one of the relations in the decomposition ...
2
votes
1answer
35 views

Decompostion with loss of information shown by junction

F={A → B; B → C; C → D} R is decomposed in R¹(A,B) & R²(A,D) & R³(C, D) Is it without loss of information? I would have said yes as far as with the following array A → B x²²= b B → C x¹³=...
2
votes
0answers
52 views

Decomposition and loss of dependencies

I'm lost in the sea with the following example of decomposition without loss of dependencies... Let be the dependencies F= {A → BC, C → AD} R is decomposed in R¹(A,B,C) & R²(A,D) I want to know ...
2
votes
1answer
302 views

Multiple columns from one table rely on one single table

I'm working with PostgreSQL 9.2 and have the following relation between 2 tables: The table town stores a list of town codes. The table perimeter stores perimeters denomination. Towns are almost ...
9
votes
1answer
3k views

Designing a friendships database structure: Should I use a multivalued column?

Say I have a table called User_FriendList, which has the following characteristics: CREATE TABLE User_FriendList ( ID ..., User_ID..., FriendList_IDs..., CONSTRAINT User_Friendlist_PK ...