-3

We know that file system in not good for storing data , thus relations(tables) are used in DBMS. When we talk about files in database management system (DBMS), are these same/similar to that in C programming language? For reference for file handling in C programming language , there is a part of code below.

#include<stdio.h>  
void main( )  
{  
FILE *fp ;  
char ch ;  
fp = fopen("file_handle.c","r") ;  
while ( 1 )  
{  
ch = fgetc ( fp ) ;  
if ( ch == EOF )  
break ;  
printf("%c",ch) ;  
}  
fclose (fp ) ;  
}  
1
  • 1
    Not sure this is a well formed question for SE. If you want a definitive answer, you might want to dig into the code base of some of the open source ACID compliant databases. Postgres, for example.
    – bbaird
    Jul 22 '20 at 13:19
0

With a linux OS, you could use a FUSE (filesystem in userspace) Driver and mount the table to your filesystem.

The FUSE Driver provides the "impedance matching" between File System calls and Database calls.

With that in place, your C/C++/.NET/Java/Fortran/COBOL/language-of-the-month program will use normal file I/O calls to access the file stored as a BLOB in a Table.

Oracle RDBMS does this with DBFS (database fileysystem).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.