Relational Database Systems Bartosz Zagorowicz
Flat Databases Originally databases were flat. All information was stored in a long text file, called a tab delimited file. Each entry in the TDF is separated by a special character, such as a vertical bar ( | ).
Problem Difficult to search for specific information. Difficult to create reports that include only certain fields. Have to search through the entire file to find information
Relational Database Invented in 1970 by IBM researcher, E.F. Codd. They use tables to store information. Standard fields and records are represented as columns (fields) and rows (records) in a table.
Advantages Allow you to easily find specific information. Ability to sort based on any field.
Advantages Ability to generate reports that contain only certain fields from each record. You can quickly compare ages and salaries because of this arrangement.
Practical Application How do you manage customer orders? How many orders did John Smith make last week, month, year? What is the most popular product? What points during they year are sales the highest? Excel spread sheet?
“Relational” Typical databases have anywhere from 10 to 10,000 tables. It builds new tables out of required information from existing tables. It uses the relationship of similar data to increase the speed and versatility of the database.
“Relational” The database uses mathematical relations. It builds new tables out of required information from existing tables. Each table contains columns that other tables can use to gather information from that table.
Size, Speed and Scalability By storing this information in another table, the database can create a single small table with the locations that can then be used for a variety of purposes by other tables in the database. Large websites such as Amazon.com contain hundreds of thousands of tables, used together to quickly find exact information
Relational Model Components Structures – Well defined objects (tables, views, indexes). Structures and their data can only be manipulated by operations. Operation – Clearly defined actions that allow users to manipulate data. Operations must adhere to integrity rules Integrity Rules – Laws that govern which operations are allowed on the data structures of a database.
SQL Relational databases are created using a special computer language, structured query language (SQL.) SQL is the industry standard language supported by almost every relational database management system on the market
MySQL RDBMS – Relational Database Management System Popular choice of database for use in web applications used by websites such as Flickr, Youtube, Wikipedia, Google and Facebook.
Relational Database Management Systems A database management system based on the relational model. DBMS in which data is stored in tables and the relationships among the data are also stored in tables.
Query Example SELECT * FROM Book Where price > ORDER BY title; SELECT name, e_mail FROM addr_book WHERE company = microsoft
Amazon.com SELECT * FROM electronics Where price < 400 ORDER BY price;
Relational Database Management Systems The data can be accessed or reassembled in many different ways without having to change the table form. Oracle, SQL Server, MySQL, Sybase, DB2, TeraData are examples of database systems.
MySQL Tables, Structures Associations Dependencies
Benefits of Relational Databases Dynamic Views (join, simplify data), hides complexity SQL is easy and human readable language Provides search options Excellent security (access permissions)
Thank You!