Click here to Skip to main content
15,867,308 members
Home / Discussions / Database
   

Database

 
GeneralRe: how a data base file works Pin
Calin Negru21-Aug-22 2:53
Calin Negru21-Aug-22 2:53 
GeneralRe: how a data base file works Pin
Eddy Vluggen21-Aug-22 4:03
professionalEddy Vluggen21-Aug-22 4:03 
GeneralRe: how a data base file works Pin
Calin Negru21-Aug-22 5:47
Calin Negru21-Aug-22 5:47 
GeneralRe: how a data base file works Pin
Eddy Vluggen21-Aug-22 5:57
professionalEddy Vluggen21-Aug-22 5:57 
GeneralRe: how a data base file works Pin
Calin Negru21-Aug-22 9:20
Calin Negru21-Aug-22 9:20 
GeneralRe: how a data base file works Pin
Eddy Vluggen22-Aug-22 8:04
professionalEddy Vluggen22-Aug-22 8:04 
GeneralRe: how a data base file works Pin
Eddy Vluggen22-Aug-22 8:22
professionalEddy Vluggen22-Aug-22 8:22 
GeneralRe: how a data base file works Pin
RussellT13-Dec-22 12:29
professionalRussellT13-Dec-22 12:29 
Calin Negru wrote:
If you ask me it`s not a DB job to abstract the idea of files.


Abstraction is literally what it is all about whether we are talking about databases, file systems, or even, say, cooking. A cake recipe, for example, is an abstraction of the process of converting a particular set of ingredients into a particular cake. The recipe is not the cake itself, the ingredients from which the cake is made, or the physical process of making the cake. It is metadata for an abstraction of all three. Databases and file systems are abstractions of magnetic charges on a disk platter filtered through many layers of other abstractions rising to their 'visible' representations. Databases and file systems are different tools for different purposes, so it is not surprising that their representations of those magnetic charges differ.

A database is not a file system. While it might store its contents in files, it needn't. Until version 19, for example, Oracle allowed for 'raw' storage so that no file system was even involved. While a database can store its data in files that can be 'seen' in the file system, that is only a handy method of organization so that they can be managed, as files, by file system tools such as Windows Explorer or Linux commands such as ls, cp, and del. Internally, those database files are not file systems, and they cannot be abstracted into a file system-like representation. Because most databases are relational and not hierarchical, there is not even a plausible way in which to represent them as if they were file systems.

Software that represents logical database structure hierarchically such as SQL Server Management Studio (for Microsoft) and SQL Developer (for Oracle) are not representing the physical structures within the data files hierarchically but rather the logical organization of tables according to the 'recipe' provided by the data dictionary. Internally, database file contents are not files and folders tucked away inside the files that appear in the file system. SSMS and SQL Developer are only representing the logical organization of data tables, indexes, tablespaces and what not in a hierarchical way. But though this may give the impression of a file system inside the database files, there is no such thing within them.

Going back to the original question:

Quote:
Does the difference reside in the fact that in a data base file the data is saved in a fashion that reminds the method in which the OS is saving a HDD directory/folder tree (and that is by using tags)?


No. It is nothing like that. Databases are not file systems 'inside' their files. (My expertise is with Oracle.) Oracle databases have logical structures (segments, extents, and blocks) within data files where the 'location' of a particular row of data is an ephemeral 'address' in terms of those structures, called a ROWID, that looks something like this: 'AAAABUAABAAAAQRAAA'. The data block is the fundamental unit of storage in an Oracle database. Blocks are organized into extents which are combined into segments. A segment is one table or index, and there can be many segments in a data file. A table or index is merely a logical abstraction of the physical segments containing their data, and to be understood, those segments, extents, and blocks must be perceived in context of the data dictionary where the abstractions give meaning to the physical structures.

No doubt SQL Server has something similar. Each database will have its own internals.

Cheers,
Russ
Oracle DBA: 23 years
UNIX SSA: 32 years

QuestionOLE DB provider Pin
suren ramakrishnan18-Aug-22 21:16
suren ramakrishnan18-Aug-22 21:16 
AnswerRe: OLE DB provider Pin
Richard MacCutchan18-Aug-22 21:31
mveRichard MacCutchan18-Aug-22 21:31 
AnswerRe: OLE DB provider Pin
RedDk19-Aug-22 13:14
RedDk19-Aug-22 13:14 
QuestionReplacing back-end MS-ACCESS with SQL SERVER Pin
Nick Katditsik7-Aug-22 4:00
Nick Katditsik7-Aug-22 4:00 
AnswerRe: Repacing back-end MS-ACCESS with SQL SERVER Pin
Mycroft Holmes7-Aug-22 12:44
professionalMycroft Holmes7-Aug-22 12:44 
GeneralRe: Repacing back-end MS-ACCESS with SQL SERVER Pin
Nick Katditsik8-Aug-22 5:42
Nick Katditsik8-Aug-22 5:42 
AnswerRe: Repacing back-end MS-ACCESS with SQL SERVER Pin
Richard Deeming7-Aug-22 21:50
mveRichard Deeming7-Aug-22 21:50 
GeneralRe: Replacing back-end MS-ACCESS with SQL SERVER Pin
Nick Katditsik17-Aug-22 5:07
Nick Katditsik17-Aug-22 5:07 
GeneralRe: Replacing back-end MS-ACCESS with SQL SERVER Pin
Craig Robbins17-Aug-22 6:53
Craig Robbins17-Aug-22 6:53 
AnswerRe: Replacing back-end MS-ACCESS with SQL SERVER Pin
CHill6017-Aug-22 7:00
mveCHill6017-Aug-22 7:00 
GeneralRe: Replacing back-end MS-ACCESS with SQL SERVER Pin
Nick Katditsik17-Aug-22 19:46
Nick Katditsik17-Aug-22 19:46 
QuestionHow would you... (synchronization between 2 databases) Pin
Joan M6-Aug-22 7:18
professionalJoan M6-Aug-22 7:18 
AnswerRe: How would you... (synchronization between 2 databases) Pin
Gerry Schmitz6-Aug-22 8:06
mveGerry Schmitz6-Aug-22 8:06 
GeneralRe: How would you... (synchronization between 2 databases) Pin
Joan M6-Aug-22 12:08
professionalJoan M6-Aug-22 12:08 
AnswerRe: How would you... (synchronization between 2 databases) Pin
Mycroft Holmes6-Aug-22 12:48
professionalMycroft Holmes6-Aug-22 12:48 
Questionsql query problem Pin
pitwi27-Jul-22 23:06
pitwi27-Jul-22 23:06 
AnswerRe: sql query problem Pin
Richard Deeming27-Jul-22 23:54
mveRichard Deeming27-Jul-22 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.