- Datum - piece of information
- Data is plural of datum. Data are piece of information - text, images or video.
- Database - collection of data. Organized in many ways - tables.
- Tables - rows, and columns. Excel spreadsheet.
- Col specifies attribute of that data.
An RDBMS (Relational Database Management System) is a program used to create, update, and manage relational databases. In a relational database, data is organized into tables, with each table containing rows (also known as records or tuples) and columns (attributes). Here are some key points about RDBMS:
- Table Structure:- An RDBMS structures information in tables, rows, and columns.
- Each table represents a specific type of data (e.g., Customers, Orders).
- Columns define the attributes (e.g., Customer ID, Order Date).
- Rows contain actual data entries (e.g., individual customer records).
 
- Relationships:- RDBMS allows establishing relationships between tables using common attributes.
- Instead of hierarchical structures, data is stored in related tables.
- Primary keys uniquely identify rows, and foreign keys link related data.
 
- Example:- Consider a Customer table and an Order table:- Customer Table:- Customer ID (primary key)
- Customer name
- Billing address
- Shipping address
 
- Order Table:- Order ID (primary key)
- Customer ID (foreign key)
- Order date
- Shipping date
- Order status
 
 
- By linking the Customer ID in both tables, we establish a relationship.
 
- Well-Known RDBMSs:- Some popular RDBMSs include MySQL, PostgreSQL, MariaDB, Microsoft SQL Server, and Oracle Database.
 
Here are some of the most popular Relational Database Management Systems (RDBMS):
- Oracle: As of September 2023, Oracle is the most popular RDBMS in the world, with a ranking score of 1240.88. It also holds the top position overall among all DBMS11. 
- MySQL: MySQL is widely used and known for its open-source nature. It’s a popular choice for web applications and small to medium-sized databases. 
- Microsoft SQL Server: Developed by Microsoft, SQL Server is commonly used in enterprise environments. It offers robust features, scalability, and integration with other Microsoft products. 
- PostgreSQL: PostgreSQL is an open-source RDBMS known for its extensibility, ACID compliance, and support for advanced data types. It’s popular among developers and data professionals. 
- IBM DB2: IBM DB2 is an enterprise-grade RDBMS with features like high availability, security, and scalability. It’s commonly used in large organizations. 
- Microsoft Access: While not as powerful as the others, Microsoft Access is widely used for small-scale databases and desktop applications. 
- SQLite: SQLite is a lightweight, embedded RDBMS often used in mobile apps and small projects. 
SQLite is not a lighter version of SQL itself; rather, it is a lightweight relational database management system (RDBMS) that adheres to SQL specifications. Let’s explore why it’s named as such:
- Lightweight and Embedded: - SQLite focuses on providing a powerful SQL-compatible database without overheads or dependencies.
- As the name implies, it’s a lightweight solution that can run on almost anything that supports C and persistent file storage.
- Unlike traditional database systems that require a separate server process, SQLite is serverless and integrates directly into the application it serves.
 
- Key Features: - Embeddable: SQLite is embedded within the application, eliminating the need for a separate database server.
- SQL Compatibility: Despite its lightweight nature, SQLite supports a vast majority of SQL standard features, making it robust enough for various applications.
- File-Based: It operates directly on files, making it easy to manage and distribute.
 
- Use Cases: - Mobile Devices: SQLite is commonly used in mobile devices (such as Android and iOS) due to its small footprint and efficient storage.
- Embedded Systems: It’s also popular in embedded systems, IoT devices, and desktop applications.
- Testing and Prototyping: Developers often use SQLite for testing, prototyping, and small-scale projects.
 
Functions of each tab in DB Browser for SQLite:
- Database Structure: - In this tab, you can:- Create new database tables.
- List existing database tables.
- Delete database tables.
- Define the structure of your database by specifying table names, columns, and their data types.
 
 
- In this tab, you can:
- Browse Data: - Here, you can:- View the actual data stored in your tables.
- Browse through rows and columns.
- Add new rows or modify existing data.
- Essentially, it allows you to interact with the data in your database.
 
 
- Here, you can:
- Edit Pragmas: - The Edit Pragmas tab deals with system-wide parameters (pragmas) related to SQLite.
- Pragmas are special commands that control various aspects of SQLite behavior.
- You won’t typically need to change these settings unless you have specific requirements.
 
- Execute SQL: 
- This tab allows you to:
- Write and execute SQL queries directly.
- Query your database for specific information.
- Inspect query results.
- Perform operations like SELECT, INSERT, UPDATE, and DELETE.
- Select * from invoice where total in (1.98, 3.96)
- Select * from Invoice where BillingCity in('Brussels', 'Orlando', 'Paris')
- Select * from Invoice where BillingCity Like ('b%')
- select * from invoice where total>1.98 AND (BillingCity like 'p%' OR BillingCity like 'd%')
- Case statement
- Customer with customerid 6 cannot be found in the customer table.
- Customers with customerid 1 and 5 do not have entries in the invoice table.
- Inner join returns only matchting records.
- Any umatched data from either tables is ignored.
 
 
 
