Module – II
Q1. What is a database? Explain its concepts and types.
Ans – A database is a collection of related data stored in an organized way so it can be easily accessed,
updated, and managed.
Example: A digital record of all farmers in a village with their crops, soil type, and yield.
Main Concepts of a Database
• Data – Raw facts (e.g., “Wheat = 25 quintals”).
• Information – Processed data with meaning (e.g., “Average wheat yield = 25 quintals/ha”).
• Field – A single piece of data (e.g., farmer’s name).
• Record – A collection of related fields (e.g., name, address, crop).
• Table – A group of records arranged in rows and columns.
• Primary Key – A unique value to identify each record (e.g., Farmer ID).
Types of Databases:
[Link] Database
• Data arranged like a tree with parent–child relationships.
• Example: Crop classification from “Cereal” → “Wheat” → “Variety”.
[Link] Database
• Data connected through multiple links (many-to-many relationship).
• Example: A farmer linked to multiple crops and multiple markets.
[Link] Database (Most common)
• Data stored in tables and linked using keys.
• Example: MS Access, MySQL used for storing soil test data and farmer details.
[Link]-oriented Database
• Stores data as objects with data + functions.
• Example: Pest database with pictures and control methods.
Q2. Uses of DBMS in agriculture with examples.
Ans – A Database Management System (DBMS) helps store, organize, and manage agricultural
information efficiently so it can be accessed and updated easily.
[Link] Information Management
• Store farmer details, land holdings, crops grown, and contact information.
• Example: Government Kisan Database for subsidy distribution.
2. Crop Management
• Maintain records of crop varieties, sowing dates, pest control measures, and yields.
Example: Research station database for wheat breeding trials.
[Link] and Water Data Storage
• Store soil test reports, irrigation schedules, and water quality data.
• Example: Soil Health Card database managed by agriculture departments.
4. Market and Price Information
• Maintain real-time market prices for different crops.
• Example: eNAM (National Agriculture Market) database.
[Link] and Disease Monitoring
• Record pest outbreaks, disease symptoms, and control measures.
• Example: Insect pest surveillance database for early warning systems.
6. Weather Data Management
• Store rainfall, temperature, humidity data for forecasting and crop planning.
• Example: IMD weather database linked to agri-advisory services.
Q3. What is WWW? Explain its components.
Ans – The World Wide Web is like a huge library on the internet where you can see information in the form of
web pages.
You open it using a web browser (like Chrome or Firefox), and the pages can have text, pictures, videos, and
links to other pages.
Main Parts of WWW:
[Link] Browser – The tool you use to look at websites.
• Example: Chrome, Firefox.
[Link] Server – A special computer that stores websites and sends them to your browser when you ask.
[Link] Pages – The information you see on the screen.
• Static page → Always same.
• Dynamic page → Changes based on user (e.g., weather site).
[Link] / HTTPS – The “language” or set of rules that lets browsers and servers talk to each other. HTTPS is
safer.
[Link] – The address of a webpage.
• Example: [Link]
Q4. Introduction to computer programming languages with examples.
Ans – A programming language is a set of instructions used to tell a computer what to do. It acts like a
translator between humans and computers, allowing us to write commands that the computer can
understand and execute.
Types of Programming Languages (with examples):
[Link]-Level Languages
• Close to machine language, hard for humans to read.
Examples:
• Machine Language (binary code like 101010)
• Assembly Language (uses short codes like MOV, ADD)
2. High-Level Languages
• Easy to read and write, closer to human language.
• Examples: C, C++, Java, Python.
3. Very High-Level / Scripting Languages
• Even simpler, often used for web or quick tasks.
• Examples: HTML, JavaScript, PHP, Python.
4. Domain-Specific Language.
• Made for special applications.
• Examples: SQL (databases), R (statistics), MATLAB (engineering).
Examples in Agriculture:
• Python – For weather prediction and crop disease detection.
• R – For analyzing crop yield data.
• SQL – For managing farmer and soil databases.
Q5. Standard input/output operations in programming.
Ans – In programming, standard input means taking data from the user (like typing on a keyboard), and
standard output means showing results to the user (like printing on the screen).
They are called “standard” because almost all programming languages follow these basic ways of reading
and displaying data.
[Link] Input (Reading Data)
• Used to get values from the user during program execution.
Examples:
• In C: scanf(“%d”, &x); → Reads a number into variable x.
• In Python: x = input(“Enter a number: “) → Reads input as text.
• In Java: Scanner sc = new Scanner([Link]); int x = [Link]();
[Link] Output (Displaying Data)
• Used to show results or messages on the screen.
• Examples
• In C: printf(“Result = %d”, x);
• In Python: print(“Result =”, x)
• In Java: [Link](“Result = “ + x);
[Link] It’s Important in Agriculture Programming
• Input: Enter crop names, weather data, soil readings.
• Output: Display yield predictions, irrigation schedules, or pest alerts.