Here is a comparison of various features and strategies between MS SQL, Oracle, Snowflake, Amazon Redshift, and Google BigQuery:

Feature/StrategyMS SQLOracleSnowflakeAmazon RedshiftGoogle BigQuery
Row Block Storage StrategyRow-oriented storageRow-oriented storageColumn-oriented storageColumn-oriented storageColumn-oriented storage
Partitioning/Indexing/SortingPartitioning by range, hash, or list. Clustered and non-clustered indexes. Supports table-level and column-level statistics for query optimization.Partitioning by range, hash, or list. B-tree and bitmap indexes. Supports table-level and column-level statistics for query optimization.Automatic partitioning and clustering by column. Does not support traditional indexing, but uses a metadata service to optimize query performance.Automatic distribution and sort keys for columnar data. Supports a variety of compression options. Does not support traditional indexing, but uses a zone map and statistics to optimize query performance.Automatic partitioning and clustering by column. Does not support traditional indexing, but uses a query cache and machine learning-based optimization to optimize query performance.
OLTP/OLAPSupports both OLTP and OLAP workloads.Supports both OLTP and OLAP workloads.Supports both OLTP and OLAP workloads.Primarily designed for OLAP workloads, but can handle some OLTP workloads.Primarily designed for OLAP workloads, but can handle some OLTP workloads.
PerformanceHigh performance for OLTP workloads, but may suffer with complex queries on large data sets. Can scale up or out with sharding and clustering.High performance for both OLTP and OLAP workloads, with advanced query optimization and caching features. Can scale up or out with sharding and clustering.High performance for OLAP workloads, with automatic query optimization and caching features. Can scale up or out with sharding and clustering.High performance for OLAP workloads, with automatic query optimization and advanced compression features. Can scale out with distribution and replication.High performance for OLAP workloads, with automatic query optimization and caching features. Can scale out with distribution and replication.
CostLicense and maintenance fees, with additional costs for hardware and storage.License and maintenance fees, with additional costs for hardware and storage.Pay-as-you-go pricing model based on usage, with no upfront costs.Pay-as-you-go pricing model based on usage, with no upfront costs.Pay-as-you-go pricing model based on usage, with no upfront costs.
IntegrationIntegrated with Microsoft products, with support for ODBC and JDBC drivers for third-party integration.Integrated with Oracle products, with support for ODBC and JDBC drivers for third-party integration.Integrated with multiple data sources, with support for ODBC and JDBC drivers for third-party integration.Integrates with various AWS services, with support for ODBC and JDBC drivers for third-party integration.Integrates with various Google Cloud services, with support for ODBC and JDBC drivers for third-party integration.

DATE TIME FUNCTIONS

Here is a comparison of the date and time functions between MS SQL, Oracle, Snowflake, Amazon Redshift, and Google BigQuery:

Function TypeExample MS SQL FunctionExample Oracle FunctionExample Snowflake FunctionExample Amazon Redshift FunctionExample Google BigQuery Function
Date FormattingCONVERT(varchar, date, 120)TO_CHAR(date, 'YYYY-MM-DD HH24:MI:SS')TO_CHAR(date, 'YYYY-MM-DD HH24:MI:SS')TO_CHAR(date, 'YYYY-MM-DD HH24:MI:SS')FORMAT_DATETIME('%Y-%m-%d %H:%M:%S', date)
Date ArithmeticDATEADD(datepart, number, date)ADD_MONTHS(date, number)DATEADD(datepart, number, date)DATEADD(datepart, number, date)DATE_ADD(date, INTERVAL number datepart)
Date DifferenceDATEDIFF(datepart, startdate, enddate)MONTHS_BETWEEN(date1, date2)DATEDIFF(datepart, startdate, enddate)DATEDIFF(datepart, startdate, enddate)DATE_DIFF(end_date, start_date, datepart)
Extract YearYEAR(date)EXTRACT(YEAR FROM date)DATE_PART('YEAR', date)EXTRACT(YEAR FROM date)EXTRACT(YEAR FROM date)
Extract MonthMONTH(date)EXTRACT(MONTH FROM date)DATE_PART('MONTH', date)EXTRACT(MONTH FROM date)EXTRACT(MONTH FROM date)
Extract DayDAY(date)EXTRACT(DAY FROM date)DATE_PART('DAY', date)EXTRACT(DAY FROM date)EXTRACT(DAY FROM date)
Extract HourDATEPART(hour, date)EXTRACT(HOUR FROM date)DATE_PART('HOUR', date)EXTRACT(HOUR FROM date)EXTRACT(HOUR FROM date)
Extract MinuteDATEPART(minute, date)EXTRACT(MINUTE FROM date)DATE_PART('MINUTE', date)EXTRACT(MINUTE FROM date)EXTRACT(MINUTE FROM date)
Extract SecondDATEPART(second, date)EXTRACT(SECOND FROM date)DATE_PART('SECOND', date)EXTRACT(SECOND FROM date)EXTRACT(SECOND FROM date)
TruncationDATEADD(dd, DATEDIFF(dd, 0, date), 0)TRUNC(date, 'DD')DATE_TRUNC('DAY', date)TRUNC(date, 'DD')DATE_TRUNC(date, DAY)
Date Formatting with Time ZoneSWITCHOFFSET(date, offset)FROM_TZ(date, timezone)TO_TIMESTAMP_NTZ(date)TIMEZONE_ABBR(timezone, date)FORMAT_DATETIME('%Y-%m-%d %H:%M:%E6S %z', DATETIME(date, timezone))

STRING FUNCTIONS

Function TypeExample MS SQL FunctionExample Oracle FunctionExample Snowflake FunctionExample Amazon Redshift FunctionExample Google BigQuery Function
String Concatenationstring1 + string2 or CONCAT(string1, string2)`string1string2orCONCAT(string1, string2)`CONCAT(string1, string2) or `string1
String LengthLEN(string)LENGTH(string)LENGTH(string)LENGTH(string)LENGTH(string)
SubstringSUBSTRING(string, start, length) or LEFT(string, length) or RIGHT(string, length)SUBSTR(string, start, length) or SUBSTR(string, start) or SUBSTR(string FROM start FOR length)SUBSTR(string, start, length) or SUBSTR(string FROM start FOR length)SUBSTRING(string FROM start FOR length) or LEFT(string, length) or RIGHT(string, length)SUBSTR(string, start, length) or SUBSTR(string, start)
String ReplaceREPLACE(string, old, new)REPLACE(string, old, new)REPLACE(string, old, new)REPLACE(string, old, new)REPLACE(string, old, new)
String PaddingLEFT(string + REPLICATE(pad, n), n) or RIGHT(REPLICATE(pad, n) + string, n)LPAD(string, n, pad) or RPAD(string, n, pad)LPAD(string, n, pad) or RPAD(string, n, pad)LPAD(string, n, pad) or RPAD(string, n, pad)LPAD(string, n, pad) or RPAD(string, n, pad)
String TrimmingLTRIM(string) or RTRIM(string) or TRIM(trim_type FROM string)LTRIM(string) or RTRIM(string) or TRIM(trim_type FROM string)LTRIM(string) or RTRIM(string) or TRIM(trim_type FROM string)LTRIM(string) or RTRIM(string) or TRIM(trim_type FROM string)LTRIM(string) or RTRIM(string) or TRIM(trim_type FROM string)
String Case ConversionUPPER(string) or LOWER(string)UPPER(string) or LOWER(string)UPPER(string) or LOWER(string)UPPER(string) or LOWER(string)UPPER(string) or LOWER(string)
Regular ExpressionPATINDEX(pattern, string)REGEXP_LIKE(string, pattern) or REGEXP_REPLACE(string, pattern, replacement)REGEXP_LIKE(string, pattern) or REGEXP_REPLACE(string, pattern, replacement)REGEXP_INSTR(string, pattern) or REGEXP_REPLACE(string, pattern, replacement)REGEXP_CONTAINS(string, pattern) or REGEXP_REPLACE(string, pattern, replacement)

CAST:

Function TypeExample MS SQL FunctionExample Oracle FunctionExample Snowflake FunctionExample Amazon Redshift FunctionExample Google BigQuery Function
Casting and ConversionCAST(expression AS data_type) or CONVERT(data_type, expression)CAST(expression AS data_type)CAST(expression AS data_type)CAST(expression AS data_type) or CONVERT(data_type, expression)CAST(expression AS data_type) or SAFE_CAST(expression AS data_type) or TRY_CAST(expression AS data_type)

USE CASE OF EACH DATABASE TECHNOLOGIES:

MS SQL:

A large e-commerce company uses MS SQL to manage their online store. They have millions of customers and transactions every day. They use partitioning to improve query performance, with a range partition on their order date column. They also use clustered and non-clustered indexes to speed up specific queries. They use MS SQL’s backup and recovery features to ensure data safety and avoid downtime. They also use the SQL Server Agent to automate routine tasks such as backups, index maintenance, and email notifications.

Oracle:

A financial services company uses Oracle to manage their vast amounts of data. They store all their customer information, account balances, and transaction history in Oracle databases. They use Oracle’s partitioning feature to improve query performance, with a range partition on their transaction date column. They also use bitmap indexes for faster search performance on their large tables. They use Oracle’s data encryption feature to protect sensitive customer information. They also use Oracle’s Advanced Queuing feature to reliably send and receive messages between their various applications.

Snowflake:

A healthcare company uses Snowflake to manage their patient data. They have a lot of data, including medical records, test results, and insurance information. They use Snowflake’s automatic clustering and sorting features to optimize query performance, as well as its automatic scaling features to handle sudden spikes in traffic. They use Snowflake’s secure data sharing feature to share data with external partners without compromising security. They also use Snowflake’s time travel feature to recover lost data or revert to a previous state.

Amazon Redshift:

A media company uses Amazon Redshift to store and analyze their customer data. They have a lot of data, including customer demographics, viewing habits, and subscription history. They use Redshift’s columnar storage and compression features to save space and improve query performance. They also use Redshift’s automatic distribution and sort keys to optimize data placement and speed up queries. They use Redshift’s Spectrum feature to query data stored in Amazon S3, and its ML-powered recommendations feature to personalize customer experiences.

Google BigQuery:

An advertising company uses Google BigQuery to analyze customer behavior and optimize ad targeting. They use BigQuery’s columnar storage and caching features to speed up queries and reduce costs. They also use BigQuery’s automatic partitioning and clustering features to optimize data placement and improve query performance. They use BigQuery’s integration with other Google Cloud services to automate data pipelines and machine learning workflows. They also use BigQuery’s data labeling and classification features to ensure compliance with data privacy regulations.