Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DATABASE DESIGN
The relational model uses a collection of tables to represent both data and
relationship among those data. Each table has multiple columns and each columns
has unique name. A row in a table a relationship among set of values.
WHAT IS DATABASE?
Let's also consider the face book. It needs to store, manipulate and present data
related to members, their friends, member activities, messages, advertisements and
lot more.
WHY DATABASE?
In DBMS, all the data from the different applications are integrated into a single
database, on which various checks for duplicity can be performed, and multiple
copies can be logically converted into a single one. This allows for a great
reduction in data redundancy, and prevents the wastage of memory. However, it
must be noted that some applications may require data to be duplicated .
2)Allows Data Sharing
DBMS allows sharing of the same data among numerous applications and users.
The data is stored centrally (typically within servers), and a software-based locking
mechanism is put in place to prevent two users from modifying it at the same time.
This feature makes it possible to share and fulfill the data requirements of a newly
installed application without needing to again create new data specifically for it.
When duplicate data exists at different memory locations, there are chances that an
application might update one of them while the other one will continue to contain
the previous values. This will cause an inconsistency in the information that is
stored. In DBMS, data redundancy is greatly reduced, and so, in almost all cases,
only a single copy of data exists in the database, which all the different
applications and programs share. Therefore, any changes made to it are instantly
available to all the programs accessing it, and as such, the consistency of data is
maintained.
Data integrity is said to exist when the data entered into a database is both,
accurate and consistent.
These systems provide centralized control over the access to data. This allows
different checks to be put in place in order to verify the accuracy of the data being
entered into it.
5) Provides Data Security
In a file-based computer system, the user has to create a backup of the data
regularly to protect it from being damaged or lost in the event of system crash or
failure. This can be a very time-consuming process, and is prone to human error.
Most of the DBMS have a backup-and-recovery feature built within them, that
automatically backs-up all important data, and restores it when needed.
7) Data Independence
The separation of data structure from the application program used to access it is
known as data independence. Typically, in a DBMS, the database and the
application program are maintained separately from each other, with the DBMS
acting as a mediator between them. This proves to be a big advantage, as one can
easily change the database structure without affecting the application program.
8) Data Abstraction
Data abstraction results from data independence. It allows the DBMS to provide an
abstract view of the data, without divulging the details of its physical storage or
method of implementation.
A DBMS allows multiple accesses to the database by many users, each having a
different perspective view of the data stored in it. All these views are subsets of the
database, and contain virtual data derived from the database, which doesn't exist in
physical form. Thus, many users can access the data, while still maintaining the
consistency of the database.
Many data-related issues, like concurrent access, security, data integrity, etc., are
taken care of by the DBMS. Therefore, when an application programmer develops
a program, he/she can focus explicitly on the needs of the users. This makes the
task of application development much easier.
Thus, database management systems bring about a systematization in data storage,
and also provide data security. Owing to their many advantages over traditional
file-based data storage systems, they are widely used in many large and small
organizations alike.
DEFINITION OF PROBLEM
HARDWARE REQUIREMENTS:-
Language : PHP
DATABASE REQUIREMENTS :-
SOFTWARE USED
WINDOWS 7:
This is world’s most popular and easy to use Operating system for
. Desktop computers and I have no exception.
PHP:
WHY WINDOWS 7?
1. Physical Level
2. Conceptual Level
3. External Level
End users
External Level
External/conceptual
Mapping
External Level
Conceptual schema Conceptual level
Conceptual/internal
Mapping
Internal schema Physical level
Database
1. Physical Level
2. Conceptual Level
Conceptual level describes the structure of the whole database for a group of
users.
It is also called as the data model.
Conceptual schema is a representation of the entire content of the database.
This schema contains all the information to build relevant external records.
It hides the internal details of physical storage.
3. External Level
External level is related to the data which is viewed by individual end users.
This level includes a no. of user views or external schemas.
This level is closest to the user.
External view describes the segment of the database that is required for a
particular user group and hides the rest of the database from that user group.
In File Processing System, duplicate data is created in many places because all the
programs have their own files. This creates data redundancy which in turns wastes
labor and space. In Database Management System, all the files are integrated in a
single database. The whole data is stored only once at a single place so there is no
chance of duplicate data.
2. Sharing Of Data
In DBMS, Data can be shared in between authorized user of database. All the users
have their own right to access the database up to a level. Database Administration
has complete access of database. He can assign users to access the database. Others
users are also authorized to access database and also they can share data between
them. Many users have same authority to access the database.
3. Data Consistency
DBMS controls data redundancy which in turn controls data consistency. Data
consistency means if you want to update data in any files then all the files should
not be updated again. As in DBMS, data is stored in a single database so data
becomes more consistent in comparison to file processing system. Also updated
values are available to all the users immediately.
4. Data Integrity
Data integrity means unification of so many files into a single file. In DBMS data
is stored in different tables. A database contains different tables that are linked to
each other. Many users feed entries in these tables so it is important to maintain
data items and association between data items. DBMS allows data integrity that
makes it easy to decrease data duplicity Data integration reduces redundancy as
well as data inconsistency.
5. Backup and Recovery
Data loss is a very big problem for all the organizations. In traditional file
processing system, a user needs to backup the database after a regular interval of
time that wastes lots of time and resources. If the volume of data is large then this
process may take a very long time.
DBMS solves this problem of taking backup again and again because it allows
automatic backup and recovery of database. For examples, if a system fails in the
middle of any process then DBMS stores the values of that state in which database
were before query execution.
6. Integrity Constraints
Constraints are used to store accurate data because there are many users who feed
data in database. Data stored in database should always be correct and accurate.
DBMS provides the capability to enforce these constraints on database.
For example, the maximum marks obtained by the students can never be more than
100. Also account balance of Banks like Axis should not be less than 2500
otherwise you will be penalized.
7. Data Atomicity
Any complete transaction in database is called atomic unit. It is the duty of DBMS
to store a complete transaction in database. If any transaction is partially completed
then it roll backs them.
For example, in railway reservation system, if user has completed the process of
ticket reservation then his record will be stored and amount of money will be
deducted from his account otherwise no amount will be deducted and if deducted it
will be given back.
9. Concurrency Control
If two users are accessing data simultaneously and they both want to update values
of same record then it may create concurrency. DBMS has the power to control
concurrency so that no transactions are lost.
10. Security
Data security means protecting your precious data from unauthorized access. Data
in database should be kept secure and safe to unauthorized modifications. Only
authorized users should have the grant to access the database. There is a username
set for all the users who access the database with password so that no other guy can
access this information. DBMS always keep database tamperproof, secure and
theft free.
A DBMS permits end users to use database without having special training or
expertise. Any untrained user can easily query, search and updates data in
database. He can easily generate report or documents with less knowledge.
DBMS systems are costly but after purchasing them their maintenance cost is very
less. It can be maintained by few programmers that are not costly for an enterprise.
WHY MY SQL?
SQL is the most popular language for adding, accessing and managing content in a
database. It is most noted for its quick processing, proven reliability, ease and
flexibility of use. MYSQL is an essential part of almost every open source PHP
application.
The DBA starts up a listener process to wait for user connection requests.
A visual basic user makes a connection to the database through the network
using ODBC or SQL objects for ADO.
The listener process dispatches a server process to handle the user’s SQL
requests.
Required data pulled into the database buffer cache if it is not already there.
Any data changes are made in memory and stored as Redo log entries in
redo log buffer.
Control returns to the visual basic application with a result set if appropriate.
The Database writer process writes data changes back to the disk when
certain criteria are met.
The log writer writes changes to the redo log files when the changes are
committed.
Database
Redo Buffer
Buffer
cache
Shared
Buffer pool
pool
Server Process
Fig: connecting oracle though a server process
ADVANTAGES OF MYSQL:
1. Data Security
MYSQL is globally renowned for being the most secure and reliable database
management system used in popular web applications like Word Press, Drupe,
Joule, Face book and Twitter. The data security and support for transactional
processing that accompany the recent version of MYSQL can greatly benefit any
business especially if it is an e-Commerce business that involves frequent money
transfers.
2. on-Demand Scalability
4. Round-the-clock Uptime
MYSQL comes with the assurance of 24X7 uptime and offers a wide range of high
availability solutions like specialized cluster servers and master/slave replication
configurations.
MYSQL tops the list of robust transactional database engines available on the
market. With features like complete atomic, consistent, isolated, durable
transaction support, multi-version transaction support, and unrestricted row-level
locking, it is the go-to solution for full data integrity. It guarantees instant deadlock
identification through server-enforced referential integrity.
With the average download and installation time being less than 30 minutes,
MYSQL means usability from day one. Whether your platform is Linux,
Microsoft, Macintosh or UNIX, MYSQL is a comprehensive solution with self-
management features that automate everything from space expansion and
configuration to data design and database administration.
7. Reduced Total Cost of Ownership
All the fears and worries that arise in an open source solution can be brought to an
end with My SQL’s round-the-clock support and enterprise indemnification. The
secure processing and trusted software of MYSQL combine to provide effective
transactions for large volume projects. It makes maintenance, debugging and
upgrades fast and easy while enhancing the end-user experience.
WHY PHP ?
Dynamic:
PHP is a server side scripting language that creates dynamic pages with
customized features. This results into creation of a user-friendly and interactive
web application or website.
Ease to use:
PHP is very easy to learn as compared to the other programming languages since
its syntax is based on languages like C and Perl. You can place a PHP anywhere in
the document and a typical PHP file contains a little PHP scripting code and
HTML tags. A basic PHP script starts with <?php and ends with ?>.
Free of Cost: Since PHP is an open source web language, it’s completely free of
cost. Today almost all the small and big companies are using PHP for web
development.
Efficiency in Performance:
Depending on how you code, PHP can turn out to be an efficient web language to
use. In fact, PHP is known to be scalable when writing code as well as in creating
applications and is very reliable when you need to serve several web pages.
Protocols:
You can easily interact with other services using protocols such LDAP, HTTP,
SNMP, NNTP, and others.
Object Oriented Programming:
It refers to the method of programming that invokes the use of classes to organize
the data and structure of an application. With PHP, OOP started to become feasible
with the release of PHP 4, but really found its true meaning with PHP 5. Now, as
the world awaits the release of PHP 6 we await another great leap in the evolution
of PHP OOP.
PHP has become popular because of its simplicity and the addition of Object-
Oriented Programming that makes it more powerful and secure.
Object means a real world entity such as pen, car, table etc. Object-Oriented
Programming is a methodology to design a program using classes and objects. It
simplifies the software development and maintenance by providing some concepts
such as Class, Object, Inheritance, Polymorphism, Abstraction, Encapsulation etc.
This is a technique that is widely used in the modern programming languages.
Huge Community:
Secured:
It is one of the most secured way of developing websites and web
applications; as it has got a security layer to protect against viruses and threats.
1.User interface:
A user interface (UI) is a conduit between human and computer
interaction – the space where a user will interact with a computer or machine to
complete tasks. The purpose of a UI is to enable a user to effectively control a
computer or machine they are interacting with, and for feedback to be received in
order to communicate effective completion of tasks.
2.Program:
Computer Programming is fun and easy to learn provided you adopt a proper
approach. This tutorial attempts to cover the basics of computer programming
using a simple and practical approach for the benefit of novice learners.
Easy to learn
Easy to use
Attractive
1. XAMPP
Rapid Debugging –
The built in console will direct you to errors with your code. The nice
thing here is the ability to click on the error link, and you are presented with a view
of the problematic code.
Easy to Use –
This is more a matter of preference, but many colleagues agree with me.
Chrome Dev tools are clean and easy to navigate. The barrier to entry is fairly low
even for those with little development experience.
OPEN DATABASE CONNECTIVITY
What is ODBC?
ODBC API
Loads driver
DRIVER MANAGER For each
Application
ODBC API
Application: Processes and calls the ODBC functions and submits the SQL
statements;
Driver: Handles ODBC function calls, and then submits each SQL request
to a data source; and
Data source: The data being accessed and its database management system
(DBMS) OS.
MANAGEMENT SYSTEM: