Skip to main content

SQL Basic and Fundamental Concepts

SQL Basic and fundamental concepts


SQL Basic and fundamental concepts

SQL is a language for managing data in a database. SQL stands for Structured Query Language. SQL is used to create, modify, retrieve and delete data from a database. SQL works with relational databases. A relational database is a collection of data organized into tables. Each table has rows and columns of data. The rows are called records or tuples, and the columns are called attributes or fields. The tables in a relational database are related to each other by common attributes. The structure of the tables in a relational database is called the schema or model of the database. The schema defines how information is stored in the database, including what tables exist, how they relate to each other, what their attributes are and what value types they contain (e.g., numeric, character string).


SQL statements can be written interactively through an interactive tool called SQL*Plus that comes with Oracle Database software; or they can be embedded in an application program written in any high-level language, such as C, C++, Java, or PL/SQL. In this tutorial, we will be using SQL*Plus to write SQL statements.


Database: A database is a collection of related data stored in a computer system. Database management systems (DBMSs) are software packages that organize and control the storage and retrieval of information in a database. The DBMS provides the mechanism for accessing data in the database and for protecting the integrity of the data by enforcing access control and security restrictions.


Database management systems usually have a user interface for creating, modifying, and deleting records (called transactions). They also have facilities for defining access rules that control who may use the system to perform what types of operations on which data. Most DBMSs also provide facilities that allow users to create their own applications using programming languages provided by the DBMS vendor or through external interfaces such as JDBC or ODBC.


Schema: A schema is an organized structure of objects in a database. The schema contains all the objects that are considered part of the database, such as tables, views, indexes and other types of objects.


Table: A table is a two-dimensional area where data is stored in rows and columns. Each column represents a category of information (such as name, address or date), and each row represents an item (such as a person, place or event). The intersection of a column and row is called an "attribute" or "field". A table may also be referred to as an entity.


A table can contain data of varying types: numeric, character strings (text), binary large objects (BLOBs), or other complex data types. In addition to columns and rows, tables contain one or more indexes to speed up the retrieval of information from the table by using key values on one or more columns. An index is like an index in a book; it provides locations for specific items in the table based on values found.


What are different databases in RDBMS?


There are many databases in RDBMS, such as MySQL, Oracle, DB2, SQL Server, Sybase, Informix etc. In this tutorial, we will use MySQL database.



What is the most popular RDBMS database?


The most popular RDBMS database is Microsoft SQL Server.



What is the difference between an RDBMS and a NoSQL database?


The main difference between an RDBMS and a NoSQL database is in how they store data. An RDBMS stores it in tables, rows, and columns. A NoSQL database stores it in documents. This means that you can retrieve all of the data for a specific document without having to query multiple tables or rows/columns in a table. The data storage structure of an RDBMS also means that joins are required to retrieve information from multiple tables, whereas this is not required with a NoSQL database, which can retrieve information from multiple related documents at once using what are called "selectors." Another difference between the two types of databases is that an RDBMS stores its metadata about the data itself within its data (called "in-line metadata"), whereas a NoSQL database store this information separately from its data (called "out-of-line metadata").


What is the difference between a columnar database and an RDBMS?

A columnar database is similar to an RDBMS in that it is also a structured data storage system. However, a columnar database stores data in columns instead of tables, rows, and columns. This means that columns of data can be processed faster than an entire table of data. Also, unlike an RDBMS, a columnar database does not need to retrieve multiple pieces of information from different tables in order to process its data (called "joins"). Instead, it can process all of the information from one column at once.


What is the difference between SQL and NoSQL?

SQL and NoSQL are both structured query languages for querying databases. However, SQL uses tables to store its structured data whereas NoSQL stores its data in documents. Also, SQL uses joins to retrieve information from different tables whereas NoSQL retrieves all of the information from one table at once.


What is the difference between a row-oriented database and a column-oriented database?

A row-oriented database stores data in columns but retrieves it in rows. A column-oriented database stores data in rows but retrieves it in columns.

Comments

Popular posts from this blog

Differences between Talend and Databricks

Feature/Aspect Talend Databricks Integration Approach Open source with both free and paid versions available. Proprietary platform for big data analytics and AI. Cost Generally more cost-effective, especially for small to medium-sized businesses. Pricing may be higher, but it provides a comprehensive big data analytics platform. Ease of Use Has a user-friendly, Eclipse-based Studio for designing ETL processes. Uses a visual drag-and-drop interface. Offers a collaborative environment with notebooks for data engineering and machine learning tasks. Connectivity Supports a wide range of connectors and integrations, including cloud services and big data platforms. Integrates seamlessly with various big data and cloud services. Native support for Apache Spark. Scalability Well-suited for small to medium-sized projects, but may face challenges with extremely large datasets. Built on Apache Spark, designed for scalability and handling large-scale data processing. Deployment Options Supports on...

How to perform incremental load in Talend ETL?

  How to Perform Incremental Load in Talend ETL Tool. Talend ETL is a data integration tool for data transformation, data quality and application integration. Its core feature is the ability to extract, transform and load (ETL) data from various sources. Talend’s first release was in 2006 and it has been growing since then. One of its key features is incremental loading and overwriting the existing records with new ones. Here are some ways to perform incremental load in Talend ETL. What is incremental load? The goal of incremental load is to keep the changes made in a certain time period and update the records with it. It basically means that if we have a table of data and we incrementally load new values for this period of time, then all the old records will be left untouched. It's important to mention that only new records will be updated. In Talend Data Loading, incremental loads can be achieved through different methods: using LOAD CSV, LOAD XML, several source database or usin...

Differences between Talend and Informatica

  Feature/Aspect Talend Informatica Integration Approach Open source with both free and paid versions available. Proprietary with a focus on enterprise solutions. Cost Generally more cost-effective, especially for small to medium-sized businesses. Typically more expensive, targeted at larger enterprises. Ease of Use Has a user-friendly, Eclipse-based Studio for designing ETL processes. Uses a visual drag-and-drop interface. Known for its user-friendly interface, making it easy for both developers and business users. Connectivity Supports a wide range of connectors and integrations, including cloud services and big data platforms. Extensive connectivity options, including a variety of databases, cloud services, and mainframes. Scalability Well-suited for small to medium-sized projects, but may face challenges with extremely large datasets. Designed for scalability, making it suitable for handling large and complex enterprise-level data integration. Deployment Options Supports on-pre...