Introduction to Databases

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is a primary goal of a Database Management System (DBMS)?

  • To limit the amount of information that can be stored.
  • To complicate data access and retrieval.
  • To make data storage less structured and controlled.
  • To store and retrieve information in a convenient and efficient way. (correct)

Database systems are designed to manage small bodies of information.

False (B)

Which of the following is a common application of database systems in the business world?

  • Creating digital art
  • Managing social media content
  • Tracking accounting information, such as payments and account balances. (correct)
  • Designing user interfaces for mobile applications.

In relational databases, data is organized as a set of ______ with rows and columns.

<p>tables</p> Signup and view all the answers

Match the following database types with their characteristics:

<p>Distributed Database = Data is stored across different physical locations. Relational Database = Data is organized in tables with predefined relationships. NoSQL Database = Relationships between data are not predefined. Data is stored as JSON documents.</p> Signup and view all the answers

What is a key limitation of file-based systems compared to database systems?

<p>File-based systems often lead to data redundancy and inconsistency. (D)</p> Signup and view all the answers

In a file-based system, concurrency is typically managed by the operating system, allowing multiple users to access the same file simultaneously without issues.

<p>False (B)</p> Signup and view all the answers

Which of the following is an advantage database systems offer over file processing systems?

<p>Improved data sharing capabilities. (A)</p> Signup and view all the answers

In a file-based system, when an application opens a file, that file is typically ______, preventing others from accessing it simultaneously.

<p>locked</p> Signup and view all the answers

Match the following drawbacks to their descriptions in file-based systems:

<p>Data Redundancy = The same information is duplicated in several places. Data Isolation = Data is scattered in various files and formats. Security Problems = Difficult to restrict user access to specific data.</p> Signup and view all the answers

What does abstraction achieve in the context of database systems?

<p>It hides unnecessary details to simplify user interaction. (D)</p> Signup and view all the answers

The physical level of data abstraction in a database system is the highest level of abstraction, focusing on the user's perspective.

<p>False (B)</p> Signup and view all the answers

Which level of data abstraction describes the entire database in terms of relatively simple structures, such as entity sets and relationships?

<p>Logical Level (D)</p> Signup and view all the answers

The design of a database is called a database ______, which outlines the structure and organization of the data.

<p>schema</p> Signup and view all the answers

Match the database schema types with their respective levels of abstraction:

<p>Physical Schema = Describes the database design at the physical level. Logical Schema = Describes the design of the database at the logical level. View Schema = Describes the end-user interaction with database systems.</p> Signup and view all the answers

What is a 'data model' in the context of databases?

<p>A collection of conceptual tools for describing data, relationships, semantics, and constraints. (D)</p> Signup and view all the answers

In the relational model, relationships among data are represented using linked lists and pointers to provide efficient navigation between related records.

<p>False (B)</p> Signup and view all the answers

Which data model uses a collection of basic objects, called entities, and relationships among these objects?

<p>Entity-Relationship Model (D)</p> Signup and view all the answers

In the Entity-Relationship Model, a real-world property of an entity is called an ______.

<p>attribute</p> Signup and view all the answers

Match the following Data Models with the appropriate description:

<p>Relational Model = Data and relationships are stored in tables with rows and columns Entity-Relationship Model = Uses entities and relationships to model real-world objects. Semi-structured Data Model = Allows for flexible data representation and does not require a predefined schema.</p> Signup and view all the answers

What is the primary purpose of Data Definition Language (DDL) in databases?

<p>To define the structure or schema of the database. (A)</p> Signup and view all the answers

Data Manipulation Language (DML) is used to define storage structures and access methods in a database.

<p>False (B)</p> Signup and view all the answers

Which of the following is a common statement used in Data Definition Language (DDL) to create a new table or entity in the database?

<p>CREATE (C)</p> Signup and view all the answers

______ constraints are rules that data values must satisfy before being saved into the database.

<p>consistency</p> Signup and view all the answers

Match the following DDL commands with the appropriate Description:

<p>CREATE = Construct a relation or table. ALTER = Modify the structure of the relation. DROP = Delete a relation from the database.</p> Signup and view all the answers

What was the main contribution of Edgar F. Codd to database technology?

<p>He introduced the relational database model. (A)</p> Signup and view all the answers

The term 'NoSQL' means 'No Structured Query Language,' indicating that these databases use SQL for data storage and retrieval.

<p>False (B)</p> Signup and view all the answers

Which technological advancement significantly changed data processing by providing faster access and larger storage capacity compared to magnetic tapes and punch cards?

<p>Hard disks (D)</p> Signup and view all the answers

Charles Bachman designed the first computerized database known as the ______.

<p>Integrated Data Store</p> Signup and view all the answers

Match the following database milestones with their associated eras:

<p>Punch Cards and Magnetic Tapes = 1950s and early 1960s Hard Disks and Navigational Databases = Early 1960s and 1970s Rise of Relational Databases = 1980s</p> Signup and view all the answers

Which of the following is NOT considered a drawback of file-based systems?

<p>Centralized data management (A)</p> Signup and view all the answers

Data independence refers to the ability to modify the data schema at one level of the database without affecting the data schema at the next level.

<p>True (A)</p> Signup and view all the answers

What is the primary function of the View Level in data abstraction?

<p>To exhibit only the data in which the user is interested. (C)</p> Signup and view all the answers

The _____ of a database refers to the data stored in the database at a particular moment.

<p>instance</p> Signup and view all the answers

Match the Data Definition Commands with what each command does:

<p>ALTER = Modifies the structure of a relation RENAME = Renames a relation in a database TRUNCATE = Deletes all entries from a relation</p> Signup and view all the answers

Which database language is considered a subset of data-manipulation languages and is used to retrieve information from a database?

<p>Query language (D)</p> Signup and view all the answers

Procedural DMLs are high-level languages that allow users to specify what data is needed without specifying how to get the data.

<p>False (B)</p> Signup and view all the answers

Which of the following is a characteristic of NoSQL databases?

<p>They allow faster processing of varied datasets (D)</p> Signup and view all the answers

The Entity-Relationship model uses a collection of basic objects called ____ and describes the relationships between them.

<p>entities</p> Signup and view all the answers

Match the following concepts from the Entity-Relationship Model with their Description:

<p>Entities = A real-world object Attributes = Property of an entity Relationship = Describes how an attribute is related to another attribute</p> Signup and view all the answers

Flashcards

What is a database?

An electronic system that allows data to be easily accessed, manipulated, and updated.

What is a DBMS?

A collection of interrelated data and a set of programs to access that data.

Database Importance

Organize, process, and manage information in a structured and controlled manner.

Distributed Database

Data is stored across different physical locations.

Signup and view all the flashcards

Relational Database

Data is organized in tables with predefined relationships.

Signup and view all the flashcards

NoSQL Database

Relationships between data are not predefined; data is stored as JSON documents.

Signup and view all the flashcards

Drawbacks of File-Based Systems

Problems like data redundancy, data isolation, and security issues.

Signup and view all the flashcards

Physical Level (Internal Schema)

The lowest level of data abstraction, describing how data is physically stored.

Signup and view all the flashcards

Logical Level / Conceptual Level

A level of data abstraction above the physical level. Data stored in the form of entity sets and the relationships among them

Signup and view all the flashcards

View Level (External Schema)

The highest level of data abstraction, specific to the user's view.

Signup and view all the flashcards

Database Schema

The design of a database.

Signup and view all the flashcards

Physical Schema

Describes database design at the physical level.

Signup and view all the flashcards

Logical Schema

Describes database design at the logical level.

Signup and view all the flashcards

View Schema

Describes end-user interaction with database systems.

Signup and view all the flashcards

Database Instance

Data stored in a database at a particular moment

Signup and view all the flashcards

Data Model

A representation of real-world objects, events, and associations

Signup and view all the flashcards

Relational Model

Uses tables to represent data and relationships

Signup and view all the flashcards

Entity-Relationship Model

Model using entities and relationships

Signup and view all the flashcards

Object-Oriented Model

Data and relationships are in a single structure known as an object.

Signup and view all the flashcards

Semistructured Data Model

Extension of relational model allowing representation of data with a flexible structure

Signup and view all the flashcards

Database Language

Set of statements to define and manipulate a database

Signup and view all the flashcards

Data Definition Language (DDL)

Used to define the structure or schema of the database

Signup and view all the flashcards

Data Manipulation Language (DML)

Used to access and manipulate data in the database

Signup and view all the flashcards

Consistency Constraints

Requirements that data values must satisfy before being saved in the database

Signup and view all the flashcards

Domain Constraints

Constraint when an attribute is defined, its domain must be specified.

Signup and view all the flashcards

Referential Integrity

Values for a given set of attributes in one relation also appear for the same set of attributes in another relation

Signup and view all the flashcards

Assertion Constraint

A constraint or a condition that the database must always satisfy

Signup and view all the flashcards

Authorization

Some users can perform based on the type of access they have been assigned to

Signup and view all the flashcards

Query Language

A subset of data-manipulation languages which are used to retrieve information from a database.

Signup and view all the flashcards

Standard Punched Card

First used for vital statistics tabulation by New York City Board of Health and several states

Signup and view all the flashcards

Charles Bachman

Designed the first computerized database in the early 1960s called integrated data store IDS

Signup and view all the flashcards

Edgar Codd

Published a landmark paper that served as the introduction of the relational database

Signup and view all the flashcards

System R

developed by IBM Research that developed techniques for the construction of an efficient relational database system

Signup and view all the flashcards

SQL

became the standard language used for databases in the 1980s.

Signup and view all the flashcards

NOSQL

referred to databases that use query language other than SQL to store

Signup and view all the flashcards

Study Notes

Databases: An Overview

  • This unit introduces databases
  • It explains why databases are superior to other data storage methods for users and companies.
  • Subsequent sessions cover data organization, database access languages, and a brief history.

Session 1: Introduction to Databases

  • A database is an electronic system for easy data access, manipulation, and updates.
  • A database management system (DBMS) is a collection of interrelated data and access programs.
  • Database systems' primary goal is convenient and efficient information storage and retrieval.
  • Facebook, with 2.936 billion users, stores user data in a database.

Applications of Database Systems

  • Databases are crucial for enterprise IT, enabling structured and controlled information management.

  • Uses include organizing, processing, and structured information management.

  • Enterprise Information:

    • Accounting uses databases for payments, receipts, account balances, and asset information.
    • Human Resources uses databases for employee information, salaries, payroll taxes, and benefits.
    • Online retailers use databases for sales data, order tracking, recommendations, and product evaluations.
  • Banking and Finance:

    • Banking uses databases for customer information, accounts, loans, and transactions.
    • Finance uses databases for holdings, sales, purchases of financial instruments, and real-time market data.
  • Universities: Maintain student information, course registrations, and grades in databases.

  • Airlines: Utilize databases for reservations and schedule information, pioneering geographically distributed database use.

  • Telecommunications: Employ databases for call records, monthly bills, prepaid card balances, and network information.

Types and Examples of Databases

  • Popular database types include Distributed, Relational, and NoSQL databases.

  • Distributed Databases:

    • Data and processing are spread across multiple physical locations and database nodes.
    • Systems communicate over a network.
    • Examples include Apache Cassandra, HBase, FoundationDB, Couchbase, and Ignite.
  • Relational Databases:

    • Data is organized with predefined relationships in tables with rows and columns.
    • Commonly known as SQL databases.
    • Examples include PostgreSQL, MySQL, Microsoft SQL Server, and Oracle Database.
  • NoSQL Databases:

    • Relationships are not predefined, unlike relational databases.
    • Data is stored as JSON documents instead of columns and rows.

Session 2: Drawbacks of File-Based Systems/Advantages of Database Management Systems

  • File-based systems, used in the 1960s, involve storing information in operating system files.
  • Programs are developed to allow users to manipulate these files.
  • Drawbacks of File-Based Systems:
    • Data redundancy and inconsistency occurs when the same information is duplicated across different files and applications, potentially leading to conflicting data.
    • The same customer information can appear multiple times in separate files like Customer Orders and Customer Invoices.
    • Data isolation: Data is scattered in various files and formats, making it difficult to retrieve appropriate information with new applications.
    • Security problems: Enforcing security constraints is challenging because applications are added to file-processing systems in an ad hoc manner.
    • Concurrency issues: File-based systems struggle with multiple users accessing the same record simultaneously, often locking files and preventing concurrent access.
    • Integrity problems: Maintaining data consistency and enforcing rules is difficult because constraints are embedded in application programs, requiring changes across multiple programs when new rules are added.
  • Advantages of Database Systems:
    • Sharing of Data: Controlled access through authorization protocols and remote, simultaneous access for users.
    • Increased productivity: Tools for querying and transforming data enable quick, informed decisions.
    • Increased concurrency: Allows multiple users to read and update records concurrently without data inconsistency.

Session 3: View of Data and Instances and Schemas

  • Abstraction means hiding unnecessary details to simplify user interaction.
  • Data abstraction hides irrelevant details of data storage and maintenance from users.
  • Levels of Data Abstraction simplify user interactions by hiding complexity.
  • These levels include:
    • Physical Level/Internal Schema: The lowest level describes how data is stored in hardware and accessed, typically operated by DBAs.
    • Logical Level/Conceptual Level: A level above physical, storing data in entity sets with defined relationships and constraints; used by developers and DBAs.
    • View Level/User Level/External Level: The highest level, showing only part of the database relevant to the user.
  • Data independence: Changing the data schema at one level should not affect the schema at the next level.
  • Database Schema
  • A database schema is the design of a database.
  • Divided into three types based on abstraction levels.
    • Physical schema: Data storage in hard disk blocks, easily changed without affecting logical or view schemas with physical data independence.
    • Logical schema: Database design at the logical level, which impacts application programming.
    • View schema: End-user interaction with database systems, with possible subschemas for different views.
  • Database Instance
  • An instance refers to the data stored in a database at a specific time, which changes as data is added or deleted.
  • Schema defines variable declarations, while the instance is the value of these variables at a given moment.

Session 4: Data Models

  • A data model represents real-world objects, events, and associations.

  • It includes conceptual tools for describing data, relationships, semantics, and consistency constraints.

  • Data models describe database design at physical, logical, and view levels.

  • Types of Data Models:

    • Relational Model:
      • This is the most widely used model which Stores information in rows and columns.
      • Tables are called relations.
      • Each table has multiple columns with unique names.
      • Each row is a tuple with instance information.
      • Attributes or fields define the table.
    • Entity-Relationship (ER) Model:
      • It is used for database design.
      • Uses entities (real-world objects) and their relationships.
      • Entities have attributes (characteristics).
      • Relationships describe how attributes relate.
    • Object-Oriented Model:
      • Inspired by object-oriented programming languages.
      • Data and relationships are in a single structure.
    • Semistructured Data Model (XML):
      • Extension of the relational model with flexible structure.
      • Items may have missing or extra attributes.
      • No differentiation between data and schema.
      • XML and JSON are used.
  • Past Models

    • Network and Hierarchical models.

Session 5: Database Languages

  • Database languages define, store, and access data in a database.

  • These languages include Data Definition Languages (DDL) and Data Manipulation Languages (DML).

  • Data Definition Languages (DDL):

    • DDL defines the database structure or schema at physical, logical, and view levels.
    • Includes Storage Definition Languages (SDL) for defining storage structures and access methods.
    • DDL and SDL statements permanently alter the database structure and are typically used by database administrators.
    • Common DDL statements include:
      • Create: Constructs a relation (table or entity).
      • Alter: Modifies the structure of a relation.
      • Rename: Renames a relation.
      • Drop: Deletes a relation or database.
      • Truncate: Deletes all entries from a relation while keeping the structure.
  • Key Concept: Database management systems use consistency constraints.

  • Requirements for data values before saving in the database.

    • Domain Constraints: - Setting a domain for an attribute.
    • Referential Integrity: - Requiring that values in one relation appear in another.
    • Assertion Constraint: - Conditions that the database must always satisfy.
    • Authorization: - Allowing users to perform certain operations based on assigned access types.
  • Data Manipulation Languages (DML):

    • A specific set of statements or commands for accessing and manipulating data.
    • These commands include adding, updating, deleting, and retrieving data.
    • Data Query Languages are DML commands focused on retrieving (querying) data.
  • Types of Data Manipulation Languages:

    • Procedural DMLs is Low-level languages where users define what data is needed and how to get it. Low-level languages retrieve and process records one at a time.
    • Non-Procedural high-level languages is where users declare what data is needed without specifying how to get it. Also known as set-at-a-time DMLs, and can retrieve multiple records with a single command.

Session 6: History of Databases

  • The concept of databases existed long before the invention of computers.
  • The history of databases include:
    • 1950s-early 1960s: Punch Cards and Magnetic Tapes
      • Automation of tasks such as payroll; data was stored on tapes, which could be read and processed sequentially.
      • Single role could hold large amounts of data (10,000 punch cards).
      • Could be read only sequentially.
      • Standard punch card was first used for vital statistics tabulation in the 1890 US census.
    • Early 1960s and 1970s: Hard Disks, Navigational and Relational Models
      • History of Databases began in the early 1960s.
      • Charles Bachman designed the Integrated Data Store (IDS). IDS was developed to solve 2 problems: enable sharing of data files between applications and also allow ordinary programmers to develop random access applications using high-level languages.
      • Was used to solve two problems: enabling data sharing between applications and allowing random access applications with high-level languages.
      • The Information Management System (IMS) was shortly created IBM. Both databases were forerunners of the navigational database. -Edgar F. Codd proposed the relational model in 1970, disconnecting logical organization from physical storage.
      • 1974 - 1977; Ingres (UBC) & System R (IBM). The latter contributed to SQL
      • Chen then proposed the Entity-Relationship Model (1976)
    • 1980s - Growth of Relational Databases. -Relational DB model rose, & the commercialisation of relational systems saw this type of database rise in use and popularity.
      • SQL became standard language
    • 1990s - The Internet
      • Object-oriented DB grew in the 90's
      • The WWW saw huge growth
    • 2000s to current day
      • XML & XQuery emerged
      • Open-source began its growth. (PostGresSQL/MySQL),
      • 1998 saw NoSQL emerge, allowing for faster processing of large, varied datasets.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Overview of Database Management Systems
8 questions
Database Management Systems (DBMS)
17 questions
Database Concepts: Data, DBMS, and Systems
41 questions
Use Quizgecko on...
Browser
Browser