Fundamental of Database Systems 1401312-3 By Dr Abdullah Alzahrani د. عبدالله الزهراني aahzahrani@uqu.edu.sa Part 1
Assessment توزيع الدرجات 20% Mid-Term written exam 10% Mid-Term practical exam 20% Project 50% Final Exam 20% اختبار نصفي نظري 10% اختبار نصفي عملي 20% مشروع 50% اختبار نهائي Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Reference الكتاب المرجع Fundamentals of Database Systems, 5th ed., by Elmasri and Navathe, Pearson International Edition, 2007. http://dev.mysql.com/doc/ Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه What is Database (DB)? Motivations of using Databases Database Models What are Database Management Systems (DBMS)? What DBMS will we use? Some important terms Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه What is a Database (DB)? Properties: A database is a collection of related data. By data, we mean known facts that can be recorded and that have implicit meaning. Properties: A database represents some aspect of the real world A database is a logically coherent collection of data with some inherent meaning A database is designed, built, and populated with data for a specific purpose. Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه What is the main component of a Database (DB)? A table (Relation) – one or many is a data structure for representing related Entities. consists of columns (represent Attributes) and rows (represent Entities or tuples). A column represents a same property of a same data type for all entities. A row represents a set of properties of different data types for a specific entity row column Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Motivations of using Databases. Why ? Redundancy storing the same data multiple times Modification anomalies (updating – deleting - adding) Problems with searching Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Data Models Relational Model Object-Oriented Model Describes a structure of database. It is a set of relations definitions (relations schema) Relational table is a set of tuples Supported Relational Algebra Object-Oriented Model It is a logical model that is represented as a set of class definitions in OO language. Entity-Relationship Model High-level model which describes data as entities, attributes, and relationships Others ….. Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Data Models Relational Model Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Data Models Object-Oriented Model Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Data Models Entity-Relationship Model Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه What are Database Management Systems (DBMS)? A database management system (DBMS)is a collection of programs that enables users to create and maintain a database. It facilitates the processes of: Defining (specifying the data types, structures, and constraints of the data) Constructing (storing the data on a storage that is controlled by the DBMS) Manipulating (querying, updating, generating reports) and sharing databases among various users and applications. Other functions of DBMS is Protection and Maintenance. Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه DBMS examples MySQL PostgreSQL Microsoft Access SQL Server Oracle Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه DBMS consists of: Physical database Schema Collection of files that contain the data content. Schema A specification of the information content of Physical database Database engine software that supports access to and modification of the contents of the databases. Data Definition and Manipulation languages Programming languages that support schema definition and database access Ex: SQL (Structured Query Language) Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه People who work with databases and DBMS : Database designers Create databases according to the client requirements. Applications developers Design and build applications which interact with databases to accomplish specific tasks. End users Mainly users who interacts with databases via interfaces of applications designed by Applications developers Database administrators Responsible for controlling access to databases, maintaining data accuracy and integrity, monitoring an improving performance. Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه SQL (Structured Query Language) The standard language for interaction with relational DBMS Also, is the standard database language for DDL, DML, VDL, and SDL for relational DB DDL (Data Definition Language) A Language for specifying the conceptual schema of a DB Examples: Create, alter, and drop schema DML (Data Manipulation Language) A Language manipulating the contents of a DB Examples : DELETE, INSERT, SELECT, UPDATE VDL (View Definition Language) A Language that supports the definition of external views of a DB Examples :CREATE VIEW SDL (Storage Definition Language) A Language that supports the definition of internal schema of a DB Examples: Initrans, pctfree Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه What DBMS will we use? http://dev.mysql.com/doc/ Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Some important terms DB and DBMS Table (Relation), column, and row Redundancy and Modification anomalies Data Models: Relational Model, Logical, Object-Oriented, and Entity- Relationship (ER) SQL DDL, DML, VDL, and SDL Database designers, Applications developers, End User, Database administrators Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
End Introduction مقدمه Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016
Introduction مقدمه Dr Abdullah Alzahrani. aahzahrani@uqu.edu.sa Fundamental of Database Systems 1401312-3 9/20/2016