BY- NIDHI KUSHWAHA
𝐃𝐚𝐭𝐚
• Data is a collection of facts, such as numbers, words, measurements,
observations or descriptions of things.
Examples-
o Numbers (e.g., 42,3.14)
o Words (e.g., “Hello”, “SQL”)
o Measurements (e.g., height , weight)
o Observations (e.g., “It is raining”)
Database
• A database is an organized collection of data, generally stored and
accessed electronically from a computer system.
• It allow for efficient storage, retrieval, and management of data.
Examples of Databases:
o E-commerce platforms (e.g., Amazon)
o Social media platforms (e.g., Facebook)
,Database Management System (DBMS)
• Database management system is a software which is used to manage the
database.
• DBMS provides an interface to perform various operations like-
1. Creating databases, tables, and objects.
2. Inserting, updating, and deleting data.
3. Dropping databases, tables, and objects.
4. Provides data security.
• Some popular DBMS softwares are MS SQL
SERVER,Oracle,MySQL,IBM,DB2,PostgreSQL etc.
Relational Database Management System(RDBMS)
• It is a type of DBMS that manage relational database.
• It helps to store, organize and retrieve data efficiently. RDBMS softwares
are MySQL, PostgreSQL, SQL Server, and Oracle.
Table
• A table in a database is a collection of rows and columns.
• It is used to organize and store data in a structured format.
,Row and Column
• A row is a horizontal arrangement of data moving from right to left. It is
often referred to as a record or a tuple. It represents individual data
entries.
• A column is a vertical arrangement of data moving from top to bottom. It
is often referred to as an attribute or a field. It represents the
characteristics or properties of the data.
Example- A "Customers" table might have columns like CustomerID, Name,
Email, and Phone with each row representing a different customer.
SQL
• SQL stands for Structured Query Language was initially developed by
IBM.
• Initially it was called as SEQUEL (Structure English Query Language)
• SQL is a programming language used to interact with database.
• SQL allows you to create, read, update, and delete (CRUD) data in a
relational database.
, SQL Data Types
• Data Types define the type of data that can be stored in a table column.
• It ensures data integrity and optimizes storage.
Commonly used Data Types are-
A. String Datatypes- It stores text strings.
1. CHAR-
• Can store characters of fixed length.
• The size parameter specifies the column length in characters can
be from 0 to 255.
2. VARCHAR-
• Can store characters up to given length.
• The size parameter specifies the maximum column length in
characters can be from 0 to 65535.
B. Numeric Datatypes- These datatypes store numbers, both integer and
floating-point number.
1. INT-
• Used for storing whole numbers without decimal.
2. FLOAT-
• Used for storing numbers without decimal.
• Float gives approximate value while performing calculations.
3. Decimal (P, S)-
• Used to store numbers with a fixed number of decimal places.
• Decimal gives exact value.
• Total range of digits can be 1-38. (Precision-P)
• Range after decimal should be 0-30. (Scale-S)