Textbook Notes (280,000)
US (110,000)
UGA (800)
MIST (10)
Chapter 4

MIST 4610 Chapter Notes - Chapter 4: Referential Integrity, Foreign Key, Unique Key

Management Information Systems
Course Code
MIST 4610

This preview shows half of the first page. to view the full 2 pages of the document.
The One-to-Many Relationship
1:m (one-to-many): relationship b/w 2 entities is depicted by a line connecting the 2 with
a crow's foot at the many end of the relationship
Update anomalies: problems when we want to insert, delete, or update data
1. Insert anomalies
2. Delete anomalies
3. Update anomalies
Foreign key: used to show link to other table
To distinguish b/w columns w/ identical names, they must by qualified by prefixing the
table name
Referential integrity constraint: maintains the accuracy of a database
o Its application means that every foreign key in a table has an identical primary key in
that same table or another table
o Every foreign key must have a matching primary key (referential integrity rule), and
every primary key must be non-null (entity integrity rule)
Querying a 2-table database:
o Join: creates a new table from 2 existing tables by matching on a column common to
both tables
The matching condition can be =, <>, <=, <, >= and >
This generalized version is called a theta join
When people refer to a join, they mean an equijoin, when the matching
condition is equality
Control break reporting
o Purpose of a join is to collect the necessary data for a report
o Control break report: recognizes that the values in a particular column or columns
hardly change
o The GROUP BY clause is a basic form of control break reporting. It permits grouping
of rows that have the same value for a specified column(s), and it produces one row
for each different value of the grouping column(s)
Regular expression has 3 elements:
1. ^ indicates start searching at the beginning of the string
2. (.){2} specifies that anything is acceptable for the next 2 characters
3. t indicates what the next character, the 3rd, must be
o Subqueries aka inner query
o Outer query: applied to the SQL preceding the inner query
o Correlated subquery: the subquery can't be evaluated independently of the outer
Depends on the outer query for the values it needs to resolve the inner query
find more resources at oneclass.com
find more resources at oneclass.com
You're Reading a Preview

Unlock to view full version