OSDev.org
https://forum.osdev.org/

FILE SYSTEM vs DataBase System
https://forum.osdev.org/viewtopic.php?f=15&t=14348
Page 1 of 2

Author:  fachamix [ Mon Jul 02, 2007 9:26 am ]
Post subject:  FILE SYSTEM vs DataBase System

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 ?

Author:  Alboin [ Mon Jul 02, 2007 9:45 am ]
Post subject: 

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...

Author:  mathematician [ Mon Jul 02, 2007 9:49 am ]
Post subject: 

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.

Author:  frank [ Mon Jul 02, 2007 9:59 am ]
Post subject: 

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.

Author:  Colonel Kernel [ Mon Jul 02, 2007 10:02 am ]
Post subject: 

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).

Author:  Kevin McGuire [ Mon Jul 02, 2007 3:15 pm ]
Post subject: 

I thought a file system was a database?

Author:  frank [ Mon Jul 02, 2007 3:55 pm ]
Post subject: 

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.

Author:  Colonel Kernel [ Mon Jul 02, 2007 7:25 pm ]
Post subject: 

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.

Author:  Kevin McGuire [ Mon Jul 02, 2007 7:38 pm ]
Post subject: 

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.

Author:  Colonel Kernel [ Mon Jul 02, 2007 9:53 pm ]
Post subject: 

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?

Quote:
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:
Quote:
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?

Quote:

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?

Author:  Kevin McGuire [ Tue Jul 03, 2007 3:52 am ]
Post subject: 

I dunno. :P

Author:  jnc100 [ Tue Jul 03, 2007 9:01 am ]
Post subject: 

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.

Author:  fachamix [ Tue Jul 03, 2007 10:24 am ]
Post subject: 

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]

Author:  frank [ Tue Jul 03, 2007 10:32 am ]
Post subject: 

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.

Author:  Alboin [ Tue Jul 03, 2007 10:46 am ]
Post subject: 

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~

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/