8/22/2023 DATABASE SECURITY Chapter 1 Revision Database Prof. Jaafer Al Saraireh Resources and Objectives • Reference: Reference: Chapter - Fundamentals of Database Systems, R. Elmasri and S. Navathe, Pearson, 7th edition, 2016 • Objectives: Objectives: • Know the terminology and concepts associated with the database field. • Describe Database users, including workers behind the Scene and Actors in the Scene • Describe DBMS Architecture Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 2 1 8/22/2023 Basic Definitions • What is a Database? • It is a collection of related data. An example is a student record database. • What is/are Data? • Data have known facts that can be recorded and have an implicit meaning. Examples are data for describing a student such as a name, course such as course id, and course enrolment. • What is a Database Management System (DBMS)? • A software package/ system to facilitate the creation and maintenance of a computerized database. Example Oracle 12c DBMS, and MySQL DBMS. • What is Database System? • The DBMS software together with the data itself. Sometimes, the applications are also included. An example is a student information system (SIS). Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 3 A Database System Environment Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 4 2 8/22/2023 Database Users • Users may be divided into • Those who actually use and control the database content, those who design, develop and maintain database applications (called “Actors Actors on the Scene”), Scene and • Those who design and develop the DBMS software and related tools and the computer systems operators (called “Workers Workers Behind the Scene”). Scene Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 5 Types of Actors on the Scene - Users • Actor Users may be divided into • 1. Database administrators (DBA): (DBA): responsible for managing the primary resource (database) and the secondary resource (DBMS) and related software dba tasks including: • Authorizing access to the database (e.g. Creating user accounts) • Coordinating and monitoring its use. • Acquiring software and hardware resources as needed. • Taking care of problems such as security breaches and poor system response time. • 2. Database designers: designers: responsible for identifying data to be stored in the database and choosing appropriate structures to represent and store this data and their design include user views. • 3. End users: users: are people who query the database, and update it to generate reports. The categories of end users are: Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 6 3 8/22/2023 DBMS Architectures • 1. Centralized DBMS: DBMS: • Combines everything into a single system including- DBMS software, hardware, application programs, and user interface processing software. • User can still connect through a remote terminal – however, all processing is done at a centralized site. Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 7 DBMS Architectures (continued) • 2. ClientClient-Server Architectures • a. Basic 2-tier ClientClient-Server Architectures • Specialized Servers (DBMS server) with Specialized functions provide database query and transaction services to the clients. Example servers. • Clients (PCs or workstations) can access the specialized servers (Workstations or PCs) as needed through a client software module. Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 8 4 8/22/2023 DBMS Architectures (continued) • 2. ClientClient-Server Architectures • b. Three Tier ClientClient-Server Architecture • Common for Web applications • Intermediate Layer called Application Server or Web Server: • Stores the web connectivity software and the business logic part of the application used to access the corresponding data from the database server, • ThreeThree-tier Architecture Can Enhance Security: Security: • Database server only accessible via a middle tier • Clients cannot directly access a database server • Clients contain user interfaces and Web browsers • The client is typically a PC or a mobile device connected to the Web Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 9 DBMS Architectures (continued) • 2. ClientClient-Server Architectures • b. Three Tier ClientClient-Server Architecture Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 10 5 8/22/2023 Basic SQL • SQL is nonnon-procedural, procedural meaning that the user specifies what data is to be retrieved rather than how to retrieve the data. • SQL is an abbreviation of Structured Query Language, and pronounced as “sequel” . • SQL allows users to access data in relational database management systems. SQL is about data and results; each SQL statement returns a result. • The language has Data Definition Language (DDL), (DDL) Data Manipulation Language (DML), (DML) Transaction control (TCL) (Commit, Rollback), and Security specification Data Control Language (DCL) (Grant and Revoke). Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 11 Database Objects Object Description Table Basic unit of storage; composed of rows and columns View Logically represents subsets of data from one or more tables Sequence Generates primary key values Index Improves the performance of some queries Synonym Gives alternative names to objects Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 12 6 8/22/2023 Overview of Database Design Process Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 13 Example COMPANY Database • We describe an example database application, to illustrate the basic ER COMPANY database keeps track of a company's • A particular employee who manages the department. We keep track of the start date when that employee began managing the department • We keep track of the number of hours per week that an employee works on each project. • We also keep track of the direct supervisor of each employee. • We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent's first name, sex, birth date, and relationship with the employee. The name of the dependent is unique for each employee. Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 14 7 8/22/2023 Example COMPANY Database (Continued) • Continued • A particular employee who manages the department. We keep track of the start date when that employee began managing the department • We keep track of the number of hours per week that an employee works on each project. • We also keep track of the direct supervisor of each employee. • We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent's first name, sex, birth date, and relationship to the employee. The name of dependent is unique for each employee Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 15 ER DIAGRAM – Relationship Types are: Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 16 8 8/22/2023 Mapping the COMPANY ER Prof. Jaafer Al Saraireh - Princess Sumaya University for Technology 17 9