UPI Study › Courses › Database Programming › Free lessons › Lesson 1.2 Free with a free account
Varieties of Database Programs: Tools and Use Cases
Database Programming · Chapter 1: Getting Started with Databases and SQL SetupSection 1.2 · lesson 2 of 769 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Database Programming.
Lesson complete
Earn the 3 college credits for Database Programming
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Planning a Database Schema: Key Ideas and Steps →← What Are Database Applications? Purpose and SignificanceNext lesson: Planning a Database Schema: Key Ideas and Steps →
A free account plays all of Chapter 1 and 3 more lessons of Database Programming. Create a free account →
In this lesson
Database families, workloads, and deployment options for different jobs.
- Compare relational, document, key-value, column-family, and graph databases
- Distinguish OLTP workloads from OLAP analysis and data warehouses
- Choose among embedded, server-based, and cloud-managed deployments
- Recognize dialect differences such as LIMIT in MySQL and TOP in SQL Server
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (994 words). Read along, or search it.
Opening Question
Can One Tool Handle Every Job
Lantern Books needs accurate orders, fast cart lookups, and sales trends. Must one database tool handle every job? Begin with the work: what shape is the data, how will people use it, and who will maintain it? A database family describes how data is organized. Workload and deployment describe other choices; keeping those dimensions separate prevents expensive confusion.
Relational Family
Rows, Columns, and Linked Tables
A relational database stores rows and columns. Here, an order holds customer ID one, matching Asha's key in customers. The match links separate facts, without copying Asha's details into every order. Constraints can reject invalid relationships. MySQL, SQL Server, PostgreSQL, and Oracle Database are examples. Sequel expresses questions across those tables. This is a strong fit for structured orders and payments. Plan the schema and rules carefully; distributing a system adds design work.
Document Family
Flexible JSON Documents
A document database stores a record as a document, often JSON: structured text containing names, values, and nested collections. A product document might hold a book's author, while a lamp document holds its wattage. Their fields can differ. MongoDB and Couchbase are examples. Reading a whole product description can fit this model well. Flexibility does not remove design decisions. Repeating shared details can create update problems; links and constraints differ among products.
Key-Value Family
Claim-Ticket Lookups for Carts and Sessions
A key-value model pairs a unique key with a value. Think of a claim ticket: provide the key, receive the stored item. A cart key can retrieve a shopper's current cart. A session key can retrieve sign-in state, often with an expiration policy. A cache is a saved answer, ready for reuse. Redis is one example; DynamoDB supports key-value and document patterns. Finding every cart containing a lamp is a different access pattern. Additional indexes or features may help, but basic key lookup alone does not answer it.
Column-Family Model
Row Keys and Grouped Columns
A column-family model finds data by a row key, with columns grouped into families. Rows can contain different columns. A device key can lead to groups of time-stamped readings. Cassandra and HBase are examples used for distributed, write-heavy workloads. The design commonly starts from expected queries, such as one device across a time range. Ad hoc relational joins are less natural. Do not confuse column-family with column-oriented analytical storage. The shared word column does not make them the same data model.
Graph Family
Nodes, Edges, and Relationship Paths
A graph stores nodes for things, and edges for their connections. A customer and a book can both be nodes. Draw an edge labeled bought from Asha to Database Basics. Draw another edge labeled knows between two customers. Neo4j and Amazon Neptune are examples. Paths through relationships suit recommendations, network analysis, and some fraud investigations. A relational system can also answer relationship questions. Choose using real access patterns and tests, rather than assuming a graph is always faster.
Workload Types
OLTP Operations Versus OLAP Analysis
Online Transaction Processing, or OLTP, runs daily operations: create an order, update stock, or look up a customer. A transaction groups related work into an all-or-nothing unit. Operational designs emphasize responsive requests and correct concurrent changes. Online Analytical Processing, or OLAP, answers broad questions: compare product sales across several years, or summarize trends by city. Those queries can scan much more history. A modest weekly report may share the operational database; expensive analysis may need a separate system.
Data Warehouses
Historical Analysis and ETL Refreshes
A data warehouse organizes historical information for analysis. It can combine information from several sources. ETL means Extract, Transform, Load: copy source data out, clean or reshape it, then load the analytical store. This separates heavy summaries from live checkout traffic. The copied data has a refresh schedule, so analysts must understand its freshness. The separation is a design choice, based on actual demand. Product choice alone does not determine query size or request rate.
Deployment Choices
Embedded, Server-Based, or Cloud-Managed
An embedded database is a library inside an application. SQLite is a common choice for local notes or offline device storage. There is no separate database server to operate. The application still needs the library, backups, and a suitable concurrency design. A server-based system runs as a service answering clients. With MySQL or SQL Server, your team can manage installation, security, and recovery. A cloud-managed provider handles much infrastructure work. You still manage data, access, settings, costs, and the application's behavior.
Growing a System
Polyglot Persistence Added Step by Step
Lantern Books can start with one relational server, keeping customers, products, and orders consistent. If repeated cart lookups become a bottleneck, the team might add a cache. If historical reports interfere with sales, add a warehouse. A later recommendation feature might justify a graph. Using multiple database models is called polyglot persistence. Every addition brings maintenance and security work. Start simple; check data shape, workload, expected growth, and who will operate it.
SQL Dialects
Free Editions, Tools, and LIMIT Versus TOP
MySQL Community Edition and SQL Server Express are free learning options. Developer editions also serve learning and development, under their licensing terms. Workbench is a MySQL graphical tool. SQL Server Management Studio, or SSMS, is Microsoft's Windows management tool. A dialect is a product's variation on sequel. MySQL uses limit at the end to restrict rows; SQL Server commonly uses top after select. These two examples ask for the three highest-priced products. The table relationships and query ideas transfer, while the exact syntax must match the engine.
Quick Check
An Offline Field Observation App
A field app saves observations on one device, even where no connection exists. Which starting architecture best fits? Read the alternatives, and decide what must work while the device is disconnected. Pause, and decide.
Answer Explained
A Local Embedded Database Synced Later
A local embedded database, synced later. It can save the observations on the device, without waiting for a remote service. The managed server and the warehouse both live off the device, so saving would wait for a connection. Their other strengths do not help here. Synchronization is a separate design task. The starting requirement determines what must run on the device.
Key Takeaways
Choose Family, Workload, and Deployment Separately
Choose a family from data shape and access patterns. Real products can combine several models. Distinguish operational transactions from analytical summaries, and account for the freshness of copied data. Choose deployment independently: an embedded library, your server, or a managed service. Use MySQL and SQL Server to learn shared relational ideas, while checking each dialect's details.
About Database Programming at UPI Study
Database Programming (Computer Science 381) is a self-paced online course of 76 video lessons in 12 chapters, from database applications, SQL setup, schema planning and normalization to keys and constraints, data types, filtering and sorting, joins, subqueries, views, indexes, ROLLUP and PIVOT, regular expressions and database security. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every credit course with PRO →
Why take it here
Why students take Database Programming with UPI Study
Where the credit goes
Universities that work with NCCRS
Database Programming carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Varieties of Database Programs: Tools and Use Cases
What are the main types of database models?
What is the difference between OLTP and OLAP?
When should an application use an embedded database like SQLite?
Is a column-family database the same as a column-oriented database?
About the Database Programming course
How many college credits is Database Programming?
How much does Database Programming cost and what is included?
Which universities accept UPI Study credits?
How long does Database Programming take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Database Programming.
76 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →