Test 2 Notes Flashcards
When converting an entity diagram into a relational schema, rule 1 states that….
Every entity is converted into a table.
When converting an entity diagram into a relational schema, rule 2 states that….
All relationships are represented by placing foreign keys into tables.
In the tables the identifiers become…….. and the attributes become ……..
- Primary Keys
- Columns
In a 1:1 relationship where do you place the foreign key?
The foreign Key can be placed in one table or the other.
In a 1:N relationship where do you place the foreign key?
The foreign key must be placed into the N(Child) side of the relationship.
When converting a N:M relationship what must you do?
You must make a new intersection table.
In SQL the CREATE key does what?
Creates objects.
In SQL the ALTER key does what?
Modifies objects.
In SQL the DROP key does what?
Deletes objects.
In SQL the TRUNCATE key does what?
Deletes table data.
In SQL the INT key holds what?
Whole Numbers.
In SQL the VARChar() key holds what?
Strings
In SQL the CONSTRAINT key does what?
Adds attributes, and creates composite, foreign, and primary keys.
In SQL the INSERT key does what?
Adds new data
Which Element follows after the SELECT keyword?
Column
Which Element follows after the FROM keyword?
Tables
Which Element follows after the WHERE keyword?
Criteria/Filter
Which symbol in SQL shows all of the column values or items?
The asterisk (*) symbol.
What SQL key cuts off output?
LIMIT
What SQL key duplicates elements?
DISTINCT
What SQL key carries DELETE or UPDATE actions on the primary key to matching foreign keys?
CASCADE
What symbol represents the not equals in SQL?
<>
The AND symbol shows what between data sets?
Intersection
The OR symbol shows what between data sets?
Union
WHAT SQL keyword filters from a list of items.
IN
What SQL keyword negates information.
NOT
What SQL keyword sorts results?
ORDER BY
What do Wild Cards do in SQL?
They create patters that need to be matched.
What wild card symbol creates any string of any length?
The percent (%) symbol
What wild card symbol matches one single character?
The underscore (_) symbol
The LIKE keyword does what?
Searches partial data values.
List built in functions in SQL
COUNT
MIN
MAX
SUM
AVG
In a Joins Query what is the GOOD method?
Natural Join
In a Joins Query what is the BETTER method?
Join On
In a Joins Query what is the BEST method
Join Using