8

I have a very little idea about what database file system is.

Can somebody out here explain to me what actually a database file system is, and what its applications are? How is it different from a conventional file system?

How I can build it?

Ravindra S
  • 6,302
  • 12
  • 70
  • 108
  • 6
    @ Tom Don't you think that I must have done a little bit of Googling before putting this question. I didn't find much interesting and explanatory over their, so I thought why not to ask biggies who might already know it or have used it. – Ravindra S Oct 15 '09 at 21:34
  • 5
    Aha! Seems Tom deleted his comment. – Ravindra S Oct 16 '09 at 04:54

4 Answers4

9

Typical file systems (*nix, ms-dos, etc) organize files hierarchically. For example,

c:\ represents the top of a hierarchy c:\foo is the next level in the hierarchy c:\foo\bar is a sub-node of \foo etc..

Each file exists in one and only one location in this hierarchy.

By contrast, a database file system organizes files by metadata attributes. For example, topic, type, author, etc.. Rather than existing in one particular place in a hierarchy, the file exists in multiple "places" depending on its attributes.

The last question you ask is unanswerable.

Rip Rowan
  • 96
  • 8
  • 7
    had to downvote you. Sorry. Unix does _not_ organize files hierarchically. Unix organizes data in a graph-based structure, where the hierarchy is the most frequently used (because easy to handle). Every filename in your filesystem is actually a reference to a inode structure. You can add multiple references to the same inode (so-called hard linking) and have your file in multiple places at once. This works as long as you stay within the boundaries of the same filesystem. In addition, you have soft-links which act as transparent path references. Summing up... – Stefano Borini Nov 02 '09 at 06:52
  • 2
    what you see in the userspace is a hierarchy because one node has been elected as the root node, but it's a choice (mandatory) out of many. after the root node, you basically have no structure, if you want, and the only limit is the max length of a path (normally 1024 characters, IIRC). The fact that, in practice, the most used layout is a simple hierarchy is irrelevant. – Stefano Borini Nov 02 '09 at 06:54
  • 1
    Of course, how the actual information is stored on the physical disk is a completely different story. – Stefano Borini Nov 02 '09 at 06:55
  • 1
    @StefanoBorini Doesn't Unix force it to be non-cyclical and directed, by preventing the creation of hard-links to directories? – mtraceur Sep 17 '18 at 19:37
6

Found some good links

Ravindra S
  • 6,302
  • 12
  • 70
  • 108
  • For the last question, (how can be such a thing built), this: https://thepythoncorner.com/posts/2017-02-28-writing-a-fuse-filesystem-in-python/ . shows how to implement a filesystem in python which can be mounted. – nadapez Aug 13 '22 at 12:41
2

It's a file system where files have significant amounts of metadata. For example, the iTunes library might count as a database file system; not only do you have files on disk and know where they are, but you have tags (genres) and other metadata like author (artist).

Dean J
  • 39,360
  • 16
  • 67
  • 93
1

It's a file system that stores files as blobs in a database, rather than in a hierarchy of directories. Imagine a web-site with no "directory-like" hierarchy in the URL - just loads of tags and categories and a big "search" field - something like that, only on your hard-drive.

Pros & cons? Ask yourself, how many database filesystems have I ever seen? Do you need to ask more?

alex tingle
  • 6,920
  • 3
  • 25
  • 29
  • Have you heard of Microsoft's winFS and MAC's spotlight?They are best example of DBFS. – Ravindra S Nov 02 '09 at 20:12
  • 1
    OSX's Spotlight is an application that uses metadata extensions in Apple's HFS+ filesystem. HFS+ is not a database filesystem. WinFS has never shipped, so unless you work for Microsoft, it's unlikely that you'll ever see it. The only widely deployed DBFS was shipped with AS/400. Apparently, it was very good. – alex tingle Nov 02 '09 at 22:06
  • 1
    Yeah.WinFS's beta version was released some years ago.Its there on Torrent sites.But with zero seeds.I don't know why Microsoft cancelled it.I would love to use such system.I just like the concept of DBFS. – Ravindra S Nov 04 '09 at 15:38