Database Notes
Database Notes
Database Notes
Data is a collection of facts or information that can be recorded. It represents raw facts
that, once processed, become meaningful for decision-making. For example, customer data can
include fields like customer name, contact number, and city.
On the other hand, a database is a collection of interrelated data stored in an organized
manner, often in the form of tables. Each table consists of fields (columns) and records (rows),
and databases can vary in size and complexity. A database can be manually created or managed
through computerized systems. For instance, a customer database would consist of fields such as
customer name, number, and city, storing all relevant customer data for easy access and
management.
What are the disadvantages of file processing systems, and how does DBMS address these
problems?
Traditional file processing systems come with several disadvantages, such as:
1. Data Redundancy and Inconsistency: Storing the same data in multiple places can lead
to errors.
2. Difficult Data Access: Retrieving data is slow and cumbersome.
3. Data Isolation: Data is often scattered in different files, making it difficult to access
related information.
4. Data Integrity Problems: Ensuring the accuracy of data becomes challenging.
5. Concurrent Access Limitations: Multiple users cannot access or modify data
simultaneously.
6. Security Issues: File processing systems often lack proper security features.
A Database Management System (DBMS) solves these problems by centralizing data,
allowing multiple users to access and manipulate it in a secure, consistent, and efficient manner.
It reduces redundancy, enforces data integrity, provides security controls, and allows concurrent
access to data.
In agricultural research, vast amounts of data are generated across multiple seasons and
locations. A DBMS helps organize, store, and manage this data efficiently for analysis and
decision-making. Some specific uses of DBMS in agriculture include:
Organizing Field Research Data: DBMS allows the management of data from various
experimental plots or farms over several seasons, making it easier to analyze trends and
make decisions.
Managing Multidisciplinary Research: DBMS can store data from different
disciplines, enabling collaborative research efforts.
Avoiding Data Duplication: It ensures that agricultural research data is not
unnecessarily duplicated, saving time and resources.
Sharing Research Data: DBMS allows data to be shared between researchers,
policymakers, and technology developers, making it easier to develop agricultural
models, policies, and technology transfer programs.
Applications in GIS and Bioinformatics: DBMS is used in newer agricultural tools like
Geographic Information Systems (GIS) for natural resource management and
bioinformatics for plant and animal science research.
Thus, DBMS is critical in agricultural research for organizing complex data and ensuring that it
can be efficiently accessed and analyzed for decision-making.
How is data represented in a database, and what are the components of a table in database
terminology?
Data Representation in Database:
Data in a database is represented in the form of tables or data files.
Tables are two-dimensional structures consisting of columns and rows.
Entities:
Tables store information about entities—real-world objects with common properties.
Examples of entities include students, employees, states, districts, farmers, field plots,
fertilizers, rainfall, etc.
Fields (Columns):
Columns in a table are referred to as fields.
A field represents one specific attribute or property of the entity.
For example, in an employee table:
o ‘Name’ is a field (attribute).
o ‘Age’ is another field.
Records (Rows):
Rows in a table are called records.
A record contains the actual data for all attributes of one entity.
For example, in an employee table, a record stores data like:
o Employee’s name.
o Employee’s age.
o Employee’s date of birth.
o Example: In a weather table, a record may store: Temperature, rainfall, and date
of the weather observation.
Summary:
Fields define attributes of the entity (columns).
Records hold all the information related to one entity (rows).
What is a Hierarchical Database Management System, and what are its advantages and
disadvantages?
Definition:
o A Hierarchical Database Management System organizes data in a tree-like
structure where the relationships between data elements follow a one-to-many
pattern. Each record has a parent-child relationship.
Advantages:
Disadvantages:
o Single Parent Limitation: Each child can have only one parent, which limits
flexibility.
o Data Duplication: Data repetition is required to connect records logically,
increasing the size of the database.
o Slow Queries: Searching for data lower in the hierarchy requires running through
the entire structure, slowing queries.
o Structural Changes: Adding new fields or records requires a complete
redefinition of the database.
Question: What is a Network Database Management System, and what are its advantages
and disadvantages?
Definition:
Advantages:
Disadvantages:
o Complex Structure: Managing pointers for linking records makes the database
structure complex.
o Difficult Operations: Insertion, deletion, and updates require adjusting numerous
pointers.
o Difficult for Beginners: First-time users may find it difficult to use.
o Structural Modifications: Making changes to the database structure is difficult
and can require modifying the entire database.
Question: What is a Relational Database Management System, and what are its advantages
and disadvantages?
Definition:
Advantages:
Disadvantages:
What is an Object-Oriented Database Management System, and what are its advantages
and disadvantages?
Definition:
Advantages:
Disadvantages:
A well-designed database structure ensures data integrity, simplifies data retrieval, and
allows for easy modifications. Key elements necessary for good design include:
o Tables and keys (Primary and Foreign Keys)
o Relationships between tables (One-to-many, many-to-many)
o Integrity rules that ensure the consistency and efficiency of the database (Primary
key integrity, Referential integrity, and Domain integrity).
Explain the relationship between primary and related tables in a relational database.
Provide an example of how they can be connected.
Primary and related tables are connected through a common field. In a one-to-many
relationship, each value in the primary table's primary key field can have multiple
corresponding values in the foreign key field of the related table. For example, an
employee database can have a primary table with unique employee IDs, while a related
table contains monthly salary data. The two tables can be connected via the common
field, the employee ID.
What are the key database integrity rules in a relational database and why are they
important?
Describe the role of forms, queries, and reports in MS Access, and how they interact with
tables.
o Forms: Simplify data entry and allow users to input data into one or more tables
at once. They act as a user-friendly interface to enter data that gets stored in
tables.
o Queries: Facilitate the retrieval of specific data from multiple tables based on
user-defined conditions. They can display only the data needed at any given time.
o Reports: Are used to format and summarize data from tables and queries for
printing or presentation. They allow users to present information in a neat,
structured format. All three components work by interacting with tables, which
are the core of the DBMS, to manipulate and present data.
Explain the function of data types in MS Access and provide examples of common data
types.
Function: Data types in MS Access define the kind of data that can be stored in each field
of a table, ensuring that only appropriate data is entered. Examples include:
1. Short Text:
o Function: Stores text or combinations of text and numbers that do not require
calculations.
o Example: Names, addresses, phone numbers.
o Size: Up to 255 characters.
2. Long Text:
o Function: Stores lengthy text or combinations of text and numbers.
o Example: Comments, descriptions, notes.
o Size: Up to 63,999 characters.
3. Number:
o Function: Stores numeric data used in mathematical calculations.
o Example: Quantities, ages, scores.
o Size: 1, 2, 4, or 8 bytes depending on the number’s precision.
4. Date/Time:
o Function: Stores date and time values.
o Example: Birthdates, event dates, timestamps.
o Size: 8 bytes.
5. Currency:
o Function: Stores currency values and numeric data used in financial calculations
with precision.
o Example: Salary, product prices, tax amounts.
o Size: 8 bytes.
6. AutoNumber:
o Function: Automatically generates a unique sequential or random number for
each record when a new record is added.
o Example: Order IDs, customer numbers.
o Size: 4 bytes (16 bytes if set to Replication ID).
7. Yes/No:
o Function: Stores Boolean values representing Yes/No, True/False, or On/Off.
o Example: Active/Inactive status, Paid/Unpaid indicator.
o Size: 1 bit.
8. Hyperlink:
o Function: Stores links to websites or files.
o Example: URLs, file paths.
o Size: Up to 2048 characters.