Chapter 1 Database Systems LEARNING OBJECTIVES • In this chapter, you will learn: • The difference between data and information • What a database is, the various types of databases, and why they are valuable assets for decision making • The importance of database design • How modern databases evolved from file systems 2 LEARNING OBJECTIVES • In this chapter, you will learn: • About flaws in file system data management • The main components of the database system • The main functions of a database management system (DBMS) 3 DATA VS. INFORMATION DATA INFORMATION • Produced by processing • Raw facts • Raw data - Not yet been processed to reveal the meaning • Building blocks of information • Data management • Generation, storage, and retrieval of data data • Reveals the meaning of data • Enables knowledge creation • Should be accurate, relevant, and timely to enable good decision making 4 DATABASE • Shared, integrated computer structure that stores a collection of: • End-user data - Raw facts of interest to end user • Metadata: Data about data, which the end-user data are integrated and managed • Describe data characteristics and relationships • Database management system (DBMS) • Collection of programs • Manages the database structure • Controls access to data stored in the database 5 DATA IN CONTEXT • Data context is the network of connections among data points. Those connections may be created as metadata or simply identified and correlated. Contextual metadata adds value, essentially making it possible to receive information from data. A single data point on its own is useless. • Context helps users understand data. 6 DATA IN CONTEXT 7 SUMMARIZED DATA BSIS Population by Academic Year 1800 1600 1400 1200 1000 800 600 400 200 0 1st Semester 2nd Semester BSIS Population by Academic Year 4000 3500 3000 2500 2000 1500 1000 500 0 3391 2748 1859 1037 0 200 1343 567 Graphical displays turn data into useful information that managers can use for decision making and interpretation 8 EXAMPLE OF METADATA Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context. 9 YOU CAN HAVE DATA “ WITHOUT INFORMATION, BUT YOU CANNOT HAVE INFORMATION WITHOUT DATA. Daniel Keys Moran ” TOP RELATIONAL DBMS DBMS RANKING as of Feb. 2023 • https://www.statista.co m/statistics/809750/world wide-popularity-rankingdatabase-managementsystems/ ROLE OF THE DBMS • Intermediary between the user and the database • Enables data to be shared • Presents the end user with an integrated view of the data • Receives and translates application requests into operations required to fulfill the requests • Hides database’s internal complexity from the application programs and users 13 The DBMS Manages the Interaction between the End User and the Database 14 ADVANTAGES OF THE DBMS • Better data integration and less data inconsistency • Data inconsistency: Different versions of the same data appear in different places • Increased end-user productivity • Improved: ✓ Data sharing ✓ Data security ✓ Data access ✓ Decision making ✓ Data quality: Promoting accuracy, validity, and timeliness of data 15 TYPES OF DATABASES (NUMBER OF USERS) • Single-user database: Supports one user at a time • Desktop database: Runs on PC • Multiuser database: Supports multiple users at the same time • Workgroup databases: Supports a small number of users or a specific department • Enterprise database: Supports many users across many departments 16 TYPES OF DATABASES (LOCATION) • Centralized database: Data is located at a single site • Distributed database: Data is distributed across different sites • Cloud database: Created and maintained using cloud data services that provide defined performance measures for the database 17 TYPES OF DATABASES (EXPECTED TYPE) • General-purpose databases: Contains a wide variety of data used in multiple disciplines • Discipline-specific databases: Contains focused on specific subject areas data 18 TYPES OF DATABASES(EXTENT OF USE) • Operational database: Designed to support a company’s day-to-day operations • Analytical database: Stores historical data and business metrics used exclusively for tactical or strategic decision making • Data warehouse: Stores data in a format optimized for decision support 19 TYPES OF DATABASES • Online analytical processing (OLAP) • Enable retrieving, processing, and modeling data from the data warehouse • Business intelligence: Captures and processes business data to generate information that support decision making 20 BASIC DATABASE TERMINOLOGY • Data - raw facts, such as a telephone number, a birth date, a customer name, and a year-to-date sales value. Data have tittle meaning unless they have been organized in some logical manner. • Command - is a string that you send to the server in hopes of having the server do something useful. Some people use the word statement to mean command. The two words are very similar in meaning and, in practice, are interchangeable. • Query - is a type of command that retrieves data from the server. 21 BASIC DATABASE TERMINOLOGY • Table (relation, file, class) - is a collection of rows. A table usually has a name, although some tables are temporary and exist only to carry out a command. All the rows in a table have the same shape (in other words, every row in a table contains the same set of columns). In other database systems, you may see the terms relation, file, or even class 22 BASIC DATABASE TERMINOLOGY • Column (field, attribute) - is the smallest unit of storage in a relational database. A column represents one piece of information about an object. Every column has a name and a data type. Columns are grouped into rows, and rows are grouped into tables. • Row (record, tuple) - is a collection of column values. Every row in a table has the same shape (in other words, every row is composed of the same set of columns). If you are trying to model a real-world application, a row represents a real-world object. For example, if you are running an auto dealership, you might have a vehicles table. Each row in the vehicles table represents a car (or truck, or motorcycle, and so on). The kinds of information that you store are the same for all vehicles (that is, every car has a color, a vehicle ID, an engine, and so on). 23 LEARNING ACTIVITIES LEARNING ACTIVITIES. 1. List four applications you have used that most likely employed a database system to store data. _____________________________ _____________________________ _____________________________ _____________________________ LEARNING ACTIVITIES LEARNING ACTIVITIES. 1. List four applications you have used that most likely employed a database system to store data. _____________________________ _____________________________ _____________________________ _____________________________ https://jamboard.google.com/d/1X1UjfD_xfvk3KJ5b2EzbogShTa_mSLWBO7Nzn2yokRs/edit? usp=sharing LEARNING ACTIVITIES LEARNING ACTIVITIES. 2. Describe at least 3 tables that might be used to store information in a social networking system such as Facebook. _____________________________ _____________________________ _____________________________ LEARNING ACTIVITIES LEARNING ACTIVITIES. 2. Describe at least 3 tables that might be used to store information in a social networking system such as Facebook. _____________________________ _____________________________ _____________________________ https://jamboard.google.com/d/1LTDvkE7zEojuqa_OYlUAXvSYBfJ3C73fGZQE_JFCKM/edit?usp=sharing A SIMPLE FILE SYSTEM 28 DATA INCONSISTENCY • exists when different versions of the same data appears in different places. 29 DATA REDUNDANCY • Data Redundancy is a condition created within a database or data storage technology in which the same piece of data is held in two separate places. • Islands of information: Scattered data locations • Increases the probability of having different versions of the same data 30 DATA REDUNDANCY IMPLICATIONS • Poor data security • Data inconsistency • Increased likelihood of data-entry errors when complex entries are made in different files • Data anomaly: Develops when not all of the required changes in the redundant data are made successfully 31 DATA ANOMALY • Anomalies are caused when there is too much redundancy in the database's information. Anomalies can often be caused when the tables that make up the database suffer from poor construction. So, what does "poor construction" mean? Poor table design will become evident if, when the designer creates the database, he doesn't identify the entities that depend on each other for existence, like the rooms of a hotel and the hotel, and then minimize the chance that one would ever exist independent of the other. • The normalization process was created largely in order to reduce the negative effects of creating tables that will introduce anomalies into the database. 32 TYPES OF DATA ANOMALY Update Anomalies Insertion Anomalies Deletion Anomalies 33 TYPES OF DATA ANOMALY • Insertion anomaly: The inability to store certain attributes’ values without the other attributes. If we are not able to insert a record into a relational table because of the absence of values for other attributes is called insertion anomaly. TYPES OF DATA ANOMALY • Deletion anomaly: Deletion of values of certain attributes from any records (rows) will lead to lose of other attributes’ values of the same records. That means, we lose the complete information about an entity if we delete few values. This is called as deletion anomaly. • Modification of certain values in a table may lead to change the values in more than one record if that particular value has duplicates. If we miss any one occurrence of that data, that leads to inconsistency of the table. This is called as modification anomaly. SANA ALL… THANKS! Any questions? You can find me at delfirome@yahoo.com 0929 804 2327 37