5.6 ERDs and Query Flashcards
A relational database is a collection of interrelated two-dimensional tables, consisting of rows and columns. Each row represents a record, and each column (or field) represents an attribute (or characteristic) of that record.
word
Every record in the database must contain at least one field that uniquely identifies that record so that it can be retrieved, updated, and sorted.
worddd
what is the identifier field called
primary key
when can related tables (Erds) be joined
when they contain common columns
how do you find info in a database?
use a query language (SQL or QBE)S
SQL example
Typical key words are SELECT (to choose a desired attribute), FROM (to specify the table or tables to be used), and WHERE (to specify conditions to apply in the query).
How does QBE work
user fills out a form to construct a samplle of data desired!! then use drag and drop
how to make erd
1) identify the business rules (how does the business operate? what is the info)
2) label the PK
3) find relevant attributes
4) connect to other tables with apporporiate connectivity and cardinality
how to find different attributes of tables
use data dictionary
unary relationship
associaiton with one entityy
binary relationshoip
relationship where two entities are associated
ternary relationship
exist when three entities are assocaited
cardinality
max number of time one entity can be associated with another
cardinality ex: mandatory single
two straight lines
cardinality ex: optional single
circle straight line