Questions tagged [relational]
526 questions
283
votes
21 answers
What's the best practice for primary keys in tables?
When designing tables, I've developed a habit of having one column that is unique and that I make the primary key. This is achieved in three ways depending on requirements:
Identity integer column that auto increments.
Unique identifier (GUID)
A…

Lloyd Cotten
- 4,416
- 5
- 23
- 21
210
votes
9 answers
Why should I use document based database instead of relational database?
Why should I use document based database like CouchDB instead of using relational database.
Are there any typical kinds of applications or domains where the document based database is more suitable than the relational database?

Bartosz Blimke
- 6,498
- 3
- 24
- 19
115
votes
7 answers
What is Normalisation (or Normalization)?
Why do database guys go on about normalisation?
What is it? How does it help?
Does it apply to anything outside of databases?

AJ.
- 13,461
- 19
- 51
- 63
79
votes
7 answers
Using Tuples in Ruby?
Does anyone use tuples in Ruby? If so, how may one implement a tuple? Ruby hashes are nice and work almost as well, but I'd really like to see something like the Tuple class in Python, where you can use . notation to find the value for which you are…
user29439
37
votes
3 answers
Superkey, candidate key & primary key
Can any kind soul clarify my doubts with a simple example below and identify the superkey, candidate key and primary key?
I know there are a lot of posts and websites out there explaining the differences between them. But it looks like all are…

JLearner
- 1,271
- 9
- 27
- 40
35
votes
3 answers
How do you store a trie in a relational database?
I have a prefix trie. What is the recommended schema for representing this structure in a relational database? I need substring matching to remain efficient.
blank
34
votes
18 answers
Should I delete or disable a row in a relational database?
In a brand new program where space isn't really that big a deal, is it better to delete a row or to disable a row by let's say a boolean "Disabled" and have the program just ignore it?
For example, if I wanted to remove a user from a program.

danmine
- 11,325
- 17
- 55
- 75
33
votes
2 answers
Google's Bigtable vs. A Relational Database
Duplicates
Why should I use document based database instead of relational database?
Pros/Cons of document based database vs relational database
I don't know much about Google's Bigtable but am wondering what the difference between Google's…

Daniel Kivatinos
- 24,088
- 23
- 61
- 81
31
votes
12 answers
How do you document your database structure?
Many database systems don't allow comments or descriptions of tables and fields, so how do you go about documenting the purpose of a table/field apart from the obvious of having good naming conventions?
(Let's assume for now that "excellent" table…

Anders Sandvig
- 20,720
- 16
- 59
- 73
30
votes
3 answers
Database - Designing an "Events" Table
After reading the tips from this great Nettuts+ article I've come up with a table schema that would separate highly volatile data from other tables subjected to heavy reads and at the same time lower the number of tables needed in the whole database…

Alix Axel
- 151,645
- 95
- 393
- 500
15
votes
5 answers
HTML 5 / Javascript flowchart tools / prezi style?
Does anyone know if there is sort of an open-source Prezi tool that works with HTML5 / javascript? I'm looking for a way to set up a flow-chart diagram and then have the browser window focus on different parts of it. Rotation and cool effects not…

cwd
- 53,018
- 53
- 161
- 198
15
votes
4 answers
SQL selecting rows where one column's value is common across another criteria column
I have a cross reference table that looks like this:
id document_id subject_id
1 8 21
2 5 17
3 5 76
4 7 88
5 9 17
6 9 76
7 2 76
It matches documents to…

Maciek
- 3,322
- 6
- 28
- 35
12
votes
2 answers
What are the best practices in building multi-tenancy applications?
What are the best practices in building applications that support multiple tenants such as Software as a Service?
Links to white papers that expand on this topic are greatly appreciated.

McGovernTheory
- 6,556
- 4
- 41
- 75
12
votes
3 answers
Efficient persistent data structures for relational database
I'm looking for material on persistent data structures that can be used to implement a relational model.
Persistence in the meaning of immutable data structures.
Anyone know of some good resources, books, papers and such?
(I already have the book…

John Nilsson
- 17,001
- 8
- 32
- 42
11
votes
9 answers
Easy way to store and retrieve objects in Java without using a relational DB?
Do you know of an "easy" way to store and retrieve objects in Java without using a relational DB / ORM like Hibernate?
[Note that I am not considering serialization as-is for this purpose, as it won't allow to retrieve arbitrary objects in the…
user52154