string

caddiepastΔιαχείριση Δεδομένων

31 Ιαν 2013 (πριν από 4 χρόνια και 7 μήνες)

204 εμφανίσεις

1

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Survey on Database Architectures

A. Bacioccola

2

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Outlines


Desktop Database Application



Client / Server Architecture



Client / Server Database



PostgreSQL

3

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Desktop Database Application (1)


A desktop database is used by small businesses, and hobby
programmers to create ad
-
hoc customized desktop systems for
handling the creation and manipulation of data;



An example of desktop dabatase is
Office Access
, previously known as
Microsoft Access
.



Access allows relatively quick development because all database
tables, queries, forms, and reports are stored in the database. For
query development, Access utilizes the Query Design Grid, a graphical
user interface that allows users to create queries without knowledge of
the SQL programming language.

4

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Desktop Database Application (2)


In the Query Design Grid, users can "show" the source tables of the
query and select the fields they want returned by clicking and
dragging them into the grid. Joins can be created by clicking and
dragging fields in tables to fields in other tables.



Access allows users to view and manipulate the SQL code if desired.



Access can be applied to small projects which involve more than one
user. In this scenario, it scales poorly to larger projects involving
multiple concurrent users because it is a desktop application, not a
true client
-
server database.



When a Microsoft Access database is shared by multiple concurrent
users, processing speed suffers. The effect is dramatic when there are
more than a few users or if the processing demands of any of the
users are high.

5

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Client / Server Architecture (1)


Client server is network architecture which separates a client (often
an application that uses a graphical user interface) from a server.



Each instance of the client software can send requests to a server.



Specific types of servers include web servers, application servers, file
servers, terminal servers, and mail servers.



While their purposes vary somewhat,

the basic architecture remains the same
.

Request
Data
Client
Server
6

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Client / Server Architecture (2)


Although this idea is applied in a variety of ways, on many different
kinds of applications, the easiest example to visualize is the current
use of web pages on the internet.



For example, if you are reading an article on Wikipedia, your computer
and web browser would be considered a client, and the computers,
databases, and applications that make up Wikipedia would be
considered the server.



When your web browser requests a particular article from Wikipedia,
the Wikipedia server finds all of the information required to display the
article in the Wikipedia database, assembles it into a web page, and
sends it back to your web browser for you to look at.

7

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Client / Server Database (1)


Advantages of Client/Server database over desktop Database:



Scalability
: the client/server database architecture allows more than one
user to concurrently access the database; all the accesses to the
database are efficiently managed by the server;



Security
: Access control techniques can be implemented. Only authorized
users can write the database;



Robustness
: database server applications

typically implement strategies against

hardware failures and data loss.



Portability
: the client applications does

not have to implement the whole database

structure, but only methods to retrieve data.

Query
Results
Client
Server
8

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Client / Server Database (2)


Disadvantages of Client/Server database over desktop Database:



Complexity
: the client/server database requires more effort to be
implemented and managed compared to the desktop Database;


9

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

PostgreSQL


PostgreSQL is a
free software

object
-
relational database management
system (ORDBMS), released under a BSD
-
style license.



It offers an alternative to other database systems. Similarly to other free
software projects such as Apache, GNU/Linux, and MediaWiki, PostgreSQL
is not controlled by any single company, but relies on a global community
of developers and companies to develop it.

Query
Results
Client
PostgreSQL
Server
10

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

Data Types Comparison

The "same, yet different" nature of SQL data types is of vital importance for any developer working with multiple database pr
odu
cts, or those valiantly attempting to write SQL that lives in the application layer, independent of specific database platfor
m c
hoices. While by no means complete, the following table outlines some of the common names of data types between the various d
ata
base platforms:




Access

SQL
-
Server

MySQL

PostgreS
QL

boolean

Yes/No

Bit

N/A

Boolean

integer

Number
(integer)

Int

Int

Integer
(synonyms)

Integer

Int

float

Number
(single)

Float

Real

Float

Numeric

currency

Currency

Money

N/A

Money

string
(fixed)

N/A

Char

Char

Char

string
(variable)

Text (<256)

Memo
(65k+)

Varchar

Varchar

Varchar




Ask
your
question
s for
John
Paul
here!

Post
your
commen
ts

Also in
aboutS
QL:

Working
With
Tables

Data
Definitio
n
Languag
e

Introduci
ng SQL
Sets

As you can see, similarities aboun

11

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

References


Wikipedia: http://en.wikipedia.org/


Index terms:



Database


Client
-
server


Postgresql


Microsoft Access



PostgreSql: http://www.postgresql.org/

12

©2007, University of Pisa, Dip. Ingegneria dell’Informazione


Andrea Bacioccola

DISCUSSION