Questions tagged [database-theory]
47 questions
34
votes
4 answers
candidate keys from functional dependencies
Given the Relation R with attributes ABCDE. You are given the following dependencies: A -> B, BC -> E, and ED -> A. I already have the answer which is CDE, ACD, and BCD. I just need to know how to do it. Thanks.

ranzy
- 459
- 3
- 6
- 10
7
votes
4 answers
Groupings of queries
I would like to understand what might be the highest-level groupings of how query languages can be broken up into, and why one grouping might be fundamentally different than another. For example, the groupings that I have come up with now (for…

David542
- 104,438
- 178
- 489
- 842
7
votes
4 answers
How do I implement MVCC?
I have located many resources on the web giving general overviews of MVCC (multi-version concurrency control) concepts, but no detailed technical references on exactly how it should work or be implemented. Are there any documents online, or books…

jl6
- 6,110
- 7
- 35
- 65
6
votes
5 answers
SQL Query theory question - single-statement vs multi-statement queries
When I write SQL queries, I find myself often thinking that "there's no way to do this with a single query". When that happens I often turn to stored procedures or multi-statement table-valued functions that use temp tables (of one sort or another)…

Michael Bray
- 14,998
- 7
- 42
- 68
5
votes
3 answers
What does the symbol "⊇" mean?
In the attached picture there's a symbol I don't understand. To understand additive functional dependency I need to know what the symbol means. Please advice?
It's the symbol where it says: "Suppose that X ⊇ Y and that..."
⊇ = ?
Thanks!

Phil
- 3,934
- 12
- 38
- 62
4
votes
3 answers
Consider the following set F of functional dependencies on the relation schema r(A,B,C,D,E,F):
I have tried to reach out to my instructor with no luck and I really want to understand this process, but no matter how much I read the material I cannot seem to make this fit in my little brain. Can someone please help me with the following…

Sam
- 41
- 1
- 1
- 3
3
votes
3 answers
3rd Normal Form on User Account Table, Salts, and Hashes
I understand the importance of salts, hashes and all that good stuff for passwords. My question relates to relational database theory.
My understanding of 3rd normal form is that every element must provide a fact about the key, the whole key, and…

Dragontamer5788
- 1,957
- 1
- 12
- 20
3
votes
1 answer
BCNF of a Relation with no FDs
A simple question that I do not seem to find an answer for online:
Is the relation that has no non-trivial functional dependencies considered to be in BCNF form and if not, how do I decompose it? Thank you in advance!

Alexander Nenartovich
- 786
- 7
- 22
3
votes
0 answers
k-Anonymity for object-orientated databases
Based on this theoretical work of Latanya Sweeney about k-anonymity:
Definition 2.1 (Quasi-Identifier)
Let
be a table. A quasi-identifier of
is a set of attributes
whose release must be controlled.
Definition 2.2 (k-anonymity)
Let
be…

Ben H
- 435
- 5
- 15
3
votes
1 answer
Does minimality of superkey guarantee it to be the candidate key?
Determine the candidate keys and superkeys of the relation R(ABCDEF) with
FD's: AEF → C, BF → C, EF → D, and ACDE → F
This is a problem from my book. The book claims that the candidate keys are ABCDE and ABEF. From what I understand, a candidate…

Xiagua
- 395
- 1
- 13
2
votes
2 answers
how avoid race condition when two users inserting record in same table with manually generated user id
I am generating userId manually i.e. previous userId+1.
but if two or more users reading previous userId and inserting new record.
So,there is a possibility that, any two or more users inserting record with same userId

Chaitanya
- 81
- 1
- 4
2
votes
0 answers
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?

code_monk
- 9,451
- 2
- 42
- 41
1
vote
0 answers
How to use 2NF definition to show that a relation is in 2NF
I have this Relation:
(City, State, Governor, Population)
Given FDs:
City, State -> Population
State -> Governor
Governor -> State
I understand this to be the a minimal cover of FDs.
How do we show this is in 2NF?
Definition for 2NF from…

Sigmund
- 69
- 1
- 9
1
vote
1 answer
Dependency preservation: Why is this decomposition dependency preserving?
In our database class, our instructor showed this as an example of a dependency-preserving decomposition:
R(A, B, C) with F = { A->B, B->C } decomposed into R1(A, B) and R2(A, C)
In order for a decomposition to be dependency preserving, the…

AlexH
- 1,087
- 2
- 10
- 29
1
vote
0 answers
what is arity of query in database theory
What is the arity of a query in databases? for a realtion is the number of attributes.
Is it the number of attributes in all the input relations, or number of attributes of the new query output relation?
for eg.
Input: a database D, a query Q/k ∈…

Studentguy
- 11
- 2