1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00

sqlfordevs.io moved to sqlfordevs.com (#31)

This commit is contained in:
Tobias Petry 2022-08-20 14:36:24 +02:00 committed by GitHub
parent 3f631cf1d2
commit 646b0dc35f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View file

@ -12,4 +12,4 @@ slug: databases-can-generate-random-uuid-keys
Many applications use the table's numeric primary key in the URL: Bots can scrape all data by incrementing the ID and competitors know your number of customers/resources and growth.Adding a random UUID which is used in URLs solves this. Many applications use the table's numeric primary key in the URL: Bots can scrape all data by incrementing the ID and competitors know your number of customers/resources and growth.Adding a random UUID which is used in URLs solves this.
https://sqlfordevs.io/uuid-prevent-enumeration-attack https://sqlfordevs.com/uuid-prevent-enumeration-attack

View file

@ -12,4 +12,4 @@ slug: rows-can-be-stored-in-an-already-sorted-way-instead-of-the-default-inserti
In most applications, all rows are physically sorted in the database file by their insertion order. By sorting them instead optimally for your application a huge databases will still be amazingly fast. In most applications, all rows are physically sorted in the database file by their insertion order. By sorting them instead optimally for your application a huge databases will still be amazingly fast.
https://sqlfordevs.io/sorted-table-faster-range-scan https://sqlfordevs.com/sorted-table-faster-range-scan

View file

@ -13,4 +13,4 @@ slug: you-can-avoid-many-n1-issues-by-using-lateral-joins-in-mysql
Sometimes you want to get e.g. the last three orders for *every* customer. Normal joins can't do that. You have to execute n+1 queries in code, which is slow! Sometimes you want to get e.g. the last three orders for *every* customer. Normal joins can't do that. You have to execute n+1 queries in code, which is slow!
But with lateral joins, you can do one for-each loop join in SQL 🤯 But with lateral joins, you can do one for-each loop join in SQL 🤯
https://sqlfordevs.io/for-each-loop-lateral-join https://sqlfordevs.com/for-each-loop-lateral-join

View file

@ -12,4 +12,4 @@ slug: you-can-create-db-indices-for-transformed-versions-of-columns
Most developers are puzzled that indexes are not used for e.g. WHERE LOWER(email) = ?. But contrary to common belief, an index can be created for these cases! It's called a function-based index and is supported by MySQL and PostgreSQL. Most developers are puzzled that indexes are not used for e.g. WHERE LOWER(email) = ?. But contrary to common belief, an index can be created for these cases! It's called a function-based index and is supported by MySQL and PostgreSQL.
https://sqlfordevs.io/tips/function-based-index https://sqlfordevs.com/function-based-index

View file

@ -10,4 +10,4 @@ slug: you-can-use-recursive-queries-to-query-hierarchical-trees
--- ---
⚡ Database Tip ⚡ Database Tip
Recursive queries are a great solution to e.g. querying multiple levels in a tree with just one query. But you should use cycle detection otherwise your query might run forever or fail for loops in your data. https://sqlfordevs.io/cycle-detection-recursive-query Recursive queries are a great solution to e.g. querying multiple levels in a tree with just one query. But you should use cycle detection otherwise your query might run forever or fail for loops in your data. https://sqlfordevs.com/cycle-detection-recursive-query

View file

@ -12,4 +12,4 @@ slug: you-can-validate-json-columns-at-database-level
Extending a traditional database schema with NoSQL-like JSON columns can make the schema more understandable. But you should also ensure these JSON documents conform to an expected schema! Extending a traditional database schema with NoSQL-like JSON columns can make the schema more understandable. But you should also ensure these JSON documents conform to an expected schema!
https://sqlfordevs.io/json-schema-validation https://sqlfordevs.com/json-schema-validation

View file

@ -12,4 +12,4 @@ slug: you-can-validate-json-columns-at-the-database-level
Extending a traditional database schema with NoSQL-like JSON columns can make the schema more understandable. But you should also ensure these JSON documents conform to an expected schema! Extending a traditional database schema with NoSQL-like JSON columns can make the schema more understandable. But you should also ensure these JSON documents conform to an expected schema!
https://sqlfordevs.io/tips/json-schema-validation https://sqlfordevs.com/json-schema-validation