DBMS (Data Base Management System) PDF
Document Details
Uploaded by CrispKangaroo
Tags
Summary
This presentation covers the fundamentals of Database Management Systems (DBMS), including key concepts, types of DBMS, and real-life examples. It explores basic operations like creating, reading, updating, and deleting data within a database. The document also explains the significance of organizing data systematically using DBMS for efficient retrieval and management.
Full Transcript
DBMS (Data Base Management System) Introduction to DBMS What is DBMS and Why Do We Need it? Unit Objectives Key Concepts Types of DBMS Examples in Real Life Fundamentals of creating database Lesson 1: Understanding Databases...
DBMS (Data Base Management System) Introduction to DBMS What is DBMS and Why Do We Need it? Unit Objectives Key Concepts Types of DBMS Examples in Real Life Fundamentals of creating database Lesson 1: Understanding Databases What is data? Data is raw facts, figures, Can you differentiate and symbols. between data and information? Short Answer Data : raw, unprocessed facts Information : Processed, meaningful facts ”data” Activity Find out the definition of Database and what does it do to us? Give Examples What is a Database A database is a structured collection of data It organizes and stores data electronically Different types of databases exist: relational, hierarchical, network, etc.. For this course, we'll focus on relational databases Types of Database Relational DBMS (RDB Hierarchical DBMS: Network DBMS MS): Critical Thinking Why do you think we need Database and DBMS? Why Do We Need a DBMS? Data Storage: It efficiently stores large amounts of data. Data Retrieval: Allows quick access to information. Data Security: Protects sensitive information with access controls. Data Integrity: Ensures data accuracy and consistency. Data Administration: Simplifies the management of databases. Activity Look up those Key Terms in DBMS and find out their roles : Database Data Models SQL Tables Primary Key Foreign Key Key Concepts SQL (Structured Q Database: A collection of Data Models: Framewo rks to structure data (e.g., rela uery Language): A l organized data. anguage used to communicate tional, hierarchical). with databases. Tables: Structures that stor Primary Key: Unique ide Foreign Key: A field in one table that links to the prim e data in rows and columns. ntifier for records in a table. ary key of another table. Lesson Understand the basics of relational database Objectives Define the database components Database Basic operations Tables and Relationships Basics of Relational Components Database s Baic Database operation Activity What are the DBMS components and what they do? Database Components: Explain that a table is a collection of related data entries. Tables: Illustrate with examples such as a "Customers" table in a retail database. Define fields as individual pieces of information within a record. Fields: Give examples like "Customer Name," "Address," and "Phone Number." Define records as complete sets of information within a table. Records: Emphasize that each row in a table represents a record. Explain the concept of keys as unique Keys (Primary and identifiers. Introduce primary keys (unique identifier within Foreign): a table) and foreign keys (linking records between tables). Create (Insert): Define the "Create" operation as adding new records to a database. Discuss examples like adding a new customer to a "Customers" table. Basic Read (Select): Define the "Read" operation as retrieving information from a database. Discuss examples like retrieving customer Database information from a "Customers" table. Update: Operations: Define the "Update" operation as modifying existing data in a database. Discuss examples like updating a customer's address in a "Customers" table. Delete: Define the "Delete" operation as removing data from a database. Discuss examples like deleting a customer record from a "Customers" table. Inserting and Operation Retrieving Data: s that can be done Basics of adding on a records database Simple SELECT queries for data retrieval Challenge Schema Query Short answer a schema defines the structure and organization of a database, while a query is a request for specific information from the database using a query language, typically SQL. Week 3 Objectives BRIEFLY REVIEW THE CONCEPT OF A DISCUSS THE IMPORTANCE OF DEFINE, DIFFERENTIATE, AND DATABASE. ORGANIZING DATA IN A SYSTEMATIC UNDERSTAND THE USES OF DATABASE WAY FOR EFFICIENT RETRIEVAL AND MANAGEMENT SYSTEMS (DBMS) AND MANAGEMENT. RELATIONAL DATABASE MANAGEMENT SYSTEMS (RDBMS). Activity “Database Keys” In Groups: find and map the difference between Foreign and primary keys, with example Helping Link Structured data and the benefit of organizing your data DBMS & RDMS Do you remember the types? 1. Relational Databases 2. Hierarchical Database 3. Network Databases DBMS RDBMS Differences Data is stored directly data is organized in columns. relationally, with a separate table for departments and a reference (DepartmentID) linking the two tables. Data is not referred to RDBMS sheet explicitly a key represents a relationship between employees and departments using foreign keys Examples in Real Lif e Imagine a school library system: Database: The whole library system. Tables: Different categories like Students, Books, Loans. Primary Key: Student ID for students, Book ID for books. Foreign Key: Loan records linking Student I Ds with Book IDs. This structure allows the librarian to quickl y find out which student borrowed which b ook and when it’s due back. The DBMS helps maintain, update, and que Practical Guide Fundamentals of creating database Step 1 Define the Purpose Step 2 Plan the Structure Step 3 Choose the Database Type Step 4 Create Tables Step 5 Establish Relationships Step 6 Input Data Step 7 Set Up Queries Step 8 Implement Security Step 9 Test and Optimize Step 10 Documentation and Maintenance Step 1: Define the Purpose Identify the Goal: Understand what the database is for. This could be for t racking sales, managing inventory, or storing customer information. Determine Requirements: What da ta needs to be stored? Who will use it ? Step 2: Plan the Structur e Entities and Attributes: Identify the main objects (entities) and th eir characteristics (attributes). For example, in a library database, b ooks and members would be entit ies, while title and author are attri butes. Relationships: Determine how e ntities relate to each other. For ins tance, a book can be borrowed by a member. Step 3: Choose the Databa se Type Relational Databases (RDBMS): The se use tables to represent data and the ir relationships. Examples include MyS QL, PostgreSQL, and SQL Server. NoSQL Databases: These are suitable for unstructured data and include docu ment-based databases like MongoDB. Step 4: Create Tables Design Tables: Create tables f or each entity. Each table shoul d have a primary key, a unique i dentifier for each record. Define Columns: Specify the c olumns for each table, their dat a types, and constraints (e.g., n ot null, unique). Step 5: Establish Relatio nships Foreign Keys: Use foreign keys t o link related tables. For example, in an orders table, a customer ID might link to the customers table. Referential Integrity: Ensure th at relationships between tables re main consistent Step 6: Input Data Insert Records: Add initial data t o the tables. This could be done m anually or through importing from other sources. Maintain Data Quality: Ensure d ata accuracy and consistency. Step 7: Set Up Queries SQL Queries: Write SQL qu eries to retrieve and manipul ate data. Common operation s include SELECT, INSERT, U PDATE, and DELETE. Views: Create views to simp lify complex queries or to pr esent data in a specific way. Step 8: Implement Secur ity User Permissions: Define who c an access and modify the data. Us e roles and permissions to control access. Backups: Regularly back up the d atabase to prevent data loss Step 9: Test and Optimi ze Test: Verify that the database w orks as intended by running vari ous queries and checking the res ults. Optimize: Improve performance by indexing frequently queried c olumns and optimizing queries. Step 10: Documentation and Ma intenance Document: Keep records of the database str ucture, queries, and any changes made. Regular Maintenance: Perform regular upd ates and maintenance tasks to ensure the da tabase runs