Lecture on DBMS fundamentals: why files give way to databases as data grows, and the core DBMS components (data definition, data dictionary, DML, DCL, file and transaction managers).
Key Takeaways
- Databases replaced separate files because they provide integrity, interrelated structure, and efficient access as data scales.
- A DBMS separates logical data handling (through its language) from physical storage details.
- Security and integrity depend on fine-grained access control, transaction management, and concurrency control.
What the video covers
- The lecture is the second part of Chapter 5 on database and data center security, focusing on Database Management Systems (section 5.2).
- Early small-scale data was stored in separate, unrelated files, making it hard to retrieve complete records and risking data integrity when updates were not synchronized.
- As companies and data volumes grew, a more robust storage system called a database became necessary.
- A database is a structured collection of interrelated data with a defined schema (tables, column names, data types), intended for one or more applications.
- A DBMS is a set of programs used to construct (define), operate/maintain (keep data updated and available), and query the database through a dedicated language.
- The DBMS abstracts physical storage details so users work with a clear language rather than managing how data is laid out on disk.
- Key DBMS components include the data definition component, the data dictionary (metadata such as row/column counts), the data manipulation component (read, write, edit, delete), and the data control component (create/modify/delete structures and manage access rights).
- Access control via grants and revokes restricts users to specific tables, columns, or operations, with permissions applied at record and field level rather than only at file level.
- The File Manager loads data from disk into RAM, while the Transaction Manager groups multiple operations (such as a funds transfer with logging) into an atomic unit that either fully completes or fully fails.
- Concurrency control prevents conflicts when multiple users access the database simultaneously, avoiding lost updates.
Chapters
- 00:00Introduction and Section Overview
- 01:32Limitations of File-Based Data Storage
- 03:20Defining Databases and Their Structure
- 04:34What is a DBMS and Its Three Core Tasks
- 06:19Ad-hoc Queries and Query Languages
- 07:33DBMS Components: Data Definition and Data Dictionary
- 10:00Data Manipulation and Data Control Language
- 13:00File Manager, Transaction Manager, and Concurrency
Full Transcript — Download SRT & Markdown
Speaker A
In the name of God, the Most Gracious, the Most Merciful. Welcome to the second lecture of the fifth chapter, which is about database and data center security .
Speaker A
God willing, we will discuss the second section 5.2. Okay? Which is Database Management Systems. In this section, we will talk about how data has evolved, from what it is, what it is, and we will talk about and we will talk about
Speaker A
the difference between the two. Alright . Previously, when our company size was small and our data volume was small, data was stored in the form of but in all cases, it was stored in a form separated from each other; there
Speaker A
was no relationship between them. Meaning, for example, I have employee data in one file, financial data for employees in a file, and the names of employees 'children in another file.
Speaker A
For me to get the complete data for an employee, I have to go through those three or four files to be able to retrieve the employee's full information .
Speaker A
If this data is not updated periodically , what might happen? In the data, and consequently, our integrity, what happens to it? It becomes compromised. So what is our solution?
Speaker A
It said that when our companies grew and our data grew, we needed a storage system for our databases or our data that is better and stronger.
Speaker A
This system, we named it what? Databases . Okay? Meaning its size is large. It became in need of a more complex system, which is what? The database.
Speaker A
The basic idea we had was that files would work for us when our needs were small and our data volume was small.
Speaker A
When the data volume grew, along with the size of companies, the need for data , and the numerous operations occurring in companies, we needed what?
Speaker A
A database. What is a database? Or So it is essentially, meaning it is a collection of data with a clear and known structure; all data of this type must follow this structure, okay?
Speaker A
It is stored to be used by one application or more, okay? Okay, so here we have an example of a database; here we have this which is a table.
Speaker A
Okay, so we have a table, we have what is its type, First Name, its type, its type its type its type or sometimes it can be or, okay ?
Speaker A
Which is the record, which is when it was registered with us, its type The data format is clear and known.
Speaker A
Every time I want from it how many values, every time I want from it one, two, three, four, five, I want six, it must bring me their data.
Speaker A
Every one of them must have a specific type, meaning it must be forbidden to be a number, it must be forbidden to be text okay?
Speaker A
This is who? This data, this data is interconnected with each other, okay? Also, interconnected with each other in another table, which is what? The, okay ? Which is Okay?
Speaker A
Alright, let's continue. What are Database Management Systems? It is a set of programs that control and manage our, who? The database.
Speaker A
It consists of three, or we use it for three basic tasks, which are and the last thing Okay, what does construction mean?
Speaker A
I will use, okay, or use to build my database, define the tables, table types , data types inside the tables, the columns inside the tables, okay?
Speaker A
This could also be part of the process of what? Among whose tasks? The second task required of me is that of operation or maintenance. What is maintenance?
Speaker A
What I am required to do is all updates that happened to the database must be present and available to all users authorized to access them at all times, available to them, okay.
Speaker A
Which is immediate querying. What does immediate querying mean? A manager came to me and said, for example, "I want a report on who?""The customers who came to us today," or "I want a report on all transactions that took place last month
Speaker A
," or "I want a report on customers who haven't placed an order in over two months," okay?
Speaker A
These are reports requested ad-hoc and quickly because we have a specific issue or we need to make a specific decision, like doing a certain marketing campaign or we want to review the reason for a drop in sales, and so on, okay?
Speaker A
Now, this report is not pre-programmed for me in the database, so I need to write a query to fetch it.
Speaker A
Writing a query to fetch it, what do we call this? Right. The process of building the database, maintaining the database, or writing [ queries], requires a language. The language I use for these three things, what do we call it?
Speaker A
What do we call it? Right. Now, am I concerned with how data is stored on the hard disk?
Speaker A
Am I concerned with how an integer is stored on the hard disk? How a string is stored on the hard disk?
Speaker A
How my [table] looks when it is generated on the hard disk? What is the separator between the first column and the second column when storing a record on the hard disk? I don't care, okay? Is the table stored in
Speaker A
one file or a group of files on the hard disk? I also don't care.
Speaker A
What I care about is having a clear language to write with, to query the data; these details are not necessary for me, I only need what?
Speaker A
The language. So, what do we call this language? This is one of whose [components]?
Speaker A
So what do we have? Dealing with the database in a way that is...Direct okay?
Speaker A
We will talk about these six or eight [ components] in detail. The first one is the data.
Speaker A
What is the data? By its name, it means definition. I will define the structure of the database. I will define the template. Meaning, if I have a form I want to fill out, how do I build this form? The form's shape, the
Speaker A
form's design, is what? It is the data. I have designed my form. Its basic tasks What is the shape of the database?
Speaker A
That's not its job, okay. We have other people who do this work. How? It is the procedural properties of our database okay.
Speaker A
After I created the database, how do I represent it in the data? That I will use in many places? Okay, the second component, since we said it will be stored in, it is natural for the second component to be what?
Speaker A
The tables that describe the rules or the database we have, what do we call this?
Speaker A
It contains what? Okay, what is its task? Its task is that I use it as a description for whom?
Speaker A
For the database that I have, okay? They use this description to store the data.
Speaker A
Which is You use it to be able to process the data we have. So, we have a description of the database. Where will it be stored ? In ().
Speaker A
Right. Well, what besides () the? What might it contain? It contains the number of columns or rows in my database. Right.
Speaker A
A number, for example, right. The number , which is, who are these rows, what do we call them?
Speaker A
It contains additional descriptive data for the database besides (). Well. I have my data. I have defined its structure. I stored its description in ( ).
Speaker A
I want to start dealing with the data. I have the () ready now. I have the forms ready. I want to fill the data into these forms. I will go to whom? To the third one, which is ()(
Speaker A
) or. So, it is tools for whom? For application developers. Right. What is its task? Its task is to solve for them, which is who?
Speaker A
How? They are powerful tools for handling data inside the database. Well, how do I deal with the data?
Speaker A
Either by reading or by writing. Right. There will be the process of reading, writing, and editing. How will I write?
Speaker A
I will write using either the () function. Or edit using the () function. Or delete using the keyword for whom?() the. We call it ().
Speaker A
So, I will add to this data table. Or I want to modify a table.
Speaker A
And I will put a () on it for all the data. It says to me: if customer ID equals 101, meaning when our customer ID is 101, okay.
Speaker A
Its task is to support the end users. Whether they are () or who is () ) right.
Speaker A
Or even if they were who?() Right, which are the databases, okay. It supports the process of creating the database, modifying the database, querying the database, and controlling access to the database, and therefore it contains four, which are who?
Speaker A
Like To create a table, create a database, to modify a table, or modify to delete a table, delete a column, delete a database, delete a specific.
Speaker A
I use it to edit or change the data present inside the database using the or the or who?
Speaker A
The, I have the data stored in the database, how do I retrieve it as reports?
Speaker A
The process of retrieving data from the database will be through whom? The using the statement of who?
Speaker A
Okay. I have data stored in the database, but not all users who can access the database do I want them to access all the data inside the database.
Speaker A
Granting access rights to a specific table to specific users, to a specific for other users, or I want to revoke permissions from some users, so we go to whom?
Speaker A
To the fourth of the, which is who? Or the Which is the Data Control Language, of course, the will control for us who?
Speaker A
The permissions. To control permissions , it is known: either I grant a permission or I do what?
Speaker A
Delete or revoke a permission from you. If you want to grant a permission, I will use which word?
Speaker A
The name of the permission on the table for a specific user, or should I revoke the permission using whom?
Speaker A
Right? The SQL, what is it exactly? What does it mean, a declarative language? What does declarative mean?
Speaker A
A language that doesn't talk about details. I don't want details; I just want the data.
Speaker A
Which data do you want? It doesn't specify how the database should return the data.
Speaker A
That's not our job. We have something called... They will create and determine the best way to retrieve data from the database; they will decide the plan to follow.
Speaker A
You have nothing to do with that; you only specify what data you want. Okay, the next component we have is the File Manager, and both deal directly with the...
Speaker A
Okay, the File Manager, it's called " file," so it deals with files. What are files?
Speaker A
The database, in the end, is stored as files on the hard disk. I want to read my data from these files or store my data in them.
Speaker A
The part responsible for reading data from the files stored on the hard disk and loading it into RAM to be modified or used later is the File Manager.
Speaker A
So, my data is on the RAM and has been modified, whether by deletion, addition or...
Speaker A
I want to update the version on the hard disk. Who will write to the file on the hard disk?
Speaker A
Also the File Manager. Okay, the File Manager did that. Now, let's talk about data modification operations.
Speaker A
I have operations that must be performed as a single unit. What does "as a single unit" mean?
Speaker A
It means, simply put, if I want to transfer an amount from one account to another, meaning I want to transfer an amount from account A to account B, what will happen?
Speaker A
First, I withdraw the amount from account A and add it to whom? To account B. Nice. And what else can I do? Create a record for us in whom? In the log, okay, for the log of A and whom
Speaker A
? And the log of B, to tell you what operations occurred so we can see the history of transactions.
Speaker A
Now I have four operations. First, the process of modifying account A and deducting the amount from it. The second process is modifying account B and adding or increasing the amount in it.
Speaker A
Then, the third thing is that I want to add to the log table of A what operation happened, which is the deletion, and add to the log table of B what operation?
Speaker A
The addition. He says these four operations must be done together. If any of them fails, we will have a problem.
Speaker A
Suppose I withdrew, for example, 1,000 dollars from account A, and before I add it to account B, a problem occurred. Now what will happen? Account A has already decreased. So, there is an extra 1,000 dollars in the system. Who owns it? Who
Speaker A
does this belong to? We are not sure, okay, so what is our solution? It says the solution is the Transaction Manager . The Transaction Manager simply says these four operations are one single unit, one unit; all four must complete
Speaker A
together, or if any of the four operations fails, I want to revert the data to its original state. So how does this happen?
Speaker A
It says simply, this happens as follows : I have this data loaded where? Into RAM, okay. It says if the four operations complete correctly, I will tell it "Commit," and we tell it to save this data where? On the hard disk. It
Speaker A
says if any of the four operations fail , I want a fresh copy from before the modification, so what do I do?
Speaker A
It says, "Discard the four that were there, and re-read this data again from the hard disk and load it into RAM," which is what?
Speaker A
The version before the modification, so that the data is always what? The data is correct. This task is the job of who ? The job of the...
Speaker A
Okay. We might have... As for the... Okay, what is its task? Its task is to write what? The database definition...
Speaker A
Which in turn will store it where? In the... Okay. These have two tasks: to create or modify my database, okay, modify what?
Speaker A
My database using, or query my data using what? Okay, these two will receive who?
Speaker A
If he wants to read from a table or write to a table, he needs what?
Speaker A
He needs the table description, which he will find where? In the...okay. I find that the table description is correct, the columns are correct, the table names are correct, and everything is fine, he will go send it to whom?
Speaker A
What will he do? He will say, "Does this user or this application have permission to perform this operation on this table or not?" So how does he check the permission? He will go to whom?
Speaker A
If he finds that he has permission, he says, "Okay, complete your operations and save them on the..." If he doesn't have permission, he says, "You are denied." So if I have more than one person wanting to work on the database,
Speaker A
how do I determine priority to whom? I will go to whom? Just as we will come to in the description of...
Speaker A
Let's talk about whom? About what means ... And tables means a table, and since it's a table, it means I have data stored about whom? About authorization. Okay, authorization for whom? For a user...
Speaker A
And on whom? On the resource. Who will the resource be for us? It is either a database table, a record inside a database table, or a column inside a database......table okay?
Speaker A
So the permission will be what? It will be either insert, update, delete, okay, or select. So for whom? For a user. So we have any authorization table; any record in it will contain the user, the operation, and the table or asset we
Speaker A
will work on. So how does this happen for us? Let's assume user A sent that he wants to execute a certain statement on our database.
Speaker A
He will send the statement to go to whom ? It will go to the Database Management System. What will the Database Management System do?
Speaker A
It will go and ask the authorization table, saying, does this user have this permission or not?
Speaker A
So the database management system will go to check this permission after it retrieves the data; if it finds they have permission, it says fine, okay, execute, but if they don't have the permission, it will say what?
Speaker A
Reject, you do not have permission to access what? This table. So the main idea behind the authorization table is that you having permission to access the database does not automatically mean that you have permission to execute any statement you want on what? On the
Speaker A
database; every execution statement needs permission. Now, for the concurrent access table, we have the database in one place; does the database have one user or multiple users ?
Speaker A
Naturally and logically, the database has multiple users. Or it could be who? Programs. Okay, for the users or programs, is there a possibility that they all access the database at the same time? It says yes, there is a possibility that they all
Speaker A
reach what simultaneously? Our database . Okay. Concurrent access to the database prevents collisions or conflicts when we have what?
Speaker A
Simultaneous access to the same command on the database, or to a command on the same record in the database.
Speaker A
Consequently, it prevents a collision between them so that we don't lose the effect of one of the two colliding operations. Well, it says assume we have several users trying to access the database at the same time.
Speaker A
How do systems, or how does the database management system deal with this situation at the same time?
Speaker A
Let's see how this happens. Okay. It says assume User A sent a request wanting to modify what? Modify the balance, right? Which is what? The budget or the account balance for the number what? 500, right.
Speaker A
At the same time, User B sent a request for what? To modify the same account.
Speaker A
Now, if we let User A and User B work together at the same time, one of them will cancel what?
Speaker A
Which is what? The other's modification . Why? Because User A had the original version of the record, and User B had the original version of what?
Speaker A
Of the record here, A, and here, B. User A wanted to modify what? Wanted to modify this field.
Speaker A
While User B wanted to modify what? This field. If one wrote and then the other wrote immediately after, that means the first modification is gone.
Speaker A
Okay, and if the opposite happened, this modification, what happens to it? It's gone. Well, we want a solution; we want both modifications to happen.
Speaker A
I want the field in its final form to have the first modification of the user and the second modification of who?
Speaker A
Of User B. I want both modifications to be present on it. What is the solution?
Speaker A
It says we have a table where we store what? Exactly, we store it in the table. So, as soon as I look at the table, I will find that they are actually trying to modify the same thing, what do I tell
Speaker A
them? I tell them to wait until it finishes, wait until it finishes. It says, then what do I tell them? I tell him to take, who?
Speaker A
After the user modified it and went to edit it, who do we actually have? Both updates are present. What about the two updates? They are present, okay?
Speaker A
Alright. Simply put, it gives me permission for the entire file. If it gives me read permission, I can read everything inside the file.
Speaker A
Regardless of whether I am supposed to read it or not? Meaning, if it gave me access to an employee data file, I am effectively able to read the employee's name, their full data, financial data, administrative data, and their job
Speaker A
details completely. If it gave me write permission to a file , it is the same thing; I can edit everything inside the file without any accountability or oversight.
Speaker A
So, what is our solution here? It tells me I need something to happen at the level of, or at the level of, so we got who?
Speaker A
Naturally, what is the difference between the two? The one, which is the... He has control over who? At the level completely, it gives me read and write permission on the entirely; its lowest permission level is the file level, it
Speaker A
doesn't go lower than that in level, okay? Whereas in the database management system, it gives me access rights not to the entire file, but to a specific record or a specific field, okay?
Speaker A
Consequently, our access control is what ? Okay, why? Because we now have access to a row and a record, not a whole file, and the database with the database level .
Speaker A
Okay, we will have granularity, which means control precision will be at the level of the database as a record or a field, and consequently, our database access control will be more detailed, it will be...
Speaker A
Not a file, so it became at the record level and at the field level, not at the file level.
Speaker A
Alright, the operations also, my control became not just read and write; it became read, which is SELECT, write, which is add, which is INSERT, or edit, which is UPDATE, or DELETE, which is deletion.
Speaker A
It has been divided into four separate permissions. Meaning, I could have a user with the permission to read from the table to SELECT, but not the permission to perform an UPDATE or DELETE.
Speaker A
I could have a user with the permission to add to the table, but they do not have permission to edit or permission to delete from the table.
Speaker A
With this, we have finished section 5.2 . Hopefully, in section 5.3, we will talk about...
Speaker A
Thank you very much.
Topics:DBMSdatabasedata dictionaryDDLDMLDCLtransaction managerconcurrency controlaccess controldata integrity











