• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/54

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

54 Cards in this Set

  • Front
  • Back

Database-Management System (DBMS)

Collection of interrelated data and a set of programs to access those data.

Database

Collection of data, which contains info relevant to an enterprise.

Levels of Abstraction

Physical Level, Logical Level, and View Level

Physical Level

Describes how a record (the actual data) is stored. Lowest level of abstraction.

Logical Level

Describes what data are stored in the database, and what relationships exist among those data.

View Level

Describes only part of the entire database. Application programs hide details of data types. Highest level of abstraction.

Data Model

Collection of tools for describing data, data relationships, data semantics, and consistency constraints.


i.e. Relational Model, Entity-Relationship Model, Object-Based Data Model, Semistructured Data Model

Relational Model

Uses a collection of tables (relations) to represent both data and the relationships among those data. Each table has multiple columns.

Entity-Relationship Model

Uses a collection of objects, called entities, and relationships among these objects. An entity is a "thing" in the real world that's distinguishable from other objects.

Object-Based Data Model

Extends the relational model by including object orientation and constructs to deal with added data types.

Semistructured Data Model

Permits specification of data where individual data items of the same type may have different sets of attributes. i.e. Extensible Markup Language (XML)

Data-Definition Language (DDL)

Specifies the database schema. DDL gets as input some instructions and generates some output placed in the data dictionary.


Domain constraints, referential integrity, assertions, authorization

Data Dictionary

Contains metadata; data about data.

Data-Manipulation Language (DML)

Enables users to access or manipulate data as organized by the appropriate data model.


Retrieval, insertion, deletion, modification

Procedural DMLs

Require a user to specify what data are needed and how to get those data.

Declarative DMLs

Require a user to specify what data are needed without specifying how to get those data.

SQL

Widely used nonprocedural language.

Entity-Relationship Data Models

...

Composite Attributes

Can be divided into subparts (other attributes). Denoted by indentions.

Multivalued Attributes

Denoted by enclosing attribute name in braces {}

Derived Attributes

Can be computed from other attributes. Denoted with () placed after attribute name.

Mapping Cardinalities

Expresses the number of entities to which another can be associated via a relationship set.


One-to-one, many-to-one, one-to-many, many-to-many

Total Participation

Every entity in entity set E participates in at least one relationship in relationship set R.


Double lines indicate total participation of an entity in a relationship set.

Partial Participation

Only some entities in entity set E participate in relationships in relationship set R.

Super Key

A set of one or more attributes whose values uniquely determine each entity of an entity set.

Candidate Key

A minimal super key. Several can exist.

Primary Key

A candidate key chosen by the database designer as the principal means of identifying tuples within a relation.


Combination of primary keys of the participating entity sets forms a super key of a relationship set.


Underline indicates primary key attributes.

Roles

Entity sets of a relationship need not be distinct. Each occurrence of an entity set plays a "role" in the relationship.


Denoted with a recursive relation.

Weak Entity Set

An entity set that doesn't have a primary key. Depends on the existence of an identifying entity set to be meaningful. Weak entity set must relate to identifying set via a total, many-to-one (from weak to identifying) relationship set.


Depicted using a double diamond.

Discriminator (Partial Key)

In a weak entity set, it's the set of attributes that distinguishes among all the entities of a weak entity set.


Primary key of weak entity set formed by discriminator, plus the primary key of the strong entity set on which the weak entity set depends on.


Underlined with a dashed line.

Specialization

Designate subgroupings within an entity set that are distinctive from other entities in the set.


Subgroupings have attributes or participate in relationships that do not apply to higher level entity set.


Depicted by hollow arrow-head.

Generalization

Bottom-up design. Combine a number of entity sets that share the same features into a higher level entity set.

Disjoint Specialization

An entity can only belong to one lower level entity set.


Depicted by a single arrow.

Overlapping Specialization

An entity can belong to more than one lower level entity set.


Depicted by 2 separate arrows.

Total Specialization

Each higher level entity must belong to a lower level entity set.


Depicted by adding the keyword "total" in the diagram and drawing a dashed line from keyword to corresponding arrow-head.

Aggregation

Abstraction through which relationships are treated as higher-level entities. Allows relationships between relationships.

SQL Commands

...

not null

Specifies that the null value is not allowed for that attribute.


branch_name char(15) not null

primary key(A1,...,An)

Clause lists attributes that comprise the primary key.


primary key (customer_name )

unique

unique(A1,...An) states that the attributes A1,...,An form a candidate key.

check(P)

Permits domains to be restricted. P is a predicate.


create table branch
(branch_name char(15),
branch_city char(30),
assets integer,
primary key (branch_name),
check (assets >= 0))

foreign key(A1,..,An)... references r

Lists attributes that comprise the foreign key and the name of the relation referenced by the foreign key.


foreign key (customer_name ) references customer )

Assertion

A predicate expressing a condition that we wish the database always satisfies.


create assertion <assertion-name> check <predicate>

Relation Schemas

...

Strong Entity Set

Reduces to schema with the same attributes.


Foreign Keys: none

Weak Entity Set

Becomes a table that includes a column for the primary key of the identifying strong identity set and discriminator of the weak entity set.


Foreign Keys: On weak entity set, specifying that the primary key attributes from the strong entity set references the strong entity set.

Many-to-Many Relationship Set

Represented as schema with attributes for the primary keys of the 2 participating entity sets, and any descriptive attributes of the relationship set.


Foreign Keys: For each entity set E related to relationship set R, create foreign key constraint from relation schema R, with the attributes of R that were derived from primary-key attributes of E referencing the primary key of the relation schema representing E.

Many-to-One, One-to-Many Relationship Set

When participation is total on "many" side, represented by adding an extra attribute to the "many" side, containing the primary key of the "one" side. (Instead of creating schema for relationship set)


Foreign Keys: Referencing each of the entity sets participating in the relationship set. Add the other foreign-key constraints to the combined schema.

One-to-One Relationship Set

Either side can be chosen to act as the "many" side to add the extra attribute. (Instead of creating schema for relationship set)


Foreign Keys: Referencing each of the entity sets participating in the relationship set. Add the other foreign-key constraints to the combined schema.

Composite Attributes

Flattened out by creating a separate attribute for each component attribute. Don't create a separate attribute for the composite attribute itself.


Foreign Keys: None

Multivalued Attributes

A multivalued attribute M of an entity E is represented by a separate schema EM. EM has attributes corresponding to the primary key of E and an attribute corresponding to multivalued attribute M.


Foreign Keys: Create foreign-key constraint on the relation schema created from the multivalued attribute, with the attribute generated from the primary key of the entity set referencing the relation generated from the entity set.

Specialization (1)

Form a schema for the higher-level entity. Form a schema for each lower-level entity set, include primary key of higher-level entity set and local attributes.


Foreign Keys: On the lower-level entity sets, with their primary key attributes referencing the primary key of the relation created from the higher-level entity set.

Specialization (2)

Form a schema for each entity set with local and inherited attributes. If specialization is total, schema for generalized entity set not required.

Aggregation

Create a schema containing primary key of the aggregated relationship, primary key of the associated entity set, and any descriptive attributes.