PharmaSoftSQL Architecture and Design
PharmaSoftSQL Architecture and Design
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
Introduction.
PharmaSoft is a financial and stock control software designed for the pharmaceutical industry covering
retail chemists, wholesalers, distributors, hospital pharmacy units and clinics
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.
Development Tools
(Front End) (Report Writer)
Visual Basic Crystal Reports
ODBC Drivers
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 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 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.
• 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,
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.
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.
• 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.
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
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
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
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
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.
DATABASE MANAGER
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.
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
Actual requirements vary based on your system configuration and the applications and features
you choose to install.
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.
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.
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.