Professional Documents
Culture Documents
Record: Describes an entity Entity: Person, place, thing on which we store information
Attribute: Each characteristic, or quality, describing entity E.g. Attributes Date or Grade belong to entity COURSE
A computer system organizes data in a hierarchy that starts with the bit, which represents either a 0 or a 1. Bits can be grouped to form a byte to represent one character, number, or symbol. Bytes can be grouped to form a field, and related fields can be grouped to form a record. Related records can be collected to form a file, and related files can be organized into a database.
Problems with the traditional file processing (files maintained separately by different departments)
Data redundancy and inconsistency
Data redundancy: Presence of duplicate data in multiple files Data inconsistency: Same attribute has different values
Program-data dependence: Lack of flexibility Poor security Lack of data sharing and availability
Database:
Collection of data organized to serve many applications by centralizing data and controlling redundant data
Analyst
Application Program
Application Program
DBMS DATAB ASE
Terminals
User Computer PRINTER
6.6
in consultation with users identify data needs and design database structures to accommodate these needs.
The database structures are specified to the
6.7
specified procedures. The entered data are maintained on hardware media such as disks and tapes. Application programmes that access the database are written by practitioners and users to be run on computers.
6.8
software
General-purpose database management software like operating system. Application software that uses DBMS facilities to manipulate the database to achieve a specific business function, such as providing reports or documents, which can be used by users.
6.9
standard programming language such as C, or it may be written in a language (commonly called a fourth-generation language) supplied with the DBMS.
These programs utilise the command language
of the DBMS and make use of the information contained in the data dictionary.
6.10
User Interface
Language, menus and other facilities by which users interact with various system components, such as application programs, the DBMS
tools
6.11
definitions of all data items in the database. relationships that exists between various data structures. indexes that are used to access data quickly. screen and report format definitions that may be used by various application programs.
6.12
13
Data Dictionary
includes:
6.13
Metadata
Data that describe the properties or characteristics of other data.
Some of these properties include data definitions, data structures and rules or constraints. Item name, the data type, length, minimum and maximum allowable values (where appropriate) and a brief description of each data item. Metadata allow database designers and users to understand what data exist, what the data mean. Data without clear meaning can be confusing, 14 misinterpreted or erroneous.
Metadata
E.g.
Data Item Name Type
Name ID Dept Age Character Number Character Integer
18
60
who need information from the database to carry out their primary business responsibility
6.16
responsible for the database system and its associated application software.
e.g. Database administrators, analysts, programmers, database and system designers, information systems managers.
6.17
in consultation with users identify data needs and design database structures to accommodate these needs.
The database structures are specified to the
6.18
A single human resources database provides many different views of data, depending on the information requirements of the user. Illustrated here are two possible views, one of interest to a benefits specialist and one of interest to a member of the companys payroll department.
Figure 6-3
Relational DBMS
Represent data as two-dimensional tables called relations or files Each table contains data on entity and attributes
A relational database organizes data in the form of two-dimensional tables. Illustrated here are tables for the entities SUPPLIER and PART showing how they represent each entity and its attributes. Supplier_Number is a primary key for the SUPPLIER table and a foreign key for the PART table.
Figure 6-4A
Figure 6-4B
SQL
Is a language used to Operate on a Relational DBMS: Three basic operations used to develop useful sets of data SELECT: Creates subset of data of all records that meet stated criteria
JOIN: Combines relational tables to provide user with more information than available in individual tables
PROJECT: Creates subset of columns in table, creating tables with only the information specified
The select, project, and join operations enable data from two different tables to be combined and only selected attributes to be displayed.
Figure 6-5
Figure 6-6
The sample data dictionary report for a human resources database provides helpful information, such as the size of the data element, which programs and reports use it, and which group in the organization is the owner responsible for maintaining it.
Illustrated here are the SQL statements for a query to select suppliers for parts 137 or 150. They produce a list with the same results as Figure 6-5.
Figure 6-7