Introduction to Database Systems - Lesson 1

Hierarchical Data Organization

  • Bit: The binary digit is the smallest unit of data, represented either as a 11 or a 00.

  • Byte: A storage unit for a single character, typically consisting of 88 bits.

  • Field: A collection of characters that constitutes a single data item.

  • Record: A coherent set of related fields treated as a single unit.

  • Table: A collection or set of related records.

  • Database: The software infrastructure utilized to store and manage a related set of tables.

Fundamental Concepts of Database Management Systems

  • Definition: A database, also known as a Database Management System (DBMS), is specialized software designed for the storage and management of large volumes of data.

  • Primary Purpose: The central function of a database is to maintain and track large amounts of data through five key operational pillars:

    • Organization: Structuring data systematically.

    • Storage: Retaining data securely within the system.

    • Retrieval: Accessing data when needed.

    • Search: Locating specific data points within the set.

    • Security Enforcement: Protecting data from unauthorized access or manipulation.

  • Stored Content: A database stores information regarding real-world entities, their specific attributes, and the relationships existing between those entities.

Structural Components: Entities, Relationships, and Attributes

  • Entity: Defined as a real or abstract object in the real world. Broadly, an entity functions like a noun (a person, place, or thing).

    • Examples: A person, an automobile, a book, or a student enrollment.

  • Relationship: This represents an association or connection between distinct entities.

    • Examples: A professor "teaches" students; a customer "places" orders; or one or more authors "writes" books.

  • Attribute: A specific property or characteristic of an entity that is of interest to a specific application.

    • Examples for a person: Height, weight, name, address, salary, and age.

Conceptual Modeling: Henry’s Bookstores Case Study

  • Business Scenario: Henry owns multiple bookstore branches and requires a system to organize data concerning books, authors, and publishers.

  • Identified Entities:

    • Author

    • Branch

    • Book

    • Publisher

  • Internal Relationships:

    • A bookstore branch sells many books.

    • Books are written by authors.

    • Books are published by publishers.

  • Entity-Relationship Diagram (ERD): This is a visual representation of how entities, relationships, and attributes interact. Specific attributes identified in this case include:

    • Branch: BranchName, Street, City, State, Zip.

    • Book: ISBN, Title.

    • Publisher: Pname, City, Country.

    • Author: FirstName, LastName.

Transition from Flat File Systems to Centralized DBMS

  • Traditional Flat File Approach: In this legacy model, separate programs handle separate file systems. For example, personnel programs read personnel files while payroll programs read payroll files.

  • The Problem of Data Redundancy: In a flat file setup, the same data (such as a person's name and address) might be stored across 33 different files.

    • Wasted Space: Storing identical information multiple times consumes unnecessary storage.

    • Inconsistent Data: Keeping multiple records updated simultaneously is difficult, leading to data that may no longer match across files.

  • The DBMS Solution: A centralized storage system where each data item is stored exactly once, ensuring that all relationships are represented accurately.

Systematic Advantages and Disadvantages of DBMS

  • Advantages of a DBMS Approach:

    • Information Extraction: The ability to derive more knowledge and productivity from the same amount of data.

    • Data Sharing: Authorized users within the same organization can easily share access to the same data set.

    • Centralized Management: A Database Administrator (DBA) is responsible for making critical decisions regarding the database.

    • Reduced Redundancy: The system maintains only one copy of each data item.

    • Data Integrity: Refers to the "correctness" of the data. For instance, the system can enforce a rule that a Social Security Number must contain exactly 99 digits.

    • Enhanced Security: Access is restricted to authorized users. For example, sensitive payroll data is only viewable by specific designated users.

  • Disadvantages of a DBMS Approach:

    • System Size: DBMS applications are large programs that require extensive storage space and main memory, which may necessitate additional hardware investments.

    • Operational Complexity: The Database Administrator and other support personnel require specialized training to manage the system.

    • Financial Cost: Large-scale applications are expensive and involve various recurring costs.

    • Failure Impact: Because the system is centralized, a failure has a high impact. Recovery is often more difficult due to the inherent complexity of the software.

Historical and Modern Context of the Relational Model

  • Origin: The relational model was developed in 19701970 by E. F. Codd.

  • Prevalence: It remains the most widely used type of DBMS in modern computing.

  • Major Relational Systems:

    • Oracle

    • SQL Server

    • MySQL

    • DB2

    • Postgres

  • Microsoft Access: Classified as a "personal database" specifically intended for use by one person at a time.