Skip to main content
33 votes

What exactly is the 'online' in OLAP and OLTP?

It is simply a remnant of olden times, when it was used in contrast to batch processing. "Online" here means "interactive", that is, requests to the database are processed as they come and responses ...
mustaccio's user avatar
  • 26k
9 votes
Accepted

Alternatives to storing a record with exactly n multiple foreign keys from the same foreign table, where the relationships can't be repeated

Are there official terms for this type of scenario? Yes. This is a Symmetric Relation. And "relation" here has the same meaning as in "Relational Database". An RDBMS is a database management ...
David Browne - Microsoft's user avatar
8 votes

What is meant by a blind write in a schedule?

If there is no read that happens prior to the first write then it is said to be a blind write. Example. Consider the following schedule: W3(X) is a blind write, as there is no read before write [R3(...
sharhp's user avatar
  • 181
8 votes
Accepted

Difference between candidate key & primary key

I think this post does a pretty good job of explaining the difference. To summarize: Candidate Key – A Candidate Key can be any column or a combination of columns that can qualify as unique key in ...
Scott Hodgin - Retired's user avatar
7 votes
Accepted

Understanding data abstraction levels

Although the definitions of the schemas or levels of representation of the ANSI/SPARC architecture did not reach the desired precision, they are only three, and they are named external, conceptual and ...
MDCCL's user avatar
  • 8,520
7 votes

Alternatives to storing a record with exactly n multiple foreign keys from the same foreign table, where the relationships can't be repeated

To long for a comment, so I'll just add this as a complement to David's solution. Even though the question was of theoretical nature, it may be of interest to see how that can be implemented in real ...
Lennart - Slava Ukraini's user avatar
7 votes

How do I identify the SQL server brand via SQL queries

Go by elimination. Failing select @@version will eliminate both SQL Server and MySQL; failing select version() will eliminate both Postgres and MySQL; etc. Examples of such queries have been helpfully ...
mustaccio's user avatar
  • 26k
6 votes
Accepted

Why are multivalued dependencies named that way?

A multivalued dependency A->->B means that each value of A determines a set of values of B (and not a single value of B as in functional dependencies). For instance, suppose that programmers have an ...
Renzo's user avatar
  • 4,080
5 votes

what does "\" symbol mean?

The \ symbol is often used in mathematics for set difference, besides dash or minus symbol (-) Since tables and relations are very similar to sets and the operations of union, intersection and ...
ypercubeᵀᴹ's user avatar
4 votes

Why are there so many definitions of database?

If you compare any two authorative references for a single subject they will employ different words even though they convey the same meaning. This is just the nature of English - it has a very rich ...
Michael Green's user avatar
4 votes
Accepted

Transaction recovery and rollback

Assuming that R means Read and W means Write, then the work you're proposing is like this: W1(x) C That's it. Reads are irrelevant for recovery. And a crash denotes the end, you can't have a write ...
Remus Rusanu's user avatar
  • 51.9k
4 votes
Accepted

Why is SQL not considered a programming language?

I suppose it is a matter of definition(s) and whom you may ask. Some start would be whether the language is Turing complete. SQL92 is not, but extended with recursive CTE and Window functions you can ...
Lennart - Slava Ukraini's user avatar
3 votes
Accepted

Minimal 3NF normalization issues

A. Canonical Cover The example is almost a canonical cover, since in a canonical cover each dependency has only an attribute on the right part, so the dependency C → DF must be replaced by the ...
Renzo's user avatar
  • 4,080
3 votes

Understanding repeatable read isolation level

Serializable means that there is some order the transactions can be run in without overlapping and we'll end up with the same answers and the same state of the database as we get by running the ...
Michael Green's user avatar
3 votes

Understanding data abstraction levels

I understand the three layers as: Everything the user sees. Basically the relevant parts of the middle layer spiced with some views. A logical or ER-model, this can be 3NF or similar - I would call ...
Grimaldi's user avatar
  • 420
3 votes
Accepted

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

Just two steps: you can use reflexivity for B C -> B and then transitivity from A -> B C and the previous dependency. Analogous solution for the second case.
Renzo's user avatar
  • 4,080
3 votes
Accepted

B+ Tree structure with buckets (Begginer question)

It is not mandatory for a b+tree leaf to have a pointer towards the next leaf, but it is a widely used optimization to allow efficient scanning of value ranges, such as, in the context of relational ...
mustaccio's user avatar
  • 26k
3 votes

Simultaneous money withdrawls from a distributed/replicated database

Short answer In a distributed system, you can't be prevented from simultaneous withdrawals. If you want to prevent simultaneous transactions then don't use a distributed system. Clarification By "...
Greenstone Walker's user avatar
3 votes
Accepted

Compensation Log Records (CLR) in UNDO-Phase of Database Recovery

Compensation log records (CLRs) are not written to the log during normal operation. They are produced while processing a rollback, either application-requested or due to a crash. Since their only use ...
Michael Green's user avatar
2 votes

What is a "database"?

Codd's seminal paper was titled A relational model of data for large shared data banks. What he called a "data bank" we would term a database. I like his imagery, however. It implies a place where ...
Michael Green's user avatar
2 votes

What is a "database"?

I worked for Ashton-Tate during the development of dBASE Direct/36 and dBASE IV, using my dBASE III Plus knowledge to code a small program to aid in testing of dBASE Direct/36 (interface to an IBM ...
HoundCat's user avatar
2 votes

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

In the book, "Garcia-Molina H., Ullman J., Widom J., Database Systems: The Complete Book. Pearson Prentice Hall, 2009", Chapter 5, "Algebraic and Logic Query Languages", on top of page 217 of the 2nd ...
Renzo's user avatar
  • 4,080
2 votes

Mathematical equality of two SQL statements

dba user Lennart pointed me to this project: http://cosette.cs.washington.edu/ Cosette is an automated prover for checking equivalences of SQL queries. It formalizes a substantial fragment of SQL ...
guettli's user avatar
  • 1,521
2 votes
Accepted

Question about cost optimization formula for SELECT

Assuming "first level" means the leaf level of a nonclustered (secondary) index, the b_li/2 part accounts for the cost of scanning (using sequential I/O) through half those index blocks. Assuming "...
Paul White's user avatar
  • 84.3k
2 votes

Difference between candidate key & primary key

Candidate keys can take null values whereas primary keys can never be null. That is also one of the significant differences.
Nirlipta Rout's user avatar
2 votes
Accepted

Proof that if a relation R is in 3NF and if every key in R is simple, then R is in BCNF?

Interesting question (I happen to be reading the Ullman book right now). I think the answer is something like this: Assume that X is not a superkey. Then, each attribute in Y is a member of a key (is ...
JRG's user avatar
  • 170
2 votes
Accepted

How do graph databases differ from older navigational (hierarchical/network) databases?

Graph databases are largely irrelevant. What matters is the graph processing engines that use them. For that a dedicated graph database is not necessary: graphs can be represented in any sorts of ...
Albert Godfrind's user avatar
2 votes
Accepted

Confusion with Tuple Relation Calculus Operations

∃s (student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId) For some s, s is a student & s is female & s is in d's department. ~∃s (student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId) For no s, s is a ...
philipxy's user avatar
  • 774
2 votes

Is there a name for this pattern, representing one-to-many relationships by adding columns with an index to a single table?

The Domain Expert has given you a requirement disguised as an implementation detail. I would implement this by: Implementing a relation table as you want Implementing a view which will give up to 4 ...
simon at rcl's user avatar
2 votes

Analyzing a query plan for a query with TWO predicates, but index only has ONE

The optimal index for that query is INDEX(faculty, wam), in that order. MySQL does not (in most situations) use two different indexes. However, it will use a 'composite' index to good use in some ...
Rick James's user avatar
  • 78.1k

Only top scored, non community-wiki answers of a minimum length are eligible