Week 20

 CST 363 Week 4

This is our fourth week in CST-363, also known as Intro to Database Design.

Questions

Briefly summarize 5 things that you have learned in the course so far.

  • While I was familiar with basic SQL statements, such as SELECT statements, I have learned more advanced statements. I have also learned how how relational databases function are designed, how databases are implemented from an Entity-Relationship Model, how normalization and denormalization can improve database performance, and how databases are physically stored on hardware.

List at least 3 questions that you still have about databases. 

  • So far we have focused on relational databases. I am interested to see NoSQL databases and how they work.
  • Related to NoSQL, I am interested in seeing examples in Big Data, how it differs from relational data, and how it is handled compared to relational data.
  • So far we have programmed SQL files, and Java replications of a database. I am interested to see how SQL and other programming languages interact in the same program.
  • I am interested in learning more about transaction management, and how database recovery is handled.

Vocabulary

Entities, Relationships, and Attributes

Entity-Relationship Model: A high-level representation of data requirements, ignoring implementation details. Includes three types of objects:

  • Entity: A person, place, product, concept, or activity.
  • Relationship: A statement about two entities.
  • Reflexive Relationship: Relates an entity to itself.
  • Attribute: A descriptive property of an entity.

Glossary: Also known as a data dictionary or repository, documents additional detail in text format.

Entity Type:  A set of things. Ex: All employees in a company.

Relationship Type: A set of related things. Ex: Employee-Manages-Department is a set of (employee, department) pairs, where the employee manages the department.

Attribute Type: A set of values. Ex: All employee salaries.

Entity Instance: An individual thing. Ex: The employee Sam Snead.

Relationship Instance: A statement about entity instances. Ex: "Maria Rodriguez manages Sales."

Attribute Instance: An individual value. Ex: The salary $35,000.


 

 

Discovery

Cardinality

Cardinality: Refers to maxima and minima of relationships and attributes.

Relationship Maximum: The greatest number of instances of one entity that can relate to a single instance of another entity.

Singular: A related entity is singular when the maximum is one.

Plural: A related entity is plural when the maximum is many.

Relationship Minimum: The least number of instances of one entity that can relate to a single instance of another entity.

Optional: A related entity is optional when the minimum is zero.

Required: A related entity is required when the minimum is above zero.

Attribute Maximum: The greatest number of attribute values that can describe each entity instance. Attribute maximum is specified as one (singular) or many (plural).

Attribute Minimum: The least number of attribute values that can describe each entity instance. Attribute minimum is specified as zero (optional) or one (required).

Unique Attributes: Each value of a unique attribute describes at most one entity instance.


Strong and Weak Entities

Identifying Attribute: An identifying attribute is unique, singular, and required. Identifying attribute values correspond one-to-one to, or identify, entity instances.

Strong Entity: Has one or more identifying attributes.

Weak Entity: Does not have an identifying attribute. Instead, a weak entity usually has a relationship, called an identifying relationship, to another entity, called an identifying entity.


Super-type and Sub-type Entities

Subtype Entity: A subset of another entity type, called the supertype entity.

Similar Entities: Entities that have many common attributes and relationships.

Partition: A partition of a supertype entity is a group of mutually exclusive subtype entities.

Partition Attribute: Each partition corresponds to an optional partition attribute of the supertype entity.


Implementing Entities


 Implementing Relationships

 

Implementing Plural Attributes

 

First, Second, and Third Normal

Functional Dependence: Dependence of one column on another.

Redundancy: The repetition of related values in a table.

Normal Forms: Rules for designing tables with less redundancy.

First Normal Form: Every cell of a table contains exactly one value. A table is in first normal form when, in addition, the table has a primary key.

Second Normal Form: A table is in second normal form when all non-key columns depend on the whole primary key.

Third Normal Form: Redundancy can occur in a second normal form table when a non-key column depends on another non-key column. Informally, a table is in third normal form when all non-key columns depend on the key, the whole key, and nothing but the key.

Boyce-Codd Normal Form

Candidate Key: A simple or composite column that is unique and minimal.

Non-Key: A column that is not contained in a candidate key.

Boyce-Codd Normal Form: A table is in Boyce-Codd normal form if, whenever column A depends on column B, then B is unique. Columns A and B may be simple or composite.

Applying Normal Form

Normalization: Eliminates redundancy by decomposing a table into two or more tables in higher normal form.  

Denormalization: Intentionally introducing redundancy by merging tables.


 

Comments

Popular posts from this blog

Week 4

Week 2

Week 1