1/16
Looks like no tags are added yet.
relational database model
data are stored in separate tables that are structured so the tables are linked together
attribute
columns of data on a table
records
rows of data in a table
field
the individual cells within the table
primary key
an attribute or combination of attributes that can be used to uniquely identify a specific row (record) in a table
foreign key
an attribute in one table that is a primary key in another table; used to link the two tables
non-key
an attribute that describes a primary key
update anomaly
changes to existing data on one table may not update another table that used that data (when the tables are not properly linked)
insert anomaly
unable to add a new record to the database tables if trying to use a foreign key to save a transaction but its primary key is not defined
delete anomaly
removing a record also removes other unintended data from the database
SELECT
defines what attribute(s) you want to see in the results; required
FROM
defines what table(s) you want to pull data from; required
WHERE or HAVING
applies a filter to the data; optional
GROUP BY
organizes similar information together (used in calculations such as SUM, COUNT, etc.); optional
ORDER BY or SORT BY
sorts the data in a desired way; optional
JOIN
used when the query uses two or more tables; shows how linked together (explicitly stating any primary and foreign key linkage)
REA diagrams
plans how database tables should relate/link to each other; provides a visual representation of how information in tables relates together, similar to a document flowchart; helps communication between accounting (plans structure) and IT (implements changes)