Sunteți pe pagina 1din 7

Personal information manager dbms Implementation

Chapter 5 IMPLEMENTATION 5.1 Selection of the platform


An operating system is software that manages computer resources and provides programmer/users with an interface used to access those resources. An operating system performs basic tasks such as controlling and allocating memory, prioritizing system requests, controlling and internal system resources as a service to users and programs of the system. The system under development works in a very restrictive environment. The security concerns are large and require that the system being developed be robust and safe from attack. Windows XP analyzes the performance impact of visual effects and uses this to determine whether to enable them, so input and output devices, facilitating computer networking and managing files. An operating system processes system data and user input, and responds by allocating and managing tasks as to prevent the new functionality from consuming excessive additional processing overhead. Users can further customize these settings. Windows XP operating systems can fix problems and add features by using service pack. The service pack is a superset of all previous service packs and patches so that only the latest service pack needs to be installed.

5.2 Selection of the programming language


5.2.1 Front End: PHP
The programming language used for the development work is PHP. PHP is a cross-platform, free and open source server side scripting language which is available as a module for Apache HTTP server. PHP is an easy to learn programming language which borrows its syntax from C. Being totally free in nature, it also has a huge amount of online resources available. PHP can be easily embedded with HTML code. PHP provides developers and administrators with a flexible and efficient set of security safeguards for both the system and the application level.

Dept of ISE, R.V.C.E.

2009-2010

Personal information manager dbms Implementation

Open Source IDEs like Netbeans and Eclipse provide good support for PHP development. Linux, Apache, MySQL and PHP popularly known as the LAMP stack is an excellent cost effective and powerful solution for all your dynamic web programming needs.

5.2.2 BACK END: MySQL


MySQL is a cross-platform, free and open source relational database management system (RDBMS). MySQL is a major database which along with its added features passes the ACID test, which is important in insuring the integrity of data. This is very important because data is the heart of any system in organization. A reliable and adequate database system has the following properties: Atomicity: That is results of a transaction's execution are either all committed or all rolled back. Consistency: The database is transformed from one valid state to another valid state. Illegal transactions aren't allowed and, if an integrity constraint can't be satisfied then the transaction is rolled back. Isolation: The results of a transaction are invisible to other transactions until the transaction is complete thus increasing the security on data. Durability: Once committed (completed), the results of a transaction are permanent and survive future system and media failures and thus ensuring maintenance and protection of data. All the above are well maintained by MySQL database.

5.2.3 Server:Apache server

Dept of ISE, R.V.C.E.

2009-2010

Personal information manager dbms Implementation The Apache HTTP Server, commonly referred to as Apache, is web server software notable for playing a key role in the initial growth of the World Wide Web. Apache was the first viable alternative to the Netscape Communication Corporation web server (currently known as Oracle iPlanet Web Server), and has since evolved to rival other Unix-based web servers in terms of functionality and performance. The majority of web servers using Apache run a Unix-Like operating system. The application is available for a wide variety of operating systems, including Unix,GNU,FreeBSD,Linux,Solaris, Novell Netware, Mac OS X,Microsoft Windows,OS/2,TPF, and eComStation. Released under the Apache License, Apache is characterized as open-source software. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support Perl,Python,Tcl, and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest. Apache features configurable error messages,DBMS-based authentication databases, and content negotiation. It is also supported by several graphical user interface(GUIs).

5.3 Programming Coding Guidelines


5.3.1 PHP Guidelines 5.3.1.1 Variables

A variable name can begging with either an alphabetical letter or underscore and consist of alphanumeric letters, underscores and other ASCII characters ranging from 127 to 255.

Explicit declaration of variable is not required in PHP. Variables can be declared and assigned values simultaneously. A variables data type is determined implicitly by PHP after examining the kind of data that the variable holds.

Variables can be declared anywhere in a PHP script and can have different scopes: Local, Global and Static.

$string = hahaha string is this lol; //$string will be treated as a string $price = 420.21; //$price will be treated as float $number = 84; //$number will be treated as an integer Dept of ISE, R.V.C.E. 2009-2010 3

Personal information manager dbms Implementation

5.3.1.3 Data Types


Scalar data types Integers Floating-point numbers String: sequence of characters Boolean: either TRUE or FALSE value.

Compound data types Array: for holding multiple values indexed by numbers or strings Object: to be used along with classes for object-oriented programming

5.3.1.4 Embedding PHP code in HTML


<html> <head> <meta charset="utf-8" /> <title>PHP Test</title </head> <body> <?php echo 'Hello World'; ?> </body> </html>

5.3.2 MySQL Guidelines 5.3.2.1 Datatypes


The various data types used in MySQL are 1. Character Data CHAR(n) VARCHAR(n) Character data is always entered between single quotes. ex 1RV0788 , Pratheeksha 2. Numeric Data NUMBER Dept of ISE, R.V.C.E. 2009-2010 4

Personal information manager dbms Implementation NUMBER(p) : Fixed Point NUMBER(p,s) : Floating Point 3. Date Data Default format for date is: DD-MMM-YY & like character data, is always entered between single quotes e.g. 27-DEC-1989 4. Raw Data It is used to store binary data such as graphics, sound etc.

5.3.2.2 Commands Data Definition Language (DDL)


Data Definition Language is used to create an object, alter the structure of an object and also to drop (delete) the objects created. The various commands used to handle tables are as follows DESCRIPTION OF A TABLE : Describes the attributes in the table. Syntax: DESC <Table_Name> CREATE TABLE : Creates a new table with attributes mentioned. Syntax: CREATE TABLE <Table_Name> ( <col_name_1> <Datatype(size)>, <col_name_2> <Datatype(size)>, <col_name_n> <Datatype(size)> ); ALTER TABLE : 1. Add a new column to an existing table ALTER TABLE <Table Name> ADD <new_column_name> <datatype(width)>;

Dept of ISE, R.V.C.E.

2009-2010

Personal information manager dbms Implementation 2. Modify an existing column. ALTER TABLE <Table Name> MODIFY <column> <datatype(width)>; 3. Drop an existing column ALTER TABLE <Table Name> DROP COLUMN <column_name>; 4. Add Constraints ALTER TABLE <Table_Name> [ADD CONSTRAINT <constraint_name>] <Constraint_type>(<Column_name>); 5. Drop Constraints ALTER TABLE <Table Name> DROP CONSTRAINT <constraint_name>; DROP TABLE : Its used to delete a table. DROP TABLE <Table_Name>;

INSERT : Adds one or more rows into a table. Syntax: INSERT INTO <Table_Name> [column_name1,column_name2,. . .,column_name3] VALUES(value1,value2,. . . ,valuen);

UPDATE : Updates existing rows in a table. UPDATE <Table_Name> SET <column1_name> = value / Expression, <column2_name> = value / Expression, [WHERE <condition>];

Dept of ISE, R.V.C.E.

2009-2010

Personal information manager dbms Implementation DELETE : Deleting existing rows from a Table DELETE FROM <Table_Name> [WHERE <condition>] SELECT :Retrieves Information from a table SELECT <the attribute names> FROM<table names> WHERE <condition> 1. The ORDER BY clause is used along with the SELECT statement to retrieve data in a particular order. 2. The GROUP BY clause is used to divide the data in a table into smaller groups following which information is retrieved using a HAVING statement. JOINS 1. Equi Join: Its the process of retrieving information from multiple tables using an equivalence criterion on one or more columns.

2. Non Equi Join: If a join is performed using any of the relational operators other that = operator the join is said to be a non equi join. 3. Outer Join: Outer join extends the result of an equi join. It retrieves the rows returned by an equi join as well as the rows that do not conform to the equivalence condition specified. 4. Cartesian Join: The Cartesian join is obtained when no WHERE clause is specified. It simply returns all combinations of rows from different tables.

Dept of ISE, R.V.C.E.

2009-2010

S-ar putea să vă placă și