Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repository vs database vs filesystem

What makes repository different from database, filesystem or any other kind of storage? How can I exactly tell that this or that is repository judging by some set of features that it has or does not have?

When I say 'repository', first of all I mean version control. But there are other examples of repositories, such as digital libraries, for instance. There might be other examples, of course, but all of them would assume that repository is 'the place where you can store something'. But it's not really clear what exact differences does it have that allows to distinct it from other 'places where you can store something'.

like image 221
altern Avatar asked Jan 29 '10 10:01

altern


People also ask

What is the difference between repository and database?

A database is just a place to store data, or an application database is a place to store the data for a particular computer application. The Repository is itself an application database, but it also stores data about (ie. metadata - data about data) other application databases.

What is the difference between a repository and a folder?

The repository is essentially the . git hidden folder inside the working directory (workspace). The working directory (workspace) is essentially your project folder. Also note the term directory is basically synonymous to the term folder.

Is a repository just a folder?

In Git, the repository is just a simple hidden folder named " . git " in the root directory of your project.


2 Answers

Repository is just a descriptive term the author's chose.

I'm not sure why you'd ask what it means. It's just a word they picked so they wouldn't have to say "the file system locations in which we keep your stuff".

**What makes repository different from database, filesystem or any other kind of storage? **

Nothing. It's storage. It's a filesystem. It's a database. It's just a word they picked so they wouldn't have to say "the file system locations in which we keep your stuff". They shortened it to "repository".

Usually, we reserve "filesystem" for the underlying OS features that give us persistent storage. A repository probably has some more organization than just random files. But it might not.

Usually, we reserve "database" for a discrete product that has a more formal API, a query language, and locking and some reliability features like backups and logs.

How can I exactly tell that this or that is repository judging by some set of features that it has or does not have?

You can't. Something is a repository because the folks that wrote the software decided to call it a "repository". The application developers could call anything a repository -- database, filesystem, individual file. Anything "stateful" can be a repository.

It's just a word they picked so they wouldn't have to say "the file system locations in which we keep your stuff".

it's not really clear what exact differences does it have

Why does that matter? Who actually cares? What problem do you have?

Why does it matter which files are a "repository", which files are a "database" and which files are just files?

You can have files that are a "backup" or a "vault". You can have files that are a "collection" or anything the developers want to call it.

They're free to use any descriptive term they want to replace "the file system locations in which we keep your stuff".

like image 175
S.Lott Avatar answered Sep 23 '22 20:09

S.Lott


When I worked on repository software, many years ago. Back then, the difference between (general purpose) databases and repositories was the difference between "data" and "meta-data".

So, a database stores data. A repository is a special class of database which is designed to store meta-data, that is, data that describes other data.

Any general purpose database software could be used as a repository, but there are some characteristics of meta-data that make it desirable to use a special-purpose tool. Generally, the granularity of the data is small, with lots of cross-references to other data. The number of records is likely to be tractable. There is often a requirement for version control and/or diffs of the contents.

Because of these special requirements, database manufacturers were tempted into writing special DBMS systems to support the needs of repository builders. (Does anyone remember Microsoft Repository or the Unisys's UREP?) I am no longer in that field, and couldn't tell you about the progress in the past decade.

like image 40
Oddthinking Avatar answered Sep 21 '22 20:09

Oddthinking