Every organization has some information needs. A library keeps a list of members, books, due dates, and fines. A company needs to save information about employees, departments, and salaries. These pieces of information are called data.
Organizations can store data on various media and in different formats, such as a hard-copy document in a filing cabinet or data stored in electronic spreadsheets or in databases.
A database is an organized collection of information.
To manage databases, you need a database management system (DBMS). A DBMS is a program that stores, retrieves, and modifies data in databases on request. There are four main types of databases: hierarchical, network, relational, and (most recently) object relational.
Components of the Relational Model
• Collections of objects or relations that store the data
• A set of operators that can act on the relations to produce other relations
• Data integrity for accuracy and consistency
For more information, see An Introduction to Database Systems, Eighth Edition (Addison-Wesley: 2004), written by Chris Date.
Definition of a Relational Database
A relational database uses relations or two-dimensional tables to store information.
For example, you might want to store information about all the employees in your company. In a relational database, you create several tables to store different pieces of information about your employees, such as an employee table, a department table, and a salary table.
Data Models
Models are a cornerstone of design. Engineers build a model of a car to work out any details before putting it into production. In the same manner, system designers develop models to explore ideas and improve the understanding of database design.
Purpose of Models
Models help communicate the concepts that are in people’s minds. They can be used to do the following:
In an effective system, data is divided into discrete categories or entities. An entity relationship (ER) model is an illustration of various entities in a business and the relationships among them. An ER model is derived from business specifications or narratives and built during the analysis phase of the system development life cycle. ER models separate the information required by a business from the activities performed within a business. Although businesses can change their activities, the type of information tends to remain constant. Therefore, the data structures also tend to be constant.
Benefits of ER Modeling
ER Modeling (continued)
Key Components
ER Modeling Conventions
Entities
To represent an entity in a model, use the following conventions:
Relationships
| Symbol | Description |
|---|---|
| Dashed line | Optional element indicating “maybe” |
| Solid line | Mandatory element indicating “must be” |
| Crow’s foot | Degree element indicating “one or more” |
| Single line Degree | element indicating “one and only one” |
ER Modeling Conventions (continued)
Relationships
Each direction of the relationship contains:
Unique Identifiers
A unique identifier (UID) is any combination of attributes or relationships, or both, that serves to distinguish occurrences of an entity. Each entity occurrence must be uniquely identifiable.
Relating Multiple Tables
Each table contains data that describes exactly one entity. For example, the EMPLOYEES table contains information about employees. Categories of data are listed across the top of each table, and individual cases are listed below. Using a table format, you can readily visualize, understand, and use information.
Because data about different entities is stored in different tables, you may need to combine two or more tables to answer a particular question. For example, you may want to know the location of the department where an employee works. In this scenario, you need information from the EMPLOYEES table (which contains data about employees) and the DEPARTMENTS table (which contains information about departments). With an RDBMS, you can relate the data in one table to the data in another by using the foreign keys. A foreign key is a column (or a set of columns) that refers to a primary key in the same table or another table.
You can use the ability to relate data in one table to data in another to organize information in separate, manageable units. Employee data can be kept logically distinct from department data by storing it in a separate table.
Relating Multiple Tables (continued)
Guidelines for Primary Keys and Foreign Keys
Terminology Used in a Relational Database
A relational database can contain one or many tables. A table is the basic storage structure of an RDBMS. A table holds all the data necessary about something in the real world, such as employees, invoices, or customers.
The slide shows the contents of the EMPLOYEES table or relation. The numbers indicate the following:
Terminology Used in a Relational Database (continued)
Properties of a Relational Database
In a relational database, you do not specify the access route to the tables, and you do not need to know how the data is arranged physically.
To access the database, you execute a structured query language (SQL) statement, which is the American National Standards Institute (ANSI) standard language for operating relational databases. The language contains a large set of operators for partitioning and combining relations. The database can be modified by using the SQL statements.
Class-3 Finished. To Be Continued...
Main Author:
copyright issue: i get a copy as an Oracle certified professional (OCP) and can use for training course purpose.