Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Driven Websites

Similar presentations


Presentation on theme: "Database Driven Websites"— Presentation transcript:

1 Database Driven Websites
Higher Computing Science

2 Static Web Pages a web page where content is created and set using HTML and CSS, no options to support user input. content will not change as a result of any activity taking place on a server side database must be updated by web developers if changes are to be seen by users. best for those who do not intend to have lots of content that needs to be updated regularly.  Shawlands Academy website is an example

3 Dynamic Web Pages A dynamic web page contains information that changes. This information can change for a number of reasons: the user who has logged on to the system Sports / news update e-commerce update of available stock /bank balance etc geo-location/date/time/weather Eg

4 Database-driven Website
The parts of the website which change are often linked to a database held on a server. This is known as a database-driven website. The web page takes information from a database and inserts that information into the web page each time it is loaded. Database driven websites allow users to fill in forms that can then be sent as queries to the database allowing for real time feedback eg the number of tickets available for a concert or the number of seats left on flight

5 Database-driven Website
If the information stored in the database changes, the web page connected to the database will update automatically eg online banking sites where customers can log in and check their bank account - balance is updated in real time; Online flight sales (prices and availability updated in real time) Most database-driven websites are authenticated sites – users must log on to access them

6 Advantages real time update of webpages when the content of a server side database changes user specific/targeted content possibility of e-commerce real time update of content linked to other database driven sites or servers, eg weather widgets ability to gain feedback or queries from the user via forms

7 DBMS for database-driven websites
MySQL (Structured Query Language) – most common (runs on UNIX and Linux OS) SQL server, MS Access and XML (extensible markup language) run on windows OS

8 Client-side Scripting
A client-side script is a program that is processed within the client browser. These kinds of scripts are small programs which are downloaded, compiled and run by the browser.  JavaScript is an important client-side scripting language and widely used in dynamic websites. The script can be embedded within the HTML or stored in an external file

9 Server-side scripting
Server side scripting occurs when data is sent from a client device to the server, where it is processed before a result is sent back to the client. This means validation can be carried out on the server rather than being interpreted by browser software on the client. Queries can also be sent from the client device to be executed on the server which contains a database relevant to the purpose of the site. E-commerce sites, online multiplayer games and social media sites all make extensive use of server side scripting

10 server side scripting – 4 stages:
Server receives data from the client Request to receive a webpage User completed form entries Specific information such as the current time or location on the client system Validation will occur on the server Form data such as usernames and passwords, addresses and the number of tickets/items are checked for validity server side If data is not valid, the server will send a message back to the client that is then interpreted by the browser software and output on the dynamic webpage Valid data can be used to query a database server side using languages like MySQL a result is sent back to the client, the result will often mean that the webpage or parts of the webpage change. PHP code is often used as part of this process.

11


Download ppt "Database Driven Websites"

Similar presentations


Ads by Google