You are on page 1of 5

Prof.

DG JHA
Database Concepts
The Automation Process

The organization needs a cost-effective solution that will support latest revenue
enhancing renovation in production and customer service. And, in this direction
they are convinced that automation will reduce production cost and achieve greater
customer satisfaction. The automated system has definite advantages (as compared
to manual system) like:
Cycle time for information retrieval is reduced
Information can be stored, without any deterioration over a long period of time
A small workforce is required for updating information
Easy storage of voluminous information as information can be stored at
centralized location
Data redundancy is minimized
The system is person independent
Main Elements of Database System

Database
Tables
Queries
(A file can be referred to as the collection of information when stored. Every file is
identified by a file name. Any collection of data can be represented in a structure
called a table
Customer_Table
CustCode
Name
Address
Tel_no
A table is a structure in which data is stored in rows and columns. The columns are
referred to as fields and rows are referred to as records. A database is an organized
collection of tables. Besides tables, a database consists of objects such as views,
indexes and stored procedures.)
A query is a set of instructions that retrieves and displays data from a database.
A view is a virtual table whose contents are defined by a query.
A stored procedure is a set of pre-compiled query statements stored on the database
server

Forms (Forms present the data from a table or a query in the way that users
wants to represent)
Reports (Reports can be referred to as a formatted display and normally consists
of three components header, body or content, footer)
Macros (Macros provide an easy, effective method for automating many
database task. Macros can be used for everythingright from displaying
messages to validating data entered into the record before it is saved)

50

Modules (Modules are container of any programming code written in a


database. Forms and reports can be examples of modules)
Relationship (Relationship is an association between two tables)

DataBase Management System (DBMS)

A collection of interrelated data and a set of programs that control the


organization, storage and retrieval of data from a database is referred to as
DataBase Management System (DBMS).
A DBMS is used to add, modify and extract data from a database. The DBMS
accepts requests for appropriate data from clients and transfers data back to
client.
The primary goal of a DBMS is to provide an environment that is both
convenient and efficient to use.
The database system must provide for the safety of information stored, despite
the system crashes or attempts at unauthorized access.

Relational DataBases

All data cannot exist in the same table, as information retrieval would become
difficult and time consuming. Data therefore needs to be stored in different
tables as per the requirements and these tables need to be related to each other.
The relational method for storing data was first proposed by E.F.Codd and is
based on the principles of relational theory where data is stored in the form of
tables. The databases that use relational method for storing data are referred to
as relational database.
Relational databases do not link the records physically. In such database, the tables
provide a common field to help match the rows.
Relational databases can use multiple tables to store information. The data in
these tables is then related to provide information. This method is suitable for
large applications and is very flexible for ad-hoc queries.
Most databases now use the relational method for storing data. A DBMS that
uses relational method for storing data is known as Relational DataBase
Management System (RDBMS)
RDBMS is set of program that helps to create, update and administer a
relational database. An RDBMS takes query statements entered by the user or
contained in an application program. It then creates, updates or provides access
to the database as per the query.

The relational theory uses different terminology to refer to tables:


A table is also known as a relation
A row is known as tuple
The number of rows (tuples) is known as cardinality
A column is known as an attribute
The number of columns (attributes) is known as degree

51

Keys that RDBMS support

A key is used to either identify unique instances of entities in a table or to set the
relationship between tables. A key could be a single column or set of columns.
The various keys that an RDBMS support are
Primary Key
Foreign Key
Composite Key
Candidate Key
A table has a column or set of columns whose values uniquely identify an
instance in a table. The column or set of columns that stores these values is
known as Primary key.
The restrictions for primary keys are:
Only one primary key can be defined per table
A primary key cannot contain NULL value (NULL indicates that no value
has been entered for a column and it implies that the value is either
unknown or undefined)
.
In an RDBMS, two tables can be linked using a Foreign key. A foreign key is a
column or set of columns whose value matches the primary key value of another
table.
A foreign key ensures that all values present in a foreign key column are listed in
the corresponding primary key of the other table. This key maintains the
relationship between two tables.
A foreign key is used to maintain referential integrity. Referential integrity
specifies that if a column is defined as foreign key, the validation of this column
happen automatically against the table to which it has reference. The foreign key
preserves the defined relationship between table when data is deleted, modified
or inserted.
A Composite key is composed of two or more columns. This combination of
columns uniquely identifies an instance in a table. If a primary or a foreign key
is composed of two or more columns, it is referred to as a composite primary key
or a composite foreign key respectively.
A table can have only primary key. However, a table can have multiple columns
that store unique values. These columns are referred to as candidate key columns.
These candidate key columns can also qualify as primary keys.

52

Data Models

The models are used in describing data at the logical and view levels. The three most
widely accepted data models are the relational model, network model, and
hierarchical model.

Relational Model: - The relational model uses a collection of tables to represent


both data and relationships among those data. Each table multiple columns, and
each column has unique name. Relational databases do not link the records
physically. In such database, the tables provide a common field to help match the
rows. It does not use pointers or links.
Network Model: - Data in the network model are represented by collection of
records, and relationships among data are represented by links, which can be
viewed as pointers. The records in the database are organized as collection of
arbitrary graphs.

Hierarchical Model: - The hierarchical model is similar to network model in the


sense that data and records and links represent relationships among data,
respectively. It differs from network model, here the record are organized as
collection of trees, rather than arbitrary graphs.

53

Factors Determining the database performance

To determine how Maintainability of database affects its performance Imagine,


a bank has one table to record all customers and transaction details and
therefore it results in data redundancy. More often as the complexity of
operations increases, rules need to be implemented on the table. For example, a
rule of minimum balance of Rs. 500 in each account needs to be implemented. In
this case, it would be difficult to implement this rule, as all records in the table
would be affected. It would help bank, if they normalize database and split the
data into Customer and Transaction table. This would ensure that whenever a
rule is added or altered, only the required tables are modified. This would
enhance the maintainability of the database. Also, reducing the size of database
will reduce the time taken to backup and restore the database.

Note:
The backup and restore component provides safeguard for protecting critical data
stored on database servers. Backing up and restoring a database involves complete
restoration of data over a wide range of potential system problems.

Another factor that affects the performance of database is the Availability of the
database. Availability of the database can be determined by the server downtime
and data availability to the user. To make data readily available, views on tables
can be created from which data is frequently retrieved. For an effectively
normalized database, the time taken to implement changes would be minimum
resulting in reduction of server downtime.
Effective normalization also enables database Scalability. Scalability describes
the level of database performance when the number of users or transactions
increases. A scalable database readily responds to increased user demands and
there is no apparent delay in server response time.
An effectively normalized database enables adding new tables, creating views
and changing business rules. This makes the database Extensible, thereby
enabling implementation of changes and enhancements with minimum effort. An
extensible database also ensures that implementing changes has minimum effect
on the rest of the database structure.
One of the functions of the effective design is to secure data by preventing
certain users from accessing highly sensitive data. The database design enforces
the concepts of creation of views on the tables, grant and revoke permissions to
implement Security checks.

54

You might also like