2 Standard RDBMS capabilities

 

This chapter covers

  • Creating various database objects, including schemas, tables, and views
  • Querying and manipulating data
  • Leveraging JOINs and transactions
  • Executing application logic within database with stored procedures and triggers
  • Enforcing data integrity with primary keys, foreign keys, and other constraints
  • Restricting access to data using roles and permissions

This book assumes you're either familiar with the basics of relational database management systems (RDBMS) and structured query language (SQL). (If you need a refresher, see Chapter 1.) At a minimum, you should understand what relational databases are used for and how to run basic SQL queries. If you meet this bar, this chapter offers an overview of some standard capabilities typically supported across all SQL databases, including Postgres. If these concepts still sound new to you, no problem—enjoy reading this chapter to see the standard features in action and refer to other resources whenever you'd like a deeper understanding of any topic.

In this chapter, you take a quick tour through some core and widely used RDBMS features that allow you to create various database objects, query and modify data transactionally, enforce data integrity, define granular security permissions, and more. You explore all this in a developer way by designing a multi-tenant eCommerce platform used by thousands of merchants worldwide.

2.1 Creating database structure

 
 
 
 

2.1.1 Creating databases

 
 
 

2.1.2 Creating schemas

 
 
 
 

2.1.3 Creating tables

 
 

2.2 Querying and manipulating data

 
 
 

2.3 Data integrity

 
 
 

2.4 Transactions

 
 

2.5 Joins

 
 
 

2.6 Functions and triggers

 

2.6.1 Functions, practical example

 
 

2.6.2 Triggers, practical example

 
 

2.7 Views

 
 
 
 

2.8 Roles and access control

 
 
 

2.9 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest