55

Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

Embed Size (px)

Citation preview

Page 1: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit
Page 2: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

Data BitsMany to Many

Subkeys Joins Queries Attributes Attributes

$100

$200

$300

$400

$500

$100 $100 $100 $100

$200 $200 $200 $200

$300 $300 $300 $300

$400 $400 $400 $400

$500 $500 $500 $500

Final DataBit

Page 3: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit
Page 4: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Answer from Many-to-Many

This represents a specific modeling situation that you might encounter

frequently in database design. .

Page 5: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Question from Many-to-Many

What is a design pattern?

Page 6: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Answer from Many-to-Many

This class contains attributes which are the properties of an

association.

Page 7: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Question from Many-to-Many

What is an association class?

Page 8: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Answer from Many-to-Many

This association has a maximum multiplicity of "*" on both sides.

Page 9: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Question from Many-to-Many

What is a many-to-many association?

Page 10: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Answer from Many-to-Many

This attribute can be computed from data stored elsewhere in the database;

it is shown in UML but not in the relation scheme.

Page 11: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Question from Many-to-Many

What is a derived attribute?

Page 12: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Answer from Many-to-Many

This table is created to hold the linking attributes (FKs) from both sides of a

many-to-many association, whether or not there is an association class.

Page 13: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Question from Many-to-Many

What is a junction table?

Page 14: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Answer from Subkeys

This is the formal definition of the super key property; if I know the value of set

"X" of attributes in a relation, I can uniquely determine the value of set "Y"

(as well as X).

Page 15: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Question from Subkeys

What is a functional dependency?

Page 16: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Answer from Subkeys

This set of attributes is a super key for some, but not all, of the attributes in a

relation.

Page 17: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Question from Subkeys

What is a subkey?

Page 18: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Answer from Subkeys

This decomposition of a relation scheme eliminates a subkey and lets

us recreate the original scheme’s information with the join in a query.

Page 19: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Question from Subkeys

What is lossless join decomposition?

Page 20: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Answer from Subkeys

Following this set of rules insures that a database is well designed.

Page 21: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Question from Subkeys

What is normalization?

Page 22: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Answer from Subkeys

A database with no subkey in any relation (with rare exceptions) is said to

be in this form.

Page 23: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Question from Subkeys

What is third normal form?

Page 24: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Answer from Joins

Join of two tables with the intersection of their schemes used as join

attributes.

Page 25: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Question from Joins

What is a natural join?

Page 26: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Answer from Joins

Join of two tables with join attributes specified by the programmer.

Page 27: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Question from Joins

What is an inner join?

Page 28: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Answer from Joins

Join of two tables that retains unmatched join attributes from one or

both sides.

Page 29: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Question from Joins

What is an outer join?

Page 30: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Answer from Joins

Paste of every pair of tuples from each relation, disregarding join attributes. Also know as a Cartesian product.

Page 31: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Question from Joins

What is a cross join?

Page 32: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Answer from Joins

An alternate, short name for a table in the FROM clause of a SELECT

statement.

Page 33: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Question from Joins

What is an alias?

Page 34: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Answer from Queries

This language is used to build and manipulate relational databases. It is declarative, rather than procedural.

Page 35: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Question from Queries

What is the Structured Query Language (SQL)?

Page 36: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Answer from Queries

Statements to create and modify tables and other database objects.

Page 37: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Question from Queries

What is Data Definition Language (DDL)?

Page 38: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Answer from Queries

Statements to work with data in a table.

Page 39: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Question from Queries

What is Data Manipulation Language (DML)?

Page 40: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Answer from Queries

Clause used when you combine single columns with an aggregate

function.

Page 41: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Question from Queries

What is a Group By Clause?

Page 42: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Answer from Queries

Function that operates on a group of rows, for example, SUM.

Page 43: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Question from Queries

What is an Aggregate Function?

Page 44: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Answer from Attribute Attribute

This is considered a class within a class.

Page 45: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$100 Question from Attribute Attribute

What is a weak entity?

Page 46: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Answer from Attribute Attribute

There are many distinct values entered for this in the same column of the table.

Page 47: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$200 Question from Attribute Attribute

What is a multi-valued attribute?

Page 48: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Answer from Attribute Attribute

This causes a large number of null values in a table row.

Page 49: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$300 Question from Attribute Attribute

What is a repeated attribute?

Page 50: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Answer from Attribute Attribute

[0..*]

Page 51: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$400 Question from Attribute Attribute

What is the UML notation to show a repeating or multi-valued attribute?

Page 52: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Answer from Attribute Attribute

You would only do this when the repeated attribute has several

attributes of its own.

Page 53: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

$500 Question from Attribute Attribute

What is show the repeating attribute in its own class?

Page 54: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

Final DataBitKeys

An outside agency such as a standards body or a government agency has

developed this so that we can use it as if it were a descriptive attribute.

Page 55: Data Bits Many to Many Subkeys JoinsQueries Attributes $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit

Final DataBit

What is an external (surrogate) key?