In this video, you will learn to describe the difference between a flat-file database and a relational database, describe how SQL, the Structured Query Language, is used to process and query relational databases. Structured data: There are many different types of structured databases, such as flat-file, relational, list goes on and on. Flat-file database take all information from all records and store everything in one table. So table would columns and rows. I always think of them as simply spreadsheet because it's a thing that everyone's familiar with for better or worse. So you'll see that this has an SID, first name or last name, telephone number. I'm going to assume this is a SID student ID, so student's first name, student's last name SteleNumber, so student's telephone number number. So CID, Cname data basic, web design, rational design probably. Class name, class ID, and then TID, so trainer ID, trainer mobile telephone number. But you'll notice that these different things are repeated, like the trainer is repeated again and again. Rick Dobson is repeated again and again. Data basics are repeated again and again. One of the negatives of flat-file databases is there will be an awful lot of repetition. If you were to break these up into different tables and instead of one table, then you would have less storage requirements for the same amount of information. So even though it's less data, I could still say, Mary is going to Charles' class for data basics, and all it really need is the 101 and the T01 to add it to Mary's student account to know that that's the class is going to and that's her trainer in the class. I would need to repeat data basics and Charles and Charles' telephone number every single time in the same database. This is exactly what this relational database does. So relational database simply separate the massive information into numerous tables. All columns in each table should be about one topic such as student information, class information or trainer information. Now that said, part of the art of designing a relational database is, there's a trade off of I could have hundreds or thousands of tables but all of a sudden becomes processor-intensive or just complicated to make sense of all information or all the data in the database to turn it into useful information. But that said, that is the what a relational database is. It's simply data, has the ability to be split into multiple data, multiple tables, and you will use multiple tables to reduce the amount of data used, data stored. It's unstructured data and relational databases. The tables for relational databases are linked over through the use of keys. Each table may have one primary key and any number of foreign keys. Foreign keys, say single primary key from one table that has been placed in other table. So for example, you see the SID here would be a primary key, and now I see a CID here that is a primary key and a TID here that is a primary key. So those could then turn into foreign keys by simply hierarchy here, and is now a foreign key there. Primary key here, and then primary key here is now foreign ID here or a foreign key here. Really, the value that comes when you need to start searching information that you don't know where it is, or you don't know information about something. For example, this query. What students are taking classes from trainer Charles Hill? Well, there's Charles, Charles TID. But to get all that information together, I need to do a query of all the different students, which students are in that class, as well as who's teaching the class. So now I can see this comes back with Mary and Paul or Mary Hinkle and Paul Litz with these phone numbers are taking Charles' class. So here's another example. So you see columns, just like in spreadsheet, top to bottom, different columns. So employee number, surname, forename, male or female, date of birth, salary, section name and then different rows. So each row is a new line of information associated with each other, and then here you see an actual example of structured query language or SQL. So SQL is a domain-specific language used in programming and design for managing data health and relational database management system. It can also be used for other types of databases, even used a NoSQL databases probably. However, its purpose is built for stream processing and relational database stream, system also known as relational database management system. It is particularly useful in handling structured data where there are relations between different entities variables of data, such as highlighted here. So select title, release year, length, replacement cost from film where the length is greater than 120 or replacement cost is greater than 2,950. Order by title, descending. See here, see title starts with a W and starts going up the alphabet. Again, it's descending. You see the release year, you see the length, and now you all see the cost is greater than 2,950. That's an example of business-logic that you would see implemented in SQL and how you actually say it leveraged in organization. So with that, all of those different data sources require a strategy to come up with adequate controls. By security controls, I mean all of the different ways to secure the data, different types of data sources.