Escolar Documentos
Profissional Documentos
Cultura Documentos
Field
Record
File
Database
A Database is a collection of stored operational data used by the application systems of some particular enterprise (C.J. Date)
Paper Databases
Still contain a large portion of the worlds knowledge
DBMS Benefits
Minimal data redundancy Consistency of data Integrity of data Sharing of data Ease of application development Uniform security, privacy, and integrity controls Data accessibility and responsiveness Data independence Reduced program maintenance
Database Systems
Types of Database Systems
Number of Users
Single-user
Desktop database
Multiuser
Workgroup database Enterprise database
Scope
Database Systems
Use
Transactional (Production) Decision support Data warehouse
Physical representation and location of data and the use of that data are separated
The application doesnt need to know how or where the database has stored the data, but just how to ask for it Moving a database from one DBMS to another should not have a material effect on application program Recoding, adding fields, etc. in the database should not affect applications
File: A collection of records or documents dealing with one organization, person, area or subject (Rowley)
Manual (paper) files Computer files
Database: A collection of similar records with relationships between the records (Rowley)
Bibliographic, statistical, business data, images, etc.
Program-Data Dependence
All programs maintain metadata for each file they use
Duplication of Data
Different systems/programs have separate copies of the same data
Each application programmer must maintain his/her own data Each application program needs to include code for the metadata of each file Each application program must have its own processing routines for reading, inserting, updating, and deleting data Lack of coordination and central control Non-standard file formats
Two different types of people (users and practitioners) are concerned with the database. Users
who need information from the database to carry out their primary business responsibility e.g. Executives, managers, staff, clerical personnel
Waste of space to have duplicate data Causes more maintenance headaches The biggest problem:
Data changes in one file could cause inconsistencies Compromises in data integrity
Practitioners people responsible for the database system and its associated application software.
e.g. Database administrators, analysts, programmers, database and system designers, information systems managers.
Practitioners (analysts and database designers) in consultation with users identify data needs and design database structures to accommodate these needs. The database structures are specified to the DBMS through the data dictionary.
Users enter data into the system by following 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.
DBMS
An application software that organises data into records in one or more databases and allows organising, accessing and sorting of the data in a variety of formats.
Invoicing System
DBMS
Central database Contains employee, order, inventory, pricing, and customer data
Payroll System
DBMS manages data resources like an operating system manages hardware resources
Graphical displays turn data into useful information that managers can use for decision making and interpretation
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.
Metadata
Metadata: data that describes the properties and context of user data 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, misinterpreted or erroneous.
Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and data context
E.g.
Data Item Value Name Type Length Min Max Description Name Character 30 Employee Name ID Number 9 Employee No. DeptCharacter 10 Dept. No. Age Integer 2 18 60 Employee Age Character Number 15 9 Dept. Name Mgr. Emp. No.
Name Manager
Data Security
Access is often controlled by passwords and by data views, which are definitions of restricted portions of the database.
Data Integrity
The integrity and consistency of the database are protected via constraints on values that data items can have and by backup and recovery capabilities provided within the DBMS. Data constraint definitions are maintained in the data dictionary.
Backup and recovery are supported by software that automatically logs changes to the database and provides for a means of recovering the current state of the database in case of system failure.
Department Databases
department is a functional unit of an organisation. It is larger than a workgroup. Department databases are designed to support the various functions and activities of a department. E.g. a personnel database that is designed to track data concerning employees, jobs, skills and job assignments.
Enterprise Databases
An enterprise is one whose scope is the entire organisation or enterprise. Such databases are intended to support organisation-wide operations and decision making. E.g. a large health care organisation that operates a group of medical centre's including hospitals, clinics and nursing homes.
Marketing
Sales Advertising
Accounting
Accounts Receivable Accounts Payable
Accounting
Corporate Database
Marketing
Purchasing
3 Levels
External
Conceptual
Logical Data Model
Physical
Physical data Model
Conceptual Schema
defines the logical view of data
as seen by all users and programs
3 Level Architecture
user a user i/program j
program x
Physical View
The DBMS must know
exact physical location precise physical structure Employee record
A.B.C. De Silva
database
Physical View
Physical view provides the disk drives, physical addresses, indexes and pointers. Physical Database Design is the responsibility of the Database Administrator (DBA). No user is concerned with this view.
Physical devices to contain the data Access methods to retrieve and update data maintain and improve database performance
Logical View
The user/application must know
existence logical reference
NID 650370690V
database
Employee
Name A.B.C. De Silva
Logical View
This is a single logical description of all data elements and their relationships. It is the result of the conceptual design which involves analysis of all users information needs and data definition of data items needs to meet them. SQL CREATE TABLE statement is used to define the data elements.
External View
The user/application see
authorised data own format database
Lecturer
Name A.B.C. De Silva Department Dept. of Computer Science Age 35
External View
This consists of user views of the database. Each definable user group will have its own view of the database. Each of these views gives a useroriented description of the data elements and relationships of which the view is composed.
User View
A logical description of some portion of the database that is required by a user to perform some task. E.g. Benefit application user will view part of the employee data, excluding data such as date of birth and salary.
External View
It can be derived directly from the conceptual schema. The collection of all user views is the external level. SQL CREATE VIEW statement is used to create these views and SQL GRANT statement is used to restrict its use to a user group.
Function of a DBMS
Functions of a DBMS are concerned with providing efficient flexible data processing capabilities without compromising data validity. Main Functions are:
Shared data Control redundancy Data integrity Data security
Advantages
Program-data independence Minimal data redundancy Improved data consistency Improved data sharing Increased productivity of application development Enforcement of standards Improved data quality Improved data accessibility and responsiveness Reduced program maintenance
Data files are integrated into a single, logical structure. Each primary fact is recorded (ideally) in only one place in the database. E.g. Employee data not with the payroll and benefit files. Note: Data redundancy is not eliminated entirely. Some data items will appear in more than one place (e.g. employee no.) to represent the relationship with others.
By eliminating (or controlling) data redundancy, we greatly reduce the opportunities for inconsistency. E.g. employee address is stored only once and hence we cannot have disagreement on the stored values. Also, updating data values is greatly simplified and have avoid the wasted storage space.
Database designers can specify integrity constraints that are enforced by the DBMS. One of the objectives of a data warehouse environment is to clean up operational data before they are placed in the data warehouse.
Disadvantages
DBMS are more vulnerable than filebased system because of the centralised nature of a large integrated database. If a failure occurs the recovery process is more complex and some times may results in lost transactions. Hardware, software and personnel cost are higher for DBMS.
PC Databases
Centralized Databases
Central Computer
Distributed Databases
Location C
Location B
computer
computer
computer
Location A
Homogeneous Databases
Distributed Databases
Heterogeneous Or Federated Databases Database Server Client
Remote Comp.
TYPES OF DATABASE
The problem arising from the traditional file environment approach brought forward the development of DBMS i.e.
DBMS provided solutions by eliminating these problems and Amity Business School providing with the following advantages :
1. 2. 3. 4. Reduced complexity of systems environment. the organizations information
Reduced data redundancy & inconsistency Improved maintenance costs. Increased access & availability of data & information.
DATA MODEL : It defines the way data are conceptually structured. TYPES OF DATA MODEL A) Hierarchical Database Model : In this particular model, the database is arranged logically in an inverted tree pattern such that each database has only one owner. For example, Management hierarchy in an organization
MANY EMPLOYEES BUT ONE MANAGER AT EACH LEVEL : Searching is fast & efficient in hierarchical database model.
B) Network Database Model : Amity Business School It creates relationships among data through a linked list structure in which subordinate records or members can be linked to more than one data element called an owner. With this network approach, a member record can be linked to an owner record & at the same time, itself can be an owner record linked to other sets of members. A network model places no restrictions on the number of relationships or sets in which a field can be involved, thus, it is more consistent with real-world business relationships, for example,
c) Relational Database Model : Amity Business School It is based on the simple concept of tables in order to capitalize on characteristics of rows & columns of data. In a relational database, these tables are called relations, besides this, each row of data is equivalent to a record and each column of data is equivalent to a field.
NAME Smith A. Jones W. Lee J. Durham K. TITLE Dir. Accounting Dir. Total Quality Management Dir. I.T. Manager, Production AGE 43 32 46 35 DIVISION CHINA STERNWARE CHINA STERNWARE
Definition
Major Objectives
Location Transparency
User does not have to know the location of the data Data requests automatically forwarded to appropriate sites
Local Autonomy
Local site can operate with its database when network connections fail Each site controls its own data, security, logging, recovery
Disadvantages of Distributed Database Compared to Software cost and complexity Centralized Databases Processing overhead
Data replication
Horizontal partitioning
Different rows of a table distributed to different sites
Vertical partitioning
Different columns of a table distributed to different sites
Amity : Business School Multidimensional Database Model In this model, the data are intimately related & can be viewed & analyzed from different perspectives or dimensions. These dimensions represent the primary views of business data, for example,
Multidimensional Model
Sales Volumes
Dealership
Data Definition Language: Amity Business School The data definition language defines what types of information are in the database & how they will be structured. It is essentially the link between the logical and physical structures of the database. LOGICAL : the way the user views data PHYSICAL : the way the data is physically stored. It defines the physical characteristics of each record. a) the fields within the record b) Each fields data type c) Each fields length & logical name
Data Manipulation Language : Amity Business School The data manipulation language allows users to retrieve, sort, display & delete the contents of a database & for this very purpose QUERY LANGUAGES are used.
QUERY LANGUAGE : A query language is a set of commands for creating, updating & accessing data from a database.
One of the most popular forms of query language is SQL or Amity Business School STRUCTURED QUERY LANGUAGE. SQL offers the ability to perform complicated searches with relatively simple statement such as SELECT - to specify a desired attribute. FROM to specify the table to be used WHERE to specify conditions to apply in the query. For example, SELECT Name, Address, City State, PIN FROM Customer WHERE State = MH The result would be a list of the names & addresses of all customers located in Maharashtra.
Data Dictionary : Amity Business School The data dictionary stores definitions of data elements i.e. fields & data characteristics such as individuals, business functions programs & reports that use the data elements as well as the physical representation, responsible parties in the organization i.e. data owners & security. Because the data dictionary provides standard definitions for all data elements, the potential for data inconsistency is reduced. In addition, it provides for faster program development because programmers do not have to create new data names. Data dictionaries also make it easier to modify data & information.
Data Warehouses : A data warehouses is a relational or multidimensional DBMS designed to support management decision making. Data warehouses are oriented around the major business subjects of the enterprise, such as customer, vendor, product or activity. The data in the warehouse are stored in a single, agreed upon format which provides business users with a Customer centre view of the companys heterogeneous data. It provides added value to the companys customers by allowing them to access better information.
Data Marts : Amity Business School A data-mart is a scaled-down version of a data warehouse that focuses on a particular subject area. It is designed to support the unique business requirements of a specific department or business process. A company can have many data marts, each focused on a subset of the entire firm. Because of its reduced scope, a data mart takes less time to build, costs less and is less complex than an enterprise data warehouse. Therefore, a data mart is appropriate when a company needs to improve data access in a targeted area, such as the marketing department.
Data Mining :
Data mining provides a means of extracting previously unknown, predictive information from the base of accessible data in data warehouses. Data mining tools use sophisticated, automated algorithms to discover hidden patterns, correlations & relationships among organizational data. These tools are used to predict future trends & behaviors, allowing businesses to make proactive, knowledge driven decisions.
Amity Business School For example, one typical predictive problems is targeted marketing. Data mining can use data on past promotional mailings to identify the targets most likely to maximize the return on the companys investment in future mailings.
Definition
Major Objectives
Location Transparency
User does not have to know the location of the data Data requests automatically forwarded to appropriate sites
Local Autonomy
Local site can operate with its database when network connections fail Each site controls its own data, security, logging, recovery