PharmaSoftSQL Architecture and Design

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Rivotek Kenya Ltd.

PharmaSoft

©
PharmaSoft
SYSTEM ARCHITECTURE AND DESIGN

PharmaSoft©:
Rivotek Kenya Ltd. PharmaSoft Architecture and Design

Introduction. ....................................................................................................................... 2
Application Design. ............................................................................................................. 2
Microsoft Visual Basic ..................................................................................................... 3
Microsoft SQL Server ...................................................................................................... 4
Software Deployment Details ......................................................................................... 6
Crystal Reports............................................................................................................ 6
SQL Server 2005......................................................................................................... 6
Additional Pharmasoft Tools .......................................................................................... 8
Database Manager ....................................................................................................... 8
Tracker ........................................................................................................................ 8
TransferSQL ............................................................................................................... 8
Glhist ........................................................................................................................... 8
System requirements ....................................................................................................... 9
Importance of Stable Hardware and Network Environment............................................ 10

PharmaSoft©: Architecture and Design 1


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

Introduction.

PharmaSoft is a financial and stock control software designed for the pharmaceutical industry covering
retail chemists, wholesalers, distributors, hospital pharmacy units and clinics

PharmaSoft system modules cover the following business areas

1) Stock Control
2) Debtors Management
3) Creditors Management
4) Banking and Cash Management
5) Sales
6) Purchases
7) Financial Accounting

Application Design.

PharmaSoft is a locally developed software application designed with the following key strengths.

• Customizable
• Industry specific
• Stable
• Scalable
• Easy to use
• User friendly
• Multi-User
• Multi-Branch
• Flexibility with Windows O/S

Challenges

• Learning Curve may be high due to its highly customizable nature and provision of many
options to execute tasks.
• Deployment is not plug and play and requires proper definition of business
requirements. System setup may be lengthy
• Customisation of Crystal Reports is lengthy as each report has to be connected to the
source (No central definition)
• Not adequately positioned and benchmarked against other ERPs and accounting
packages despite its popularity, robustness and practical fit for the local market.

PharmaSoft©: Architecture and Design 2


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

The development tools used in building Pharmasoft are the following:

 Microsoft Visual Basic


 Microsoft SQL Server relational database.
 Crystal Reports 8.0

Development Tools
(Front End) (Report Writer)
Visual Basic Crystal Reports

ODBC Drivers

(Networking Layers) NT Server

(Database Engine) SQL Server

Microsoft Visual Basic

This is a rapid application development tool that allows design of a user interface to access data from a
database in a multi-tier application. The components are as follows:

 A client component usually residing on local workstations containing the user interface
 Business logic components that implement various broad areas of business rules
 Business data access components that mediate between the business logic components and the
data services component
 A data services component that provides data to the data access components

In the context of the development, the data access components are typically COM components that
expose one or more data aware classes as either of the following.

 An activeX EXE (an put of process component) running on a server


 An activeX DLL (an in process component) running on a server.

PharmaSoft©: Architecture and Design 3


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

An important consideration when implementing the individual data manipulation facilities is that some
are located with the data itself. In the SQL Server environment therefore, this takes the form of stored
procedures and triggers

Microsoft SQL Server

Microsoft SQL Server is a sophisticated enterprise-class database that is priced, positioned, and
distributed to reach everyone from small to very large organizations. Historically, and until Microsoft
entered this market, databases that delivered features similar to those of SQL Server cost an order of
magnitude more, even for configurations with just a few users. Now this database technology has opened
a new world of business information for customers in the middle market.

In a single-user database, users can read and modify data without worrying about other users changing
data at the same time. In high-volume multi-user databases, such as Microsoft SQL Server, hundreds of
users may be executing queries and transactions against the same data concurrently.

Two key roles of the multi-user database, then, are


1) to ensure that multiple concurrent transactions can produce the same effect as if they were
executing in isolation and
2) to coordinate data changes consistently with organization-wide policies. Critical to multi-user
database design and implementation is how to control data integrity and concurrency such that:

• Many users can have coordinated access to the same data concurrently.
• A user always sees a consistent view of the data and is prevented from making changes that would make
the data inconsistent.
• Data integrity is enforced within a single server and across multiple servers so that the data always
reflects appropriate organizational and business policies.

Microsoft SQL Server accomplishes each requirement. It actively enforces data integrity and concurrency

in distributed multi-user environments through high performance locking, server-enforced data integrity,

and advanced distributed database capabilities.

The Benefits of Microsoft SQL Server as an Accounting Database Platform

 Centralized Database Administration


The SQL Enterprise Manager allows database administrators (DBAs) to control any Microsoft SQL
Server from anywhere on the network. This includes managing security, alerts, scheduling,
configuration, backup and restore, tuning, and replication—all from the desktop.

Tight integration Tith TindoTs NT T TTTT SerTer SerTer and TacTTffice


Microsoft SQL Server supports all Windows NT / 2000 Server Server network protocols, including
TCP/IP, Netbeui, and IPX/SPX. It also provides native support of symmetric multi-processing (SMP),
which enables highly-tasked networks to spread processing requests over multiple CPUs on the file
server. This feature provides scalability for PharmaSoft customers using Windows NT / 2000 Server
and allows them to address server overload without adding a new server. Its multi-threaded
architecture allows for greater throughput by reducing bottlenecks on SMP systems.

PharmaSoft©: Architecture and Design 4


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

 Large Capacity and Transaction Rates


Microsoft SQL Server is designed to handle very large databases. Its supported transaction rates are
among the highest in the industry. This allows for greater accounting system scalability as companies
grow and for longer accounting data retention periods.

 Data Replication
With SQL Server, Microsoft provides data replication to users at no additional charge. It uses a
“publish/subscribe” method of replication, which means that a SQL server can publish, or offer, all or part
of the data residing on it, and another SQL server can subscribe to, or access, a read-only copy of that
data. A PharmaSoft user might replicate accounting data to a remote server for reporting purposes. The
breadth and depth of replication is easily controlled by the administrator, and data can be partitioned
horizontally (only rows meeting certain criteria are replicated) or vertically (only certain columns of a table
are replicated).

 DeTice Mirroring
SQL Server offers the ability to mirror devices, which means there would be two devices that run in
sync and hold the exact same data. If one device goes down, SQL Server will continue to run and
automatically cut over to the other device. This would allow for a more fault-tolerant accounting
environment.

 High ATailability
SQL Server allows dynamic backup, meaning databases can be backed up even while users are actively
accessing them. Also, users can schedule backup, restore, and transaction log recovery, or have these
procedures triggered by certain events.

 Stored Procedures, Triggers, and Referential Integrity


Stored procedures allow some processing to take place on the server instead of on the workstation.
PharmaSoft utilizes stored procedures where necessary, such as report pre-processing and database
lookup, to enhance performance. Triggers occur within SQL Server, based on changes to data, and can
prevent incorrect or inconsistent changes to the database. They can be easily set up in conjunction
with PharmaSoft to enforce business rules. For example, users can use SQL Server to set up a trigger
for PharmaSoft data that prohibits new orders from a customer who has invoices that are 90 days past
due. Referential integrity (RI) allows definition of database-enforced integrity rules that supplement
the application-level rules built into PharmaSoft.

 Alerts and Scheduling


SQL Server’s alert subsystem works with the Windows NT / 2000 Server event log and the SQL
Executive scheduler. Users can define an event that will occur when a certain alert is raised. For
example, an alert can be set to back up the transaction log when it exceeds 80 percent of its capacity.

PharmaSoft (SQL Server Edition) Design Strategy

We have developed PharmaSoft for Windows (SQL Server Edition) to exploit the features of the Windows

NT / 2000 Server and SQL Server. And like our client and server edition products, PharmaSoft (SQL Server

Edition) …

• Provides the exact same best-of-breed integrated accounting, operations, and distribution
applications.

PharmaSoft©: Architecture and Design 5


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

• Is written in Microsoft Visual Basic and uses industry-standard tools, such as Crystal Reports and FRx for
Windows, to maintain a true open-architecture.
• Exploits the same Windows graphical user interface, for ease of use. In fact, users of the different editions of
PharmaSoft would notice no differences in the products if they were to move from one edition to another.
• Is truly scalable to the requirements of a business, from single-user sites all the way to enterprise-wide
systems.
• Is fully and easily customizable—to meet the needs of individual users across an organization, without
necessarily source code modification.

SoftTare Deployment Details

PharmasoftSQL comes with SQL Express 2005 and a runtime version of Crystal Reports. However
these could be purchased independently as 3rd party products should you require additional
reporting flexibility(Crystal Reports) as well as a larger scale multi-user database in the case of
SQL Server. The product details are outlined below

CRYSTAL REPORTS

Crystal reports is high performance, flexible enterprise report writer utility that allows for
extraction of data from the database for presentation in various formats including flat reports,
grouped and charts. It contains drill down facilities that enable data to be exposed and exported
to other products such as Microsoft Excel, Word and comma delimited text files. It is robust and
allows one to access data, format it and deliver if as information inside and outside an
organization. It addresses end-to-end business intelligence requirements, from flexible ad-hoc
reporting and dashboards to powerful data integration and insightful performance management

SQL SERVER 2005

PharmasoftSQL utilizes Microsoft SQL Server Database for its data storage requirements. SQL
Server 2005 includes everything you need in one product for a comprehensive, out-of-the-box
data storage, management, analysis, and reporting platform with flexible licensing that allows
you to choose the solution that best fits your unique needs.

Designed to scale from the largest enterprise down to the smallest business, SQL Server
provides the same performance, security, reliability, and business value to all customers. SQL
Server supports implementations ranging from multi-terabyte data warehouses to Pocket PC
devices running SQL Server Windows CE Edition.

SQL Server 2005 provides a variety of solutions for organizations of all sizes from the hobbyist to
Fortune 500 companies. SQL Server will deliver a solution for all levels of experience and
requirements. To address this broad spectrum of needs SQL Server is available in the following
four editions.

SQL Server Enterprise SQL Server Standard SQL Server Workgroup SQL Server Express

PharmaSoft©: Architecture and Design 6


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

Enterprise Edition

Large organizations with complex requirements should take advantage of Enterprise Edition. It
offers advanced enterprise data management, developer productivity, and business intelligence
tools to meet the needs of critical applications. Significant advancements in high-availability
technologies have been made, including new advanced database mirroring functionality such as
log shipping, additional backup and restore capabilities, and replication enhancements to allow
organizations to build and deploy highly reliable applications. Additionally, Enterprise Edition
provides analytical and enterprise reporting capabilities to deliver business insights to all levels
of your organization. Enterprise Edition delivers out-of-the-box robust scalability, high
availability, and advanced business intelligence features, making it the most competitively
priced and comprehensive enterprise solution available.

Standard Edition

Standard Edition is a complete data management and analysis platform designed for medium-
sized businesses, departmental usage, and infrastructures that require highly available systems.
Standard Edition has added 64-bit support and high-availability features such as clustering and
database mirroring. Standard Edition offers enhanced business intelligence functionality and
SQL Server Integration Services, SQL Server Analysis Services, and SQL Server Reporting Services.

TorTgroup Edition

Workgroup Edition is specifically for small- to medium-sized organizations. It provides a fast,


easy-to-use, and affordable database solution. It has no limits on database size or connections
for handling departmental and branch location needs. Integrated with Visual Studio® and the
Microsoft .NET development framework, Workgroup Edition allows you to quickly develop
dynamic, robust, integrated applications. It is the ideal choice for organizations that require an
easy-to-manage, reliable, and robust solution with more scalability than the SQL Server Desktop
Engine (MSDE) or SQL Server 2005 Express.

Express Edition

Express Edition is a no-cost, redistributable version of the SQL Server 2005 database engine. This
edition provides the fastest way for novice developers to learn to develop and deploy small-
footprint data-driven applications. It is also useful to larger enterprise companies that want to
dedicate smaller databases to developer projects. Express Edition is tightly integrated with the
SQL Server 2005 Reporting Services controls that are included in Visual Studio 2005, allowing
developers to easily create sophisticated reports that include tables, charts, and graphics.
Express is an easy way for customers and partners to get started with SQL Server 2005. Partners
can even embed and redistribute Express Edition with their applications. Limitations 1 CPU, 1 GB
RAM, 4 GB database size

PharmaSoft©: Architecture and Design 7


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

SQL SerTer TTT5 pricing and licensing

SQL Server 2005 is the first in the database industry to offer customers the ability to deploy the
product on purely passive servers at no additional charge, thereby making it easier to
implement high-availability solutions. Because they are not charged per core on multi-core
systems, customers can take advantage of Moore’s law and use their hardware to its fullest
potential. With industry leading policies on high availability and multi-core licensing, the goal of
this licensing structure is to make enterprise class data management and analysis affordable to a
wide range of customers while driving complexity out of database systems, all at a lower total
cost of ownership.
For more information on pricing and licensing and the SQL Server 2005 product line, please visit
http://www.microsoft.com/sql/howtobuy/default.mspx or
http://www.microsoft.com/sql/howtobuy/understdbpricing.mspx.

Additional Pharmasoft Tools

DATABASE MANAGER

Database Manager is an additional Utility developed by Rivotek Kenya, for performing


administrative database operations such as backup, restoring, attaching and detaching
databases as well as running recovery and reconstruction jobs on the database.

TRACKER

Tracker is an additional Utility developed by Rivotek Kenya that is used for logging problems
encountered in the use of the software and updated when the problem is resolved.

TRANSFERSQL

For businesses having more than one branch, TransferSQL is an additional utility developed by
Rivotek Kenya that is used for management and transfer of data between branches. These
include both customer and supplier transactions for purposes of consolidation and aggregating
branch reports.

GLHIST
This is a utility for accessing reports for previous financial years that have already been closed in
case the database is being carried over year after year.

Other software required By PharmaSoft


 Microsoft Office
 Adobe Acrobat Reader

PharmaSoft©: Architecture and Design 8


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

 Windows Installer 3.1


 Microsoft .Net framework 2.0

System requirements

Following are the minimum hardware and software requirements for running PharmasoftSQL. A
server machine with in-built fault tolerance is highly recommended

 SerTer – Intel Xeon Quad Core 2.86 GhzProcessor, 160 GB SATA/SAS Hard Disk, RAID
capability, ,2GB Ram, DVD Writer - Windows 2000 with Service Pack 4 or later;
Windows 2000 Server, Advanced Server, or Datacenter Server with Service Pack 4 or
later; or Windows Server 2003 with Service Pack 1 or later. Windows Server 2008
Service Pack 1 or later (SQL Server 2005 Express Edition only).
Sample Specifications
o HP ProLiant ML370 G5 Server
o Intel Xeon 5120 Quad Core Processor 2.86GHz
o 4MB (1 x 4MB) Level 2 Cache
o 4GB (4x 1gb) Standard Memory
o Smart Array E200i/64 Controller (RAID 0/1/1+0)
o 48x IDE CD-ROM Drive
o 5U Tower Chassis
o Embedded NC373i Multifunction Gigabit Server Adapter with TCP/IP Offload
Engine
o 3*HP 146GB 3G SAS 10K SFF SP HDD
o 1 GB FBD PC2-5300 2 x 512 MB Kit
o Redundant Power Supply 370 G5 EU Kit

 TorTstations - Computer with a Pentium IV Duo Core or faster processor; 1-GHz


processor recommended, 512 MB of RAM or more; 1 GB recommended. - Microsoft
Windows® XP with Service Pack 2 or later; Windows Vista Business
 214 megabytes (MB) of available hard disk space required for SQL Server database
components; additional hard disk space up to 2 GB may be required depending on your
system configuration and the applications and features you choose to install.
 Microsoft Internet Explorer 6.0 SP1 or later.
 DVD-ROM drive.
 VGA or higher resolution monitor.
 Microsoft Mouse or compatible pointing device.

Actual requirements vary based on your system configuration and the applications and features
you choose to install.

PharmaSoft©: Architecture and Design 9


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

Importance of Stable HardTare and NetTorT EnTironment

Database Problems

To get an understanding of why we emphasis on acquisition and setup of a stable hardware and
network environment, I would like to point out that the PharmaSoft SQL Server database
operates within an environment that consists of an Operating System (Windows 2003 Server),
Network connectivity and a processing device (Server computer). Any failure of any of the three
has an impact on the database to the maximum extent of causing corruption and inaccessibility
of data.

There are many components involved with reading and writing data to files. Starting from an
application (SQL Server ) the Input/Output request is handed over to the Operating system via
an Application Programming Interface call. Once in the hands of the Operating System
(Windows 2003 Server) the request will travel through levels of filter drivers installed by things
like antivirus software, backup utilities and finally find its way to a driver that will hand the
actual data over to a disk controller, and eventually find its way to a disk or array of disks. There
may be caching on the disks, and in the case of high end arrays there may also be logic to
determine whether or not to service the request immediately or defer. If even one of these
pieces get it wrong the results for your data would be disastrous.

TindoTs Issue

The C Drive which is the default drive that Windows uses for itself must have adequate free
space as Windows 2003 Server itself requires a minimum of 5GB free space to utilize for
swapping as it loads data from the hard disk to memory and vice versa. A lot of temporary files
are also created in the process and if the space is too little it means that Windows will take more
time to resolve the issues and load or do the auto-saves of files. This lapse in time may mean
that a user who has sent a database request from the network for Pharmasoft will timeout as
the system is taking to long to respond.

The database SQL Server, has a tight integration with Windows 2003 and if the Windows
environment is for any reason unstable in such a manner that cause the system to re-start or
hang, it could potentially create inconsistencies within the database that would render it
inaccessible and require repairing.

HardTare & NetTorT Issues.

 The network issues would have to do with reliability of the packets of information that
are being sent to the database. If the handshaking between the machines is faulty,
invalid data may get written into the database resulting in inconsistencies.

 The speed of the network is also an area that is to be looked into so that the data
transfer happens quickly without apparent hanging and disruption of the system on the
other end.

PharmaSoft©: Architecture and Design 10


Rivotek Kenya Ltd. PharmaSoft Architecture and Design

 In addition the hardware firmware and revisions need to be up to date in order to


ensure that any hardware or network issues that may have been present at time of
shipping of the hardware or network devices have been resolved. This is equivalent to
service packs for software.

 Another problem could be caused by an inadequate sata drive controller that would
work ok when there are minimum loads and breakdown when large data volumes are
being transmitted across the machine. In memory corruption issues could also corrupt
data.

It is therefore advisable to go for branded machines which have a lower failure rate and especially a high
end server for the main Head Quarters to provide for a stable and reliable environment.

Possible long term solutions to minimizing downtime include adoption of technologies such as

1) Standby Server
2) Mirroring
3) Replication
4) Virtualization.

PharmaSoft©: Architecture and Design 11

You might also like