FILE SYSTEM vs DataBase System

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
fachamix
Posts: 21
Joined: Thu Oct 26, 2006 9:30 pm

FILE SYSTEM vs DataBase System

Post by fachamix »

a friend of my, told me:

"why make a OS with FileSystem Technology if we have Data Base System technology", he and I where imagine a operating system with a DataBaseSystem instead the common filesystem.

My final conclusion was that a DataBaseSystem would not be better than the filesystem technology, my friend did not agree with me.


what do you guys think about this ?
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Wasn't that what WinFS was going to do?

I'm liking the idea myself. It sounds interesting, especially with the whole idea of relationships and search possibilities.

Now, if only there were something like it for Linux...
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

A database system is fine for highly structured information, but not for something which will include graphics files, text files, and spreadsheets amongst its mix, along with executable files and heaven knows what else.

Trying to force unstructured data into a structured framework would spell instant death for the OS which attempted it.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

I kinda like the idea of having a database a critical part of the OS. I think that all of the user's files could be stored in the database and that the operating system files could be stored in a normal partition. I think that if a database was used it should be on a separate partition and not have any underlying file system. If all user files were stored in a database then you could easily have access to all of the revisions of the file. If the database engine could be made to understand most of the file formats then you could easily build an index of the database and make searching ultra fast.

So to sum it all up I like the idea of having all user files and documents stored in a database but just not system files and boot files and things like that.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

It is possible to have a good search feature with a conventional filesystem, but not if you're Microsoft apparently. :P I haven't tried Google Desktop search, but I've heard it works well. I have tried Spotlight on Mac OS X, and it's amazing (especially compared to the craptitude that is search in Windows -- even Vista's search is pathetic and slow).

The keys are metadata, and indexing. Tag files with the right kind of information and keep an up-to-date index on it, and search is no problem. Plus the concepts of files and folders are easier for users to understand, and easier to administer (especially when things are really broken and the only way to fix them is with command-line tools).
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

I thought a file system was a database?
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Kevin McGuire wrote:I thought a file system was a database?
Never thought of it like that. Hum that makes me think a little. Thank you.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Kevin McGuire wrote:I thought a file system was a database?
Maybe in an abstract sense... It might be more accurate to say that a file system plus a content indexing system is a database. However, it's not the same as a relational database (with native support for SQL queries), which is what I assumed the OP was asking about.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

I was targeting the original poster. I was not trying to be politically correct, or technically accurate.

why make a OS with FileSystem Technology if we have Data Base System technology?

Just a little push in the right direction, and a file system would become a database since it already fully satisfies two of the points for a Database.
  • (Yes) Data is managed to ensure its integrity and quality
  • (Yes) Allows shared access by a community of users
  • Uses a schema.
  • Supports a query language

well i mean you know it's it's uh very close i mean you know these guys most likely do not understand everything a database does uh or even a file system and you know what you wanna do is get those wheels turning uh make them think.. you know, what is the difference in a database and a filesystem.. i mean of course you know the in depth structure is really different but i mean these guys are looking for inspiration to work on something, you know, and you give it to them.. you tell them hey, is a filesystem not a database.. you know instead of clouding them into thinking they are two totaly complete different things with no relation what so ever..

anyway.. you see they think and they build you know.. uh you know they do not want to speak English about it they want to build it.. to do so they got to turn those gears.. isnt a filesystem a database.. they say.. is he crazy.. no wait it is.. well ... maybe not completely.. hmm.. can i make a file system into a fully blown database.. hmm.. and the gears turn.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Kevin McGuire wrote:I was targeting the original poster. I was not trying to be politically correct, or technically accurate.
What does politics have to do with this?
Just a little push in the right direction, and a file system would become a database since it already fully satisfies two of the points for a Database.
  • (Yes) Data is managed to ensure its integrity and quality
  • (Yes) Allows shared access by a community of users
  • Uses a schema.
  • Supports a query language
Yes, that was my point about search. Adding support for search gives you the fourth feature, more or less (a search box is much easier for users to deal with than something like SQL anyway). The tricky part is the third feature, as mathmetician pointed out:
Trying to force unstructured data into a structured framework would spell instant death for the OS which attempted it.
That's why application-specific metadata makes a lot more sense. Users (through their applications, or directly) can use metadata to structure the data any way they want.

Maybe we should try to make the original question more focused -- are we talking about making a filesystem behave more like a database from the user's point of view, or replacing the underlying implementation with something like an RDBMS? I think we're already in violent agreement that the former is a good idea. What about the latter?

well i mean you know it's it's uh very close i mean you know these guys most likely do not understand everything a database does uh or even a file system and you know what you wanna do is get those wheels turning uh make them think.. you know, what is the difference in a database and a filesystem.. i mean of course you know the in depth structure is really different but i mean these guys are looking for inspiration to work on something, you know, and you give it to them.. you tell them hey, is a filesystem not a database.. you know instead of clouding them into thinking they are two totaly complete different things with no relation what so ever..

anyway.. you see they think and they build you know.. uh you know they do not want to speak English about it they want to build it.. to do so they got to turn those gears.. isnt a filesystem a database.. they say.. is he crazy.. no wait it is.. well ... maybe not completely.. hmm.. can i make a file system into a fully blown database.. hmm.. and the gears turn.
Is there a point to this?
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

I dunno. :P
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

Kevin McGuire wrote: Uses a schema.
Surely the schema of a filesystem is:
string filename;
some_type attributes;
time_date various_creation/modification_times;
blob data;

although I guess you were referring to a defined type for the contents of the file.

Might I add a further similarity between journalled filesystems and transactions in databases. I guess in that sense, journalled fs + index is a database with a layout on disk that is slightly different from your average database in that it is a fixed size rather than able to grow on demand and you need some special bits like the boot sector et al. I haven't really thought much about it, but I guess the layout of a filesystem is designed to be more efficient in terms of bulk transfer speed and/or space when working with disk drives as opposed to databases which are normally designed for fast searches.

But yes, I agree with the principle, a file system is basically a database.

Regards,
John.
fachamix
Posts: 21
Joined: Thu Oct 26, 2006 9:30 pm

Post by fachamix »

I complete agree with you mathematician.

It would not work properly with graphics, text files, and a lot more types of file.

But, I also agree with the idea to have all the files of and user in a database.
Also the idea of having a database system instead could increase the searching of information.


Looking to all the advantages and disadvantages, .................... i have my self with one more question, ..... and if we mix them???? would this be better (using the imagination) , i dont know , i dot even know how would I do it but , its just a question.[/b]
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

It wouldn't be that hard to make the database engine understand the contents of most files and for the other files they could be stored with meta data just like on a real filesystem. But when the user wants to migrate all of his data from one computer to another all he/she would have to do would be to copy the database from one computer to another.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

frank wrote:It wouldn't be that hard to make the database engine understand the contents of most files and for the other files they could be stored with meta data just like on a real filesystem.
You could even have a module-type system so each application could have a module that would allow the database system to understand its own file type. (Blender, for instance, would load a module that would allow the system to preview, read, etc. 3D type files.) Then other applications could use each other's module's to read and write those types of files.

I think this is what WinFS was going for. Reading about it just makes me want to use it... =P~
C8H10N4O2 | #446691 | Trust the nodes.
Post Reply