Electronic Data Storage and 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

Which of the following scenarios exemplifies data redundancy in a file system?

  • Storing student names in both the STUDENT and ATTENDANCE files. (correct)
  • Limiting access to the ATTENDANCE file to only the teacher.
  • Using different software to access data in different files.
  • Storing data in a specific format that requires all accessing programs to be updated if the format changes.

If a school database stores student details and guardian details, what design update could minimize data redundancy, assuming multiple siblings can have the same guardian?

  • Storing guardian details (name, phone, address) separately in a GUARDIAN file and linking it to the STUDENT file. (correct)
  • Removing the guardian details altogether and relying on student contact information.
  • Including guardian details directly in the STUDENT file to avoid needing multiple files.
  • Creating a separate attendance file for each student.

In the context of database management systems (DBMS), what does 'querying the database' refer to?

  • Creating a new database.
  • Retrieving data from a database through the use of specific commands. (correct)
  • Defining constraints for the data stored in the database.
  • Modifying the structure of the database itself.

Which of the following is the most accurate definition of a database schema?

<p>The design or structure of a database, including table names, fields/columns, and data types. (A)</p> Signup and view all the answers

What is the purpose of a data constraint in a database?

<p>To enforce accuracy and reliability of data by restricting the type of data that can be inserted into a column. (D)</p> Signup and view all the answers

Considering a 'STUDENT' table with columns 'RollNumber', 'Name', and 'DateOfBirth', which constraint would prevent duplicate roll numbers from being entered?

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

In database terminology, what is 'meta-data'?

<p>Data about the database schema and constraints. (B)</p> Signup and view all the answers

What does the term 'database instance' refer to?

<p>The state or snapshot of the database after loading data at any given time. (D)</p> Signup and view all the answers

Which operation is performed when a student's guardian changes their phone number in a school database?

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

What is the role of the 'database engine' in a DBMS?

<p>To handle various queries for data retrieval and manipulation. (C)</p> Signup and view all the answers

What does a 'data model' describe in the context of DBMS?

<p>The structure of the database, including data definition, representation, relationships, and constraints. (B)</p> Signup and view all the answers

In a relational database, what is the equivalent of a 'table'?

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

Which term refers to a column in a relational database table?

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

What is a 'tuple' in the context of relational databases?

<p>A row in a table. (A)</p> Signup and view all the answers

What does the 'degree' of a relation refer to?

<p>The number of columns in the relation. (C)</p> Signup and view all the answers

What term defines the number of tuples in a relation?

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

Which of the following is an important property of a relation in the relational data model?

<p>Each attribute must have a unique name. (A)</p> Signup and view all the answers

In a relational database, what is a 'candidate key'?

<p>An attribute or set of attributes that uniquely identifies the tuples in the relation. (D)</p> Signup and view all the answers

From the candidate keys, what is the 'primary key'?

<p>The attribute chosen by the database designer to uniquely identify the tuples in a relation. (A)</p> Signup and view all the answers

What is a 'composite primary key'?

<p>A primary key consisting of more than one attribute. (C)</p> Signup and view all the answers

In a school database, the STUDENT table has 'RollNumber' as the primary key. The ATTENDANCE table also includes 'RollNumber' to record attendance. What is the role of 'RollNumber' in the ATTENDANCE table?

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

What does a foreign key represent in a relational database?

<p>A relationship between two tables. (D)</p> Signup and view all the answers

In a database with tables STUDENT and GUARDIAN, where each student is linked to their guardian's unique ID, which key in the STUDENT table facilitates the relation to the GUARDIAN table?

<p>A foreign key referencing the GUARDIAN table. (C)</p> Signup and view all the answers

Considering tables for Students and their attendance records, which accurately defines a composite primary key for the Attendance table?

<p>A combination of RollNumber and AttendanceDate to ensure each student's attendance is recorded once per day. (B)</p> Signup and view all the answers

What is a key difference in how data relationships are managed in a Database Management System (DBMS) compared to a simple file system?

<p>DBMS allows for data to be related logically, reducing redundancy and inconsistency. (B)</p> Signup and view all the answers

Flashcards

What is a File?

A container to store data in a computer.

What is Data Redundancy?

Same data are duplicated in different locations (files).

What is Data Inconsistency?

Occurs when the same data maintained in different places do not match.

What is Data Isolation?

Means data mapping is not supported in file system. School will have to write separate programs to access these two files.

Signup and view all the flashcards

What is Data Dependence?

Updating the structure of a data file requires modification in all the application programs accessing that file.

Signup and view all the flashcards

What is Controlled Data Sharing?

Not every user should be able to access all the data.

Signup and view all the flashcards

What is a DBMS?

A software that can be used to create and manage databases.

Signup and view all the flashcards

What information does banking store in a database?

Customer information, account details, loan details, transaction details, etc.

Signup and view all the flashcards

What information does Crop Loan store in a database?

Kisan credit card data, farmer's personal data, land area and cultivation data, loan history, repayment data, etc.

Signup and view all the flashcards

What information does Inventory Management store in a database?

Product details, customer information, order details, delivery data, etc.

Signup and view all the flashcards

What information does Organisation Resource Management store in a database?

Employee records, salary details, department information, branch locations, etc.

Signup and view all the flashcards

What information does Online Shopping store in a database?

Items description, user login details, users preferences details, etc.

Signup and view all the flashcards

What is Database Schema?

It is the design of a database.

Signup and view all the flashcards

What is a Data Constraint?

Restrictions or limitations on the type of data that can be inserted in one or more columns of a table.

Signup and view all the flashcards

What is Meta-data?

The database schema along with various constraints on the data is stored by DBMS in a database catalog or dictionary, called meta-data.

Signup and view all the flashcards

What is a Database Instance?

The state or snapshot of the database at any given time.

Signup and view all the flashcards

What is a Query?

A request to a database for obtaining information in a desired way.

Signup and view all the flashcards

What is Data Manipulation?

Modification of database consists of three operations viz. Insertion, Deletion or Update.

Signup and view all the flashcards

Database Engine

Underlying component or set of programs used by a DBMS to create database and handle various queries for data retrieval and manipulation.

Signup and view all the flashcards

What is a database model?

A data model describes the structure of the database, including how data are defined and represented, relationships among data, and the constraints.

Signup and view all the flashcards

What are relations?

Tables.

Signup and view all the flashcards

What is an Attribute?

Characteristic or parameters for which data are to be stored in a relation.

Signup and view all the flashcards

What is a Tuple?

Each row of data in a relation (table).

Signup and view all the flashcards

What is a Domain?

A set of values from which an attribute can take a value in each row.

Signup and view all the flashcards

What is the Degree of a relation?

The number of attributes in a relation.

Signup and view all the flashcards

Study Notes

  • The chapter explores methods to store and manage data electronically
  • Examines database concepts

Introduction to Electronic Data Storage

  • Schools maintain student data, attendance, and guardian details
  • Class teachers record daily attendance as present ('P') or absent ('A')
  • Manual record-keeping for a class of 50 students with 26 working days requires 50x26 entries per month
  • Manual data entry becomes tedious as data volume increases

Limitations of Manual Record Keeping

  • Student details must be re-entered in the new attendance register when promoted
  • Inconsistency arises when writing student details each month due to incorrectly written names or skipped records
  • Data loss occurs if the attendance register is lost or damaged
  • Erroneous calculations happen when consolidating attendance records manually
  • Office staff maintains student details: Roll Number, Name, Date of Birth, Guardian Name, Contact Number, Address
  • This information is needed for correspondence regarding student attendance and results
  • Finding information or modifying entries in a large volume of papers is difficult
  • Computerized systems overcome these issues by storing separate data files
  • Computerized systems allow easy copying of student details, finding data about students/guardians, adding details for new students, modifying stored data, and removing data when students leave

File Systems

  • A file is a container for storing data on a computer's storage device
  • Files can store texts, computer program code, comma-separated values (CSV), pictures, audios/videos, and web pages
  • Files on a computer can be directly accessed and searched for data
  • Displaying data like monthly attendance reports on a school website requires computer programs

Storing Student and Attendance Data in Separate Files

  • Student and attendance data are stored in two separate files
  • The STUDENT file has six columns:
  • RollNumber: Student roll number
  • SName: Student name
  • SDateofBirth: Student date of birth
  • GName: Guardian name
  • GPhone: Guardian phone number
  • GAddress: Guardian address
  • The ATTENDANCE file has four columns:
  • AttendanceDate: Date of attendance marking
  • RollNumber: Student roll number
  • SName: Student name
  • AttendanceStatus: Marked as Present (P) or Absent (A)

Limitations of File Systems

  • File systems become difficult to manage as the number of files and data volume increase

Difficulty in Access

  • Files lack mechanisms to retrieve data directly
  • Data is accessed through application programs
  • Retrieving specific data formats can be difficult
  • It requires writing programs to access data

Data Redundancy

  • Same data are duplicated in different files
  • Student names appear in both student and attendance files
  • Redundancy can lead to excessive storage use

Data Inconsistency

  • Occurs when the same data in different places doesn't match
  • Changes, like name spelling corrections or student departures, need updates in multiple files
  • If changes aren't applied consistently, data becomes inconsistent

Data Isolation

  • Files at Table 8.1 (STUDENT) and Table 8.2 (ATTENDANCE) are related to students
  • There is no direct link or mapping between these files
  • Separate programs are needed to access each file

Data Dependence

  • Data are stored with a specified structure in a file. If file structure or format changes, existing application programs must be changed
  • Updates to a file's structure needs modifications in all programs that has access to that file

Controlled Data Sharing

  • Different users have different access needs (teachers, office staff, parents)
  • Not all users should access all data
  • Limited access (read-only) is difficult to enforce in file systems

Overcoming Limitations with Database Management Systems(DBMS)

  • Logical relationship for data in databases overcomes file system limitations
  • Related data can be organized and managed efficiently in a database
  • DBMS is software for creating and managing databases and it stores, manages, updates/modifies, and retrieves data
  • Open-source and commercial DBMS examples: MySQL, Oracle, PostgreSQL, SQL Server, Microsoft Access, MongoDB

DBMS Functionality Summary

  • Hides storage and maintenance details, providing an abstract data view
  • Interfaces between databases and end-users/applications
  • Allows data retrieval through querying
  • Enables modification of database structure

Real-Life Applications of Databases

  • Banking: Customer information, account details, and loan transactions
  • Crop Loan: Farmer data, land details, loan histories, and repayment data
  • Inventory Management: Product details, order information, and delivery data
  • Organization Resource Management: Employee records, salary details, and branch locations
  • Online Shopping: Item descriptions, user login details, and user preferences

Transitioning from File System to DBMS

  • Revisit the school example: two files, office and teacher maintained
  • Tables in a database are linked through columns or fields
  • STUDENT and ATTENDANCE files share common rollNumber and sName
  • To convert these files into a database there are changes to incorporate

SName Elimination in DBMS

  • SName is already present in student information, hence, is unneeded in ATTENDANCE
  • Student details can be accessed through the common RollNumber

Data Redundancy Reduction

  • Eliminating redundancy of guardian details where siblings are in the same class by splitting files (STUDENT file and GUARDIAN)

Unique Identification of Guardians

  • One or more guardians with the same name need unique GUID (Guardian ID)

Relating Data Files in DBMS

  • Related data files in student, guardian, and attendance include these attributes:
  • student; rollNumber, sname, sDateofBirth, GUID
  • guardian; GUID, gName, gPhone, gAddress
  • attendance; attendanceDate, rollNumber, attendanceStatus
  • This shows the record structure of three files in STUDENTATTENDANCE database but excludes any relationship among tables

High Costs of DBMS

  • High costs may be incurred shifting from file systems to DBMS

Key Points:

  • Purchasing sophisticated hardware and software
  • Training users for querying.
  • Recurrent cost to take regular backup and perform recovery operations

Key Concepts in DBMS

  • Efficient Data Management: Understanding Key Terms

Database Schema: Blueprint

  • The design/skeleton of a database describing:
  • Table names
  • Fields/columns
  • Data types for each column
  • Constraints
  • Relationships among tables
  • Database schema is also referred to as the visual or logical architecture

Data Constraint: The Limitations

  • Puts restrictions on the type of data that inserts into one or more columns
  • It specifies one or more data contraints, while creating tables
  • Can be defined to have mobile number column as non-negative integer values with 10 digits only
  • Can have one unique roll number and put the NOT NULL and UNIQUE constraints on the RollNumber column to make sure of accuracy and reliability of data

Meta-data or Data Dictionary: Data Synopsis

  • The database schemas alongside constraint data are stored by DBMS in the database catalog
  • Meta data is the data stored in the dictionary

Database Instance: A Snapshot

  • No data entry when defining database structure or schema
  • snapshot /state of database after loading is the database instance
  • Data can be retrieved after manipulating

Queries of a Database

  • A query is a request to a database for obtaining the information we want
  • We write it using a query language that is discussed in the later chapter
  • Example: find all names of students present on Attendance Date 2000-01-02
  • The state of database can change through deletion, modification, or updation, and thus a database schema can have many instances
  • A data base schema can change, and thus database schema can have many instances at different times

Data Manipulation in a Database

  • Modification includes insertion, deletion, and update
  • If a new students arrives, the student and guardian file must be updated which makes this insertion
  • If they leave, it must be deleted which is deletion operation
  • Suppose students change phone, then must update guardian file which is an update operation

Database Engine

  • The underlying component or set of programs used by a DBMS to create a database and handle various queries for data retrieval and manipulation

Relational Data Model

  • Different types of DBMS are available and the classification is done based on the underlying data model
  • A data model describes data structure for the database
  • The most used database models include Relational Data Model, object-oriented data model, entity-relationship data model, document model and hierarchical data model

Relational Model

  • Tables are relations that store data for different columns with unique names
  • Each row represents a group of values
  • Has particular guardian and related values that include phone, names, and address
  • A table is regarded as collection of relationships

Relations in Database

  • Relations associated with each other but are not independent
  • Rollnumber links with Student and attribute GUID links to student
  • Without linking attributes database cannot be in a correct state

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Unleash Your Knowledge on Unstructured Data
5 questions
Advantages of Using Electronic Health Records
27 questions
Computer Science Chapter 5
42 questions
Use Quizgecko on...
Browser
Browser