Database Systems Lecture 1 PDF
Document Details
Uploaded by WondrousVerse7524
Mansoura University
Dr. Nahla Bishri
Tags
Summary
This document is a lecture on database systems, covering the basics of database types, definitions, properties, and functions of a DBMS. It also explores the various applications and components of database management, providing a comprehensive introduction for undergraduate-level computer science students.
Full Transcript
Database systems lecture 1 Dr. Nahla Bishri Layout Chapter 1: Databases and Database Users Characteristics of the Database Approach , Actors on the Scene, Advantages of Using the DBMS Approach …. Chapter 2: Database System Concepts and Architecture Data Models, Sche...
Database systems lecture 1 Dr. Nahla Bishri Layout Chapter 1: Databases and Database Users Characteristics of the Database Approach , Actors on the Scene, Advantages of Using the DBMS Approach …. Chapter 2: Database System Concepts and Architecture Data Models, Schemas, and Instances, Centralized and Client/Server Architectures for DBMSs….. Chapter 3: Data Modeling Using the Entity–Relationship (ER) Model Chapter 5: The Relational Data Model and Relational Database Constraints Chapter 6: Basic SQL Chapter 8: Relational Algebra References Fundamentals of Database Systems Agenda Introduction Database types Database definition DB properties DBMS DBMS functions Databases and database systems are an essential component of life in modern society: most of us encounter several activities every day that involve some interaction with a database. For examples: if we go to the bank to deposit or withdraw funds, if we make a hotel or airline reservation. if we access a computerized library catalog to search Introduction for a bibliographic item. if we purchase something online—such as a book, toy, or computer—chances are that our activities will involve someone or some computer program accessing a database. Even purchasing items at a supermarket often automatically updates the database that holds the inventory of grocery items Database types Traditional database applications: in which most of the information that is stored and accessed is either textual or numeric. NOSQL systems (Big data storage systems): have been created to manage data for social media applications. These types of systems are also used by companies such as Google, Amazon, and Yahoo, to manage the data required in their Web search engines, as well as to provide cloud storage. Multimedia databases: used to store images, audio clips, and video streams digitally. Geographic information systems (GISs): can store and analyze maps, weather data, and satellite images. Data warehouses and online analytical processing (OLAP) systems: are used in many companies to extract and analyze useful business information from very large databases to support decision making. Database definition A database is a collection of related data. By data, we mean known facts that can be recorded and that have implicit meaning. For example, consider the names, telephone numbers, and addresses of the people you know. Nowadays, this data is typically stored in mobile phones, which have their own simple database software. This data can also be recorded in an indexed address book or stored on a hard drive, using a personal computer and software such as Microsoft Access or Excel. This collection of related data with an implicit meaning is a database. DB properties A database represents some aspect of the real world, sometimes called the miniworld or the universe of discourse (UoD). Changes to the miniworld are reflected in the database. A database is a logically coherent collection of data with some inherent meaning. A random assortment of data cannot correctly be referred to as a database. A database is designed, built, and populated with data for a specific purpose. It has an intended group of users and some preconceived applications in which these users are interested. DBMS A database management system (DBMS) is a computerized system that enables users to create and maintain a database. The DBMS is a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing databases among various users and applications. DBMS Cont. 1. Defining a database: involves specifying the data types, structures, and constraints of the data to be stored in the database. The database definition or descriptive information is also stored by the DBMS in the form of a database catalog or dictionary; it is called meta-data. 2. Constructing the database: is the process of storing the data on some storage medium that is controlled by the DBMS. 3. Manipulating a database: includes functions such as querying the database to retrieve specific data, updating the database to reflect changes in the miniworld, and generating reports from the data. 4. Sharing a database: allows multiple users and programs to access the database simultaneously. 5. Protecting database: includes system protection against hardware or software malfunction (or crashes) and security protection against unauthorized or malicious access. DBMS Cont. An application program accesses the database by sending queries or requests for data to the DBMS. A query typically causes some data to be retrieved. A transaction may cause some data to be read and some data to be written into the database. Example a UNIVERSITY database for maintaining information concerning students, courses, and grades in a university environment. The database is organized as five files, each of which stores data records of the same type. The STUDENT file stores data on each student, the COURSE file stores data on each course. the SECTION file stores data on each section of a course. the GRADE_REPORT file stores the grades that students receive in the various sections they have completed. PREREQUISITE file stores the prerequisites of each course Example Cont. DB catalog example Example Cont. STUDENT record includes data to represent the student’s Name, Student_number, Class (such as freshman or ‘1’, sophomore or ‘2’, and so forth), and Major (such as mathematics or ‘MATH’ and computer science or ‘CS’); each COURSE record includes data to represent the Course_name, Course_number, Credit_hours, and Department (the department that offers the course), and so on. We must also specify a data type for each data element within a record. For example, we can specify that Name of STUDENT is a string of alphabetic characters, Student_number of STUDENT is an integer, and Grade of GRADE_REPORT is a single character from the set {‘A’, ‘B’, ‘C’, ‘D’, ‘F’, ‘I’}. Example Cont. Database manipulation involves querying and updating. Examples of queries are as follows: Retrieve the transcript—a list of all courses and grades—of ‘Smith’ List the names of students who took the section of the ‘Database’ course offered in fall 2008 and their grades in that section List the prerequisites of the ‘Database’ course Example Cont. Examples of updates include the following: Change the class of ‘Smith’ to sophomore Create a new section for the ‘Database’ course for this semester Enter a grade of ‘A’ for ‘Smith’ in the ‘Database’ section of last semester Thanks