IP - Sep

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Feature Series Objec t List

Data Structure 1D data structure. Can be 1D or mul -dimensional (using nested lists).
Can have both numeric indexes and labels. Supports explicit Only numeric indexes are allowed. Supports implicit
Indexing indexing, meaning you can programma cally choose, provide, indexing where indexes are automa cally assigned
Type
and change indexes. star ng from 0.
Index Duplica on Indexes can be duplicate. Indexes cannot be duplicate.
Element Homogeneous elements: All elements must have the Heterogeneous elements: Can store elements of different Type same data type (e.g., all integers
or all strings). data types (e.g., a mix of integers, strings, etc.).
Example Primarily used in Pandas for handling and analyzing data, Used as a basic data structure in Python for storing
Usage where data is labeled. and accessing data.

S.No. Series Object Dic onary


1. It is essen ally a 1D data structure. Can be 1D or mul -dimensional with nested dic onaries as values.
It can be thought of as similar to dic onaries, where Can be thought of as similar to a Series object, with keys
2. dic onaries store values against keys; Series stores values considered equivalent to indexes/labels of a Series object and against indexes/labels. values to
Series elements.
3. Its indexes can be numbers or labels. Its keys can only be of immutable types (e.g., strings, numbers, tuples).
S.No. Series Object 1D Ndarray
1. It stores homogeneous elements (same datatype). It stores homogeneous elements (same datatype).
It supports explicit indexing, i.e., we can programma cally choose, It does not support explicit indexing; only supports
2. provide, and change indexes in terms of numbers or labels. implicit indexing with indexes star ng from 0.
3. It supports indexes of numeric as well as string types. It supports indexes of only numeric types.
It can perform vectorized opera ons on two Series objects, even if their It can perform vectorized opera ons on two
4. shapes are different, by using NaN for non-matching indexes/labels. ndarrays only if their shapes match.
5. It takes more memory compared to a numpy array. It takes lesser memory compared to a Series object.
Data visualization simplifies large datasets into visual graphics, enabling a clearer understanding of complex data relationships. It facilitates better analysis, quick
decision-making, pattern recognition, error detection, and storytelling through data. Additionally, it helps businesses explore insights and grasp emerging trends.
Matplotlib, a Python library, is widely used to create 2D graphs and plots, while its module, pyplot, supports various graph types such as histograms, bar charts,
power spectra, and error charts.
- The pyplot module provides features like drawing plots based on input data, customizing graphs by adjusting elements
- A line plot, for instance, is a graph that represents the frequency of data points along a number line, helping to visualize trends and patterns effectively.
- Bar Graph A graph drawn using rectangular bars to show how large each value is. The bars can be horizontal or vertical
- A histogram is a graphical representation which organizes a group of data points into user-specified ranges.
In a database, a primary key is a set of attributes that uniquely identifies each tuple (row) within a relation (table). No two rows can share the same primary key value.
A candidate key is any attribute or combination of attributes that could potentially serve as the primary key. It is essentially a minimal super key, and a table can have
more than one candidate key.
An alternate key is a candidate key that has not been chosen as the primary key. In cases where a table has multiple candidate keys, those not selected as the primary
key are referred to as alternate keys.\
A foreign key is an attribute or set of attributes in one table that references the primary key of another table. It is used to create a relationship between two tables.
Querying Data
• SELECT * FROM Employees;
• SELECT DATE FROM Employees;
• SELECT DATE FROM Employees WHERE FirstName = 'Anna';
• SELECT * FROM Employees LIMIT 5;
• UPDATE Employees SET LastName = 'Nayak' WHERE FirstName = 'Anna';
• DELETE FROM Employees WHERE FirstName = 'Gand’
• FOREIGN KEY (parent_id) REFERENCES parent_table(id)
• SELECT * FROM emp WHERE emp_name LIKE 'A%';
• ALTER TABLE emp ADD COLUMN email VARCHAR(100);
• ALTER TABLE emp CHANGE email email_address VARCHAR(100);
A database is a collection of DATA/INFORMATION that is organized so that it can be easily accessed, managed and updated
Managing Large Amounts of Data: As the size of data grows into thousands of records, managing it manually becomes challenging. Databases are designed to
efficiently handle and organize large volumes of data.
Accuracy: Databases implement validation rules that help maintain data accuracy, ensuring that only valid data is entered and stored.
Ease of Updating Data: Databases provide flexibility for updating data as needed. Additionally, they allow multiple users to edit data simultaneously, enhancing
collaboration.
Data Security: Databases offer security features such as user groups and privileges that restrict access to sensitive information, ensuring that only authorized
individuals can view or modify the data.
Data Integrity: Built-in integrity checks and access controls in databases help ensure the accuracy and consistency of the data, reducing the risk of errors and
maintaining reliable information.
A DBMS refers to a software that is responsible for storing, maintaining and utilizing database in an efficient way.
Reduced Redundancy: Databases minimize data duplication by storing data in a centralized location, ensuring that all applications reference the same, centrally
maintained database.
Controlled Inconsistency: Inconsistency occurs when two copies of the same data do not match. By managing redundancy, databases help prevent inconsistencies,
ensuring that data remains accurate and reliable.
Facilitated Data Sharing: Data stored in a database can be easily shared among multiple users, promoting collaboration and access to information.
Enhanced Security: Databases protect data from accidental or intentional disclosure to unauthorized individuals and prevent unauthorized modifications, ensuring
sensitive information remains secure.
Maintained Integrity: Databases enforce specific integrity rules to ensure the validity and correctness of data, promoting reliable and trustworthy information.

You might also like