ThePlace

Home ] Search ] Resources ] Site Map ] Contact Me ]
Dave's Information Technology Resource

Up ]

What are Databases? ] Relational Databases ] [ Data Modeling ] Designing and Implementing Databases ] Creating Database Applications ]

--- Data Modeling ---

 

Data modeling is the process used to design a database.  It is essential to completely understand the information that is to be stored in a database in order to access and use that information.

The purpose of a database is to store information about "things" which include people, equipment, and books.  Databases usually store information about objects that are somehow related, for example: students, classes, and instructors.  These objects are called entities.  For example, a school database could contain 2000 entities called students, 300 entities called classes, and 120 entities called instructors. 

The “entity class” is an abstract description, that is, it describes the kind of information for that object (entity) in the database.  The actual data is called an “entity set” and includes the names, addresses and so forth of all of the students in the entity.

Entities have attributes that describe the characteristics of entities.  For example, the attributes of a student entity might include:

bullet

 Student ID

bullet

 Last Name

bullet

 First Name

bullet

 Address

bullet

 City

bullet

 State

bullet

 Zip

bullet

 Phone

The purpose of attributes are:

  1. To define the information we are collecting in the database.

  2. To uniquely identify individual entities.

  3. To define relationships between entities.

The key thing to remember is that some attribute or combination of attributes should uniquely identify each entity in the set.

Keys are used to identify attributes that make a particular entity unique.  Keys can consist of single attributes or a combination of attributes.  For example, a “studentid” would be the key to a students entity while a courses entity might require a “studentid” and “courseid” for a key.

Keys come in a variety of flavors:

bullet

 Superkeys – an attribute or attributes that is/are undeniably unique. 

bullet

 Candidate keys – attributes that could be used as keys.

bullet

 Primary key – the attribute or attributes that is/are chosen for the key to a particular entity.

Entity Relationships

Consider the following diagram model…

 

 

This is an entity-relationship diagram (also known as a semantic diagram).  It is used to illustrate the interactions between attributes, entities, and entity classes.  Note the “1” and “many” designations showing the numerical relationships between entities (e.g., many books can have many authors, but each book has one publisher).

A Review of Key Terms

A glossary of essential terms so far:

bullet Entity – an object about which the database is designed to store information, e.g., a “student”, made up of the student identification, name, and address.
bullet Attribute – a property or characteristic of an entity, e.g., the “name” of a student.
bullet Entity class – an abstract group of entities with a common description, e.g. all of the students in the world (but not necessarily in this database).
bulletEntity set – the set of entities from an entity class in the current database, e.g., the students who attend this university.
bullet Superkey – a set of attributes for an entity class that serves to uniquely identify an entity from all other entities in the same class.
bulletKey – The minimum superkey (if this is removed, it is no longer a key).
bulletTable – A two-dimensional array in which columns hold the attributes and rows hold the data.
bullet Field – physical implementation of the attribute.
bulletTable Scheme – the set of all attributes for an entity class.
bulletRelational Database – the finite set of tables that define a particular data set.

Notice that “entity”, “entity class”, and “entity set” are three different, although arguably related, terms that are often referred to collectively as simply “entity”.

For simplicity, consider the following:

Design

Implementation

Entity

Record

Entity Set

Entire Table of Records

Attributes

Fields

The column on the left includes the terms used to design a database while the terms on the right are most often used during database implementation.

 

 

Home ] Up ] Computer Architecture ] Programming Bootcamp ] Visual BasicS ] Web Basics ] Web Multimedia ] Web Programming ] Advanced Web Topics ] Developing Web Sites ] XML Technology ] Web Glossary ]

Copyright © 1999 - 2005 
ThePlace - Written and Sponsored by Dave Hillman