Informatics Practices Question Paper
SECTION – A
Q1. Define the following terms:
(a) Relation: A relation is a set of tuples (rows) that describe attributes (columns). In simpler terms, it’s a table.
(b) Domain: The set of all possible values that a column can hold. For example, the domain of a “Gender” column might be “Male”, “Female”, and “Other”.
(c) Metadata: Data about data. It describes the structure and properties of the database, such as table names, column names, data types, constraints, etc.
(d) Tuple: A single row in a relation (table). It represents a single record.
(e) RDBMS: Relational Database Management System. A software application used to create, manage, and access relational databases. Examples include MySQL, PostgreSQL, Oracle, and SQL Server.
Q2. What is a database system? What is its need?
A database system is a computerized system for storing, managing, and retrieving data. It consists of hardware, software, data, users, and procedures.
Need:
- Efficient data storage and retrieval
- Data integrity and consistency
- Data sharing and security
- Data independence (separation of data from applications)
Q3. What do you understand by Data Inconsistency and Data Redundancy?
- Data Inconsistency: When the same data is stored in different formats or locations, leading to conflicting information.
- Data Redundancy: When the same data is stored multiple times in the database, leading to wasted space and potential inconsistency.
Q4. Distinguish the following:
(a) DDL commands, DML commands
- DDL (Data Definition Language): Commands used to define the structure of the database (e.g., CREATE, ALTER, DROP).
- DML (Data Manipulation Language): Commands used to manipulate the data within the database (e.g., SELECT, INSERT, UPDATE, DELETE).
(b) Candidate key, Alternate key
- Candidate Key: A minimal set of attributes that can uniquely identify a tuple in a relation. A table can have multiple candidate keys.
- Alternate Key: Any candidate key that is not the primary key.
Q5. Mention any 2 properties of a Relation in RDBMS.
- Each tuple (row) is unique.
- The order of rows and columns is irrelevant.
Q6. Explain any 4 Numeric Data types used in MySQL with a suitable example of each.
- INT: Integer values. (Example:
INT(10)
– An integer with a display width of 10 digits) - DECIMAL: Exact fixed-point numbers. (Example:
DECIMAL(5,2)
– A number with 5 digits, 2 of which are after the decimal point) - FLOAT: Floating-point numbers (approximate). (Example:
FLOAT(10,2)
– A floating-point number with a precision of 10 and 2 decimal places) - DOUBLE: Double-precision floating-point numbers (approximate). (Example:
DOUBLE(15,4)
– A double-precision floating-point number)
Q7. How are comments added in MySQL?
- Single-line comments:
-- This is a comment
- Multi-line comments:
/* This is a multi-line comment */
Q8. What are two wild characters used with the ‘LIKE’ operator? Give a suitable example.
%
(percent): Matches any sequence of zero or more characters. (Example:SELECT * FROM Products WHERE PName LIKE 'Key%';
– Finds products whose names start with “Key”)_
(underscore): Matches any single character. (Example:SELECT * FROM Products WHERE PName LIKE '_ouse';
– Finds products whose names are five letters long and end with “ouse”)
Q9. Differentiate between CHAR and VARCHAR datatype.
- CHAR: Fixed-length string.
CHAR(10)
will always store a string of 10 characters, padding with spaces if necessary. - VARCHAR: Variable-length string.
VARCHAR(10)
can store a string up to 10 characters, using only the necessary space.
Q10. What do you understand by Database schema and Database instance?
- Database Schema: The logical structure of the database, including tables, columns, data types, and constraints. It’s the blueprint of the database.
- Database Instance: A snapshot of the database at a particular point in time. It’s the actual data stored in the database at that moment.
Q11. What do you understand by the term ‘Literal’ and ‘NULL’?
- Literal: A constant value that appears directly in the SQL statement. (Example:
SELECT * FROM Products WHERE Price > 1000;
– 1000 is a literal) - NULL: Represents a missing or unknown value. It’s not the same as zero or an empty string.
SECTION – B
Q12. Create a table named ‘Vision’ as given in the instance chart:
SQL
CREATE TABLE Vision (
ID INT,
Category VARCHAR(25),
No_of_faculty INT,
Skills CHAR(15)
);
Q13. Find the output of the given SQL statements based on the table “Products”:
Table: Products
Pid | PName | Category | Qty | Price |
---|---|---|---|---|
1 | Keyboard | 10 | 15 | 700 |
2 | Mouse | 10 | 10 | 350 |
3 | Wifi-router | NW | 5 | 2600 |
4 | Switch | NW | 3 | 3000 |
5 | Laser Printer | Monitor | 0 | 4500 |
6 | Inkjet Printer | Monitor | 20 | 15000 |
7 | Inkjet Printer | Monitor | 15 | 7000 |
(i) SELECT distinct Category from Products;
Category |
---|
10 |
NW |
Monitor |
(ii) Select Pname from Products where Price between 3000 and 7000;
PName |
---|
Wifi-router |
Switch |
Laser Printer |
Inkjet Printer |
(iii) Select Pname as 'Product Name', Qty as 'Quantity', Price*.05 as 'Discount' from Products where Category='10';
Product Name | Quantity | Discount |
---|---|---|
Keyboard | 15 | 35.00 |
Mouse | 10 | 17.50 |
(iv) Select Category from Products order by Price desc;
Category |
---|
Monitor |
Monitor |
NW |
Monitor |
NW |
10 |
10 |
(v) Select *from Products where Qty>=15 and Price<=15000;
Pid | PName | Category | Qty | Price |
---|---|---|---|---|
1 | Keyboard | 10 | 15 | 700 |
6 | Inkjet Printer | Monitor | 20 | 15000 |
7 | Inkjet Printer | Monitor | 15 | 7000 |
Q14. Queries for the Employee Table:
(i) To display those employee’s name whose name 3rd letter is ‘a’ and ending with letter ‘n’.
SELECT EName
FROM Employee
WHERE EName LIKE '__a%n';
(ii) Display only those tuples who joined before ‘2020-01-01’.
SQL
SELECT *
FROM Employee
WHERE DOJ < '2020-01-01';
(iii) Change Department from ‘IT’ to ‘AI’.
SQL
UPDATE Employee
SET Department = 'AI'
WHERE Department = 'IT';
(iv) Display only those employees information whose DOJ is not given (NULL).
SQL
SELECT *
FROM Employee
WHERE DOJ IS NULL;
(v) Remove all records working in ‘Sales’ department.
SQL
DELETE FROM Employee
WHERE Department = 'Sales';
Q15. Display system date and time, and date format in MySQL.
- Display system date and time:
SQL
SELECT NOW(); -- Or SELECT SYSDATE();
- Date format in MySQL:
MySQL supports various date formats. The most common is YYYY-MM-DD
(e.g., 2024-07-26). You can use the DATE_FORMAT()
function for other formats:
SQL
SELECT DATE_FORMAT(DOJ, '%m/%d/%Y') AS FormattedDOJ
FROM Employee;
Q16. Display database names and activate a database.
- Display database names:
SQL
SHOW DATABASES;
- Activate/open the ‘ADMIN’ database:
SQL
USE ADMIN;
Q17. Add a primary key constraint to the ‘ACCNO’ column in the ‘MASTER’ table.
SQL
ALTER TABLE MASTER
ADD PRIMARY KEY (ACCNO);
Important Notes:
- Data Types: Ensure
ACCNO
has a suitable data type (e.g., INT, VARCHAR). - Existing Data: Duplicate
ACCNO
values will cause theALTER TABLE
command to fail. - Case Sensitivity: SQL keywords are not case-sensitive (e.g.,
SELECT
orselect
). - Semicolons: Semicolons (
;
) separate SQL statements.
Q18. Queries for the Scholars Table:
(i) Display Name and Optional subject in ascending order of Stream.
Table: Scholars
RegNo | SName | Stream | Optional | Marks |
---|---|---|---|---|
S1001 | Akshat | Science | CS | 99 |
S1002 | Harshit | Commerce | IP | 95 |
S1003 | Devika | Humanities | IP | 100 |
S1004 | Manreen | Commerce | IP | 98 |
S1005 | Gaurav | Humanities | IP |
92 |
S1006 | Saurav | Science | CS | NULL |
S1007 | Bhaskar | Science | CS | 95 |
S1008 |
Bhaskar
|
Science | CS | 96 |
SELECT SName, Optional
FROM Scholars
ORDER BY Stream ASC;
(ii) Display different Optional subjects available (without repetitions).
SELECT DISTINCT Optional
FROM Scholars;
(iii) Display name of those scholars who are not in ‘Commerce’ stream.
SELECT SName
FROM Scholars
WHERE Stream != 'Commerce'; -- Or WHERE Stream <> 'Commerce'
(iv) Add a new row with the given values ‘S1009’, ‘Manjeet’, ‘Science’, ‘PE’, 92.
INSERT INTO Scholars (RegNo, SName, Stream, Optional, Marks)
VALUES ('S1009', 'Manjeet', 'Science', 'PE', 92);
(v) Display only those scholars name whose obtained marks above 95.
SELECT SName
FROM Scholars
WHERE Marks > 95;
Q19. What do you understand by degree and cardinality in a relation of RDBMS?
- Degree: The number of attributes (columns) in a relation (table).
- Cardinality: The number of tuples (rows) in a relation (table).
Q20. Write SQL command to display structure of a table ‘PUPIL’.
DESCRIBE PUPIL; -- Or SHOW COLUMNS FROM PUPIL;
Q21. Name the dummy table used in MySQL to perform non-table-based queries.
DUAL
Q22. Write SQL command to add a new column ‘Email’ of data type VARCHAR and size 30 to the table ‘Consumer’.
ALTER TABLE Consumer
ADD COLUMN Email VARCHAR(30);
OR
Give SQL command to remove a column ‘REMARK’ along with its data of ‘Trainee’ table.
ALTER TABLE Trainee
DROP COLUMN REMARK;
Q23. What output will be obtained by the given below SQL command?
Select 45%46;
The output will be 45. The %
symbol represents the modulo operator, which returns the remainder of a division. Since 45 is smaller than 46, the remainder when 45 is divided by 46 is 45.
Q24. In the given query which keyword to be inserted to work successfully –
The keyword to be inserted is VALUES
. The complete query is:
INSERT INTO Coach VALUES (11, 'Akhil', 90000);
Q25. The keyword LIKE can be used with the WHERE clause to refer to a range of values. State True/False.
False. LIKE
is used for pattern matching, not for specifying ranges. To specify ranges, you would use operators like BETWEEN
, >=
, <=
, >
, and <
.
SECTION – C
Q26. List two cloud-based services you are using at present.
(This is a personal answer, but here are some common examples.)
- Google Drive/Dropbox/iCloud: Cloud storage and file synchronization services.
- Gmail/
Outlook.com/iCloud
Other possibilities include social media platforms (Facebook, Instagram), streaming services (Netflix, Spotify), online gaming platforms, and many web-based applications.
Q27. Differentiate between ‘IoT’ and ‘WoT’.
- IoT (Internet of Things): Focuses on connecting physical devices (things) to the internet, enabling them to collect and exchange data. These devices often have embedded sensors and software.
- WoT (Web of Things): A subset of IoT that specifically emphasizes the use of web technologies (like HTTP, REST, and URIs) to make IoT devices and their data accessible and interoperable over the web. WoT aims to standardize how IoT devices communicate and interact.
Key Differences:
Feature | IoT | WoT |
---|---|---|
Connectivity | Diverse protocols (e.g., MQTT, CoAP) | Primarily web protocols (HTTP, WebSockets) |
Focus | Connecting devices | Making devices and data accessible via the web |
Interoperability | Can be challenging due to varied protocols | Improved through web standards |
Abstraction | Lower-level device interaction | Higher-level, web-based interaction |
Q28. What is ‘Blockchain Technology’? Mention at least 4 benefits of it.
Blockchain technology is a distributed, decentralized, and immutable ledger that records transactions in blocks, linked together chronologically and secured using cryptography. Each block contains a timestamp and a cryptographic hash of the previous block, ensuring data integrity.
Benefits:
- Security: Immutability and cryptographic hashing make it extremely difficult to tamper with or alter data on the blockchain.
- Transparency: All participants in the network can view the shared ledger, promoting trust and accountability.
- Decentralization: No single entity controls the blockchain, reducing the risk of single points of failure and censorship.
- Efficiency: Streamlines processes by removing intermediaries and automating tasks through smart contracts.
Q29. Distinguish ‘Grid Computing’ and ‘Cloud Computing’.
Feature | Grid Computing | Cloud Computing |
---|---|---|
Resource Management | Heterogeneous resources, distributed across multiple organizations | Homogeneous resources, centralized in data centers |
Focus | Computational power for complex tasks | On-demand access to scalable resources |
Administration | Decentralized, collaborative | Centralized |
Scalability | Limited, based on participating resources | Highly scalable and elastic |
Service Model | Primarily focused on infrastructure | Offers various service models (IaaS, PaaS, SaaS) |
OR
Explain SaaS and PaaS cloud services.
- SaaS (Software as a Service): Provides ready-to-use software applications over the internet. Users access the software on demand without installation or management. (Example: Gmail, Salesforce)
- PaaS (Platform as a Service): Provides a platform for developers to build, deploy, and manage applications. It includes tools, libraries, and infrastructure components. (Example: AWS Elastic Beanstalk, Google App Engine)
Q30. Give 4 examples of NLP in real life.
- Chatbots: Interact with users in a conversational manner.
- Language Translation: Translate text or speech from one language to another.
- Sentiment Analysis: Determine the emotional tone behind text (e.g., customer reviews).
- Spam Filters: Identify and filter out unwanted emails.
Q31. How is Augmented Reality different from Virtual Reality?
Feature | Augmented Reality (AR) | Virtual Reality (VR) |
---|---|---|
Environment | Enhances the real-world environment | Creates a completely virtual environment |
Experience | Overlays digital information onto the real world | Immersive, simulated experience |
Devices | Smartphones, tablets, AR glasses | VR headsets, specialized controllers |
Interaction | Interacts with both real and virtual elements | Interacts primarily with the virtual world |
Examples | Pokémon Go, AR filters on Snapchat | Oculus Rift, HTC Vive |
Q32. Name some fields of ML applications.
- Healthcare: Disease diagnosis, drug discovery, personalized medicine
- Finance: Fraud detection, risk assessment, algorithmic trading
- Transportation: Self-driving cars, traffic optimization
- Retail: Personalized recommendations, inventory management
- Entertainment: Content recommendation, personalized gaming experiences
Q33. What do you understand by sensors and smart sensors?
- Sensors: Devices that detect physical quantities (e.g., temperature, pressure, light) and convert them into electrical signals.
- Smart Sensors: Sensors with integrated processing capabilities. They can perform signal conditioning, data processing, and communication tasks, making them more versatile and autonomous than traditional sensors. They often use microcontrollers or embedded systems.
Key Differences:
Feature | Sensors | Smart Sensors |
---|---|---|
Processing | Minimal or no onboard processing | Integrated processing capabilities |
Communication | Analog or simple digital output | Digital communication protocols (e.g., I2C, SPI) |
Intelligence | Limited | Enhanced, with data analysis and decision-making |
Autonomy | Requires external processing |
Can operate more independently
|