D5.7 - OUTLINE SNOWFLAKES CATALOG AND OBJECTS Flashcards

1
Q

What is a database?

A
  • A logical grouping of schemas. Each database to a single Snowflake account.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Schema?

A
  • A schema is a logical grouping of database objects (tables, views, etc.). Each schema belongs to a single database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the types of tables within Snowflake?

A
  • Permanent Tables (default)
  • Temporary Tables
  • Transient Tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Permanent Table (Standard Edition)

A
  • Persistence: until explicitly dropped
  • Cloning: can be closed to temp, tans, and/or perm
  • Time Travel Retention: 0 to 1 Days (default is 1)
  • Fail-safe Period: 7 Days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Permanent Table (Enterprise Edition and higher)

A
  • Persistence: until explicitly dropped
  • Cloning: can be closed to temp, tans, and/or perm
  • Time Travel Retention: 0 to 90 Days (default is configurable)
  • Fail-safe Period: 7 Days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Temporary Table

A
  • Persistence: remainder of the session
  • Cloning: can be closed to temp or tans
  • Time Travel Retention: 0 to 1 Days (default is 1)
  • Fail-safe Period: 0 Days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Transient Table

A
  • Persistence: remainder of the session
  • Cloning: can be closed to temp or tans
  • Time Travel Retention: 0 to 1 Days (default is 1)
  • Fail-safe Period: 0 Days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the types of Views?

A
  • Non-materialized views: the views created when querying objects within a data base, such as when running a query to select all, some rows, or joining data between tables
  • Materialized views: views that are stored within the system, which incur costs by taking up space, and behave more like a table
  • Both types of views can be secured views, which are useful when considering data protection and privacy, but may impact performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are they data types within Snowflake?

A
  • String or Binary
  • Numeric
  • Logical
  • Date and Time
  • Geospatial
  • Semi-structured
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are external functions?

A
  • External functions are user-defined functions that are stored and executed outside of Snowflake. External functions make it easier to access external API services.
  • This feature eliminates the need to export and reimport data when using third-party services, simplifies data pipelines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a stored procedure?

A
  • Allows you to write procedural code that executes SQL. In a stored procedure, you can use programmatic constructs to perform bracnhing and looping.
  • Created with a CREATE PROCEDURE command and is executed with a CALL command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What do stored procedures allow?

A
  • Procedure logic (branching and looping). which SQL does not support
  • Error handling
  • Dynamically creating a SQL statement and executing it
  • Writing code that executes with the privilege’s of the role that owns the procedure, rather with the privilege’s of the role that runs the procedure.
  • This allows the stored procedure owner to delegate the power to perform specified operations to users who otherwise could not do so. However, there are limitations on these owner’s rights stored procedures.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly