Database Fundementals Flashcards
What are the basic functions of persistent storage in a database? (CRUD)
Create
Read
Update
Delete
What is a flat file?
A simple way to store data for example a spreadsheet
What are the advantages of a database over a flat file?
Concurrent usage
Scalability
Speed
Support for a variety of data types
Records and storage - CRUD
What are structured databases?
Highly organized structures that store data in tables, with each table consisting of rows and columns
What are semi-structured databases?
Even without rigid structure, they possess some level of organization by storing data in a way that allows for more flexibility
What are unstructured databases?
▪ Designed to handle data without a predefined schema
▪ Word documents and PowerPoint presentations are great examples of
unstructured data
Contrast relational and non-relational databases.
o Relational databases use a structured format with tables, rows, and columns
o Non-relational databases (NoSQL) do not rely on a standard table structure, and
they can handle structured, semi-structured, and unstructured data
What does SQL stand for?
Structured Query Language
What is a schema in a relational database?
A schema in a relational database is like a blueprint that defines how data is organized and how the relations among them are associated
What is a primary and foreign key?
A primary key is a unique identifier for a record in a table (e.g. customer record in a customer database)
A foreign key is a field in a table that matches the key of another table and links them together (e.g. a customer order on orders page links to the customer record in database)
Explain a key-value database
A non relational database that stores and retrieves data as a collection of key and value pairs.
A unique key and an associated value
What are the uses and advantages of a key-value database?
Good for speed and efficiency where data is organized in flexible structures.
For example instagram -
key = user id
value = user account, posts etc.
What is a document database?
In a document database, data is stored in self-describing, semi-structured documents
Documents can contain nested fields, arrays, and key-value pairs,
providing a more natural representation of complex data
structures
What are the advantages of document databases?
- Document databases also provide excellent horizontal scalability and performance
- Document databases use embedded documents or references to represent relationships
What is the primary Data Definition Language commands? (DDL)
Create - create a new table
Create Index - create an index on a table
Alter - modify an existing object
Drop - delete an entire table