Beruflich Dokumente
Kultur Dokumente
COURSE OUTLINE
• Higher Normalization
• Introduction to SQL
Book:
NOTE: 50% Attendance is required to appear in MID TERM Examination and 70%
for Terminal Examination.
WHAT IS DATABASE?
A shared collection of logically related data, designed to meet the information needs of
multiple users in an organization.
Databases are designed to offer an organized mechanism for storing, managing and retrieving
information. They do so through the use of tables. If you’re familiar with spreadsheets like
Microsoft Excel, you’re probably already accustomed to storing data in tabular form.
To access information from a database, you need a database management system (DBMS).
This is a collection of programs that enables you to enter, organize, and select data in a
database.
• Data Consistency:
• Redundancy is linked with the consistency. If data is updated at one place will
have effect on all the linked concerned departments. So data will be
consistent. e.g. if the address of the student is changed all the concerned
department like Accounts, Admission, Computer and store Departments have the
effect of change.
• Sharing of Data:
• Improved Security:
• Enforcement of Standards:
• Economy of Scale:
• Increase Productivity:
• Improved Maintenance:
• Increase Concurrency:
• Multiple users are allowed to access the same data.
• Size
• Cost of DBMS
• Cost of Conversion
• Performance
COMPONENTS OF DBMS
All modern DBMS’s contains the following components.
• File Manager:
• The component that handles all the files creation, record-insertion, and
modification is called files manager.
• 4GL:
• It is the most modern feature of DBMS for report writing and screen
designing.
• This utility allows formatted reports and screen derived from one or more
database tables to be easily produced without complex code.
• The standard reports, screens and forms can be defined and kept in library and
inserted in required programs, thus further reducing programming efforts.
• INGRES and ORACLE Developer 2000 are well-known set of 4GL utilities.
• The databases are equipped with the tools allows the database designer to draw
entity relationship diagram (ERD) interactively using graphics facilities, and thus
to develop the database schema and make changes where necessary.
ANSI/SPARC Model
• Database Task Group in 1971 give two level model for the standardization of database
system architecture which was refined by the Standard Planning and Requirements
Committee (SPARC) of ANSI in 1975.
• Users that is end users and application programmers, both operate at the external level
interact with the data by mean of a data sublanguage, which consist of two
components, a data definition language (DDL) and data manipulation language (DML).
The data sublanguages are embedded in a host language.
• The aim of the three schema architecture is the separation of the user applications
from the physical database. Physically the data is only existent on the internal level
while other forms of representation are calculated or derived respectively if needed.
• The DBMS has the task to realise this representation between each of these levels.
• Manages Information
Data are actually stored as bits, or numbers and strings, but it is difficult to work with
data at this level.It is necessary to view data at different levels of abstraction.
Schema:
Description of data at some level. Each level has its own schema.
• physical,
• conceptual, and
• external.
The physical schema describes details of how data is stored: files etc.
• In the relational model, the conceptual schema presents data as a set of tables.
• The DBMS maps data access between the conceptual to physical schemas
automatically.
The external view level is closest to the users. It is concerned with the way the data is viewed by
individual users. You can say that external level is the individual user level. A user can either be
an application programmer or an end-user, but DBA is an important special case.
The external level consist of many different external views of database. Each external view
describes that a particular user group is interested in and hides the rest of the database from
that user group. In addition, different views may have different representations of the same data.
For example, one user may view date in the form (day, month, year).. while another may view
date as (year, month, day).
The external views are defined by means of external schemes, which are written in the data
definition language (DDL). Usually, the DBA writes an external schema to create a user view.
Each user's view. An external record is a record seen by a particular user (a part of his external
view). Actually, an external view is a collection of external records.
The external schemes are compiled by the DBMS and store in its data dictionary. The DBMS
uses the external schema created for a specific user, to create a user interface to access the
database
SQL Constraints
SQL constraints are used to specify rules for data in a table.
INDEX - Used to create and retrieve data from the database very quickly
Mappings:
Mappings define the correspondence between different levels of schemas which means that
three levels of schemas communicate through mappings. The DBMS is responsible for
communication between these three types of schemas. The DBMS must check that all external
schemas are derivable form conceptual schemas and it must use the information in conceptual
schema to map between each external schema and the internal schema.
These mappings are the key to the provision of logical and physical data independence.
• The understanding of nature of the problem and the constraints and outline feasibility
is performed using any system analysis methodology.
• ERDs are drawn at early stages to find the requirement of the database and to
understand the processing. The entities, their attributes, relationships, Primary
and Foreign Keys specification etc. are decided at this stage.
• Normalization:
• It is the process of converting the complex data structure into stable and small one.
• Some splitting and even recombination of entity types may result from normalization.
• Tables Creation:
• SQL create table command is used to create the table and to apply the
constraints and to specify the primary and foreign keys.
• Query Design:
• Screen Design:
• Designing of the screens to create the input output interfaces, required by the user
applications.
• Report Design:
• Reports are very important and are used in almost all the business applications.
• Testing:
• All the important queries, inputs and update screens and report programs are tested
for the correctness of database schema and the viability of the system as a whole.
• Hand Over: This is the stage where user receives the finished database applications and
starts the data entry.