Databases Flashcards
table consists of these two things
columns and rows
columns are known as what
fields
rows are known as what
records
difference bw spreadsheet and db
db can define and traverse relationships between tables
issue commands to interact
what is a database
set of tables
column
set of data of single simple type
row
single record of data like “Kevin”
field
intersection of c and r
index
data structure on a table to increase lookup speed
foreign key
table column whose values reference rows in another table.
foundation of relational dbs
example table:pages
subject_id referencing subject table (singular nomenclaure)
a foreign key should always have what
indexes so you can find relationships quickly
schema
structural definition of a db, defines table, columns, rows, etc, everything that makes up the structure of a database
if you import a schema what happens
creates complete db with correct structure, but without data
CRUD
create read update delete (fundamental way of interacting with a db)
grant privelages
gives privelages for something like a db.* (*is wild card so all tables on that db)