Useful tips for everyday
How to restrict users access to views only? Then modifying Jonathan’s response: Create a user-defined database role. GRANT the role SELECT on the views and…
How many fact tables are in a star schema? one fact table A star schema consists of one fact table, and one or more dimension…
Why dynamic SQL is bad? It is vulnerable to SQL injection which could hamper the security a lot. It is very complex in nature as…
What is a EventSource? The EventSource interface is web content’s interface to server-sent events. An EventSource instance opens a persistent connection to an HTTP server,…
When to use filter in group by query? FILTER is a modifier used on an aggregate function to limit the values used in an aggregation.…
What is the purpose of gather stats? You should gather statistics periodically for objects where the statistics become stale over time because of changing data…
What are schema binding views? Schema binding refers to the process of associating a database view to underlying tables in order to put indexes directly…
How does a shared database work for multiple tenants? This approach involves using the same database and the same set of tables to host multiple…
How to split a string into multiple parts in PostgreSQL? Delimiter argument is used to split the string into sub-parts by using a split_part function…
How to get the previous record in MySQL? There’s another trick you can use to show columns from previous rows, using any ordering you want,…