views:

53

answers:

3

The Media Wiki database Schema, here, has taught me a lot.

Cannot-understand: In contrast, it seems rare that other services of the size, such as Youtube, publish their database schema. Oddly, some of such services have presently opened APIs, but not schemas.

Question: What is the relationship between schemas and APIs? Why are some schemas hidden while their APIs open?

+1  A: 

What if you publish the schema, and your users become dependent on it. You then can't change it.

John Saunders
+1  A: 

Data storage is often just an Implementation detail. Its often not relevant to an API.

Tim Jarvis
+1  A: 

Generally the schema can be open to change in the future, whereas an API needs to try and stay consistent.

What situations would knowing the schema make a difference? I can only think of cases where it might expose a gap in the API (eg. if the API doesn't specify the maximum length of string fields, for example). But since the schema can be changed at any time they're not the kinds of things you should rely on.

Colin Coghill
+1 Good points.
Masi
"What situations would knowing the schema make a difference?" A picture can help to understand the system. There are things that even good APIs, such as your example, may not reveal.
Masi