C175 Ch.2

verickle's version from 2017-08-21 19:39

Data Model Basic Building Blocks

Question Answer
AttributeA characteristic of an entity.
RelationshipDescribes an association among entities.
Constraint Arestriction placed on the data.
One-to-many (1:M or 1..*) relationshipA painter creates many different paintings, but each is painted by only one painter.
Many-to-many (M:N or *..*) relationshipAn employee may learn many job skills, and each job skill may be learned by many employees.
One-to-one (1:1 or 1..1) relationshipA retail company's management structure may require that each of its stores be managed by a single employee. In turn, each store manager, who is an employee, manages only a single store.

Data Models

Hierarchica l: Consists of a collection of records and constraints that each child record has only one parent. It is based on an upside-down tree structure in which each record is called a segment.
Question Answer
RelationalStores data and processes queries. It is based on mathematical set theory and represents data as independent relations.
Object-orientedAllows a user to define the schema and retrieve data from the database. It is a data model whose basic modeling structure is an object.

Relational Terminology

Question Answer
EntityIt is a "thing" or "object" in our environment that we want to keep track of.
RecordIt is a collection of related data items.
AttributeIt is a property of, a characteristic of, or a fact that we know about an entity.
FieldThe fact is represented as a column.
Entity setIt is a collection of entities of the same type.
FileIt is an entire structure.