ITS 180: Database Management Systems

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Introduction to HTML & CSS
Cascading Style Sheets
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Chapter 14 Introduction to HTML
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
How to create a website with HTML and PHP The very basics By Alexander Niehoff.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Essentials of HTML Class 4 Instructor: Jeanne Hart
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Computational Boot Camp HTML Mike Schaffer. 8/23/2002 (MES) HTML What is HTML? HTML stands for HyperText Markup Language HTML is the language for publishing.
Web Development 101 Presented by John Valance
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
Cascading Style Sheets Creating a Uniform Site. Style Sheets  Style sheets are used for conformity on a web page or web site.  Style sheets eliminate.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Introduction to HTML UWWD. Agenda What do you need? What do you need? What are HTML, CSS, and tags? What are HTML, CSS, and tags? html, head, and body.
Mr. Rouda’s CSCI 101 sections. Quiz Format of Every Page my page this is the body.
Cascading Style Sheets Chris Vollmer IT 5610 Chatfield Senior High School.
Understanding Web-Based Digital Media Production Methods, Software, and Hardware Objective
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Introduction to CSS: Selectors
Introduction and HTML overview
4.01 How Web Pages Work.
Cascading Style Sheets
Cascading Style Sheets (CSS)
Cascading Style Sheet.
CSS Cascading Style Sheets
INTRO TO WEB DEVELOPMENT html
Web Systems & Technologies
4.01 How Web Pages Work.
Objective % Select and utilize tools to design and develop websites.
Introduction to Dynamic Web Programming
Cascading Style Sheets
Madam Hazwani binti Rahmat
HTML and Website Development
Developing Web-Based Applications
Intro to CSS CS 1150 Fall 2016.
Objective % Select and utilize tools to design and develop websites.
Introduction to web design discussing which languages is used for website designing
CASCADING STYLE SHEET CSS.
Department of Computer Science, Florida State University
Building a Webpage Extended Learning Module F
Intro to CSS CS 1150 Spring 2017.
Software Engineering for Internet Applications
Cascading Style Sheets
DynamicHTML Cascading Style Sheet Internet Technology.
Web Design and Development
Cascading Style Sheets
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
محمد احمدی نیا CSS محمد احمدی نیا
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets
Lesson 4 – Introduction to CSS
DynamicHTML Cascading Style Sheet Internet Technology.
Web Design and Development
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Computer communications
Web Design & Development
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Digging in a little deeper
4.01 How Web Pages Work.
Instructor Information: Mark Jamil
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
Presentation transcript:

ITS 180: Database Management Systems Instructor Information: Mark Jamil questions@markjamil.com

Using Databases Up to now, we have not discussed how data can be used aside from using the command line or tools like Workbench. In reality, databases are used to create applications. Lets discuss how to create a basic database driven web application. HTML (hyper-text markup language) Is a computer language used to create websites. CSS (cascading style sheets) Is a computer language used to control HTML elements. It is main purpose is to help centralize management of websites. PHP (personal home page) Is a computer language designed to compliment HTML by providing functionality that HTML normally does not have. It provides a path to operating system resources. Unlike HTML & CSS, PHP is a server side language.

Intro to Software Development Software is the modern method of providing data services. Most applications use some type of data storage, the relational databases we are using are just one type. Software can do the following Collect data Distribute data Both of the above Software is useless without data. Data is useless without some way to distribute it.

Intro to Software Development The best way to distribute data to a massive number of people is through the use of the World Wide Network (internet). Modern web browsers create a visual representation of a web page written in HTML and CSS. However, HTML and CSS does not provide a good way to collect data and store it for future distribution. HTML and CSS are not very dynamic. To extend HTML and CSS to become more dynamic, languages like PHP were developed to give access to databases.

Intro to Software Development Using HTML, CSS, and PHP a developer will have the capability to collect user data and provide services that require data storage such as banking and shopping. The best way to store data for internet use is in the form of a database. A database is a collection of data structures designed specifically for fast and efficient data storage. Most databases today rely on the B-Tree data structure to store and retrieve data which provides a O(log n) performance (search, insert, delete)

Intro to HTML Here is a example of a simple html page. <html> <head> <title> My Homepage </title> </head> <body> <p>This is a very simple HTML document.</p> <p>It only has two sentences.</p> </body> </html>

Intro to HTML Important HTML elements: HTML supports 3 types of lists: An Unordered List An Ordered List A Definition List (look this one up if you are interested) Unordered lists <ul> <li>Apples</li> <li>Oranges</li> <li>Bananas</li> </ul> This list will create the following output Apples Oranges Bananas

Intro to HTML Ordered lists <ol> <li>Question 1</li> <li>Question 2</li> <li>Question 3</li> </ol> This list will create the following output Question 1 Question 2 Question 3

Intro to HTML Fruit Vegetable Apple Carrot Orange Pea Pear Turnip Important HTML elements: TABLES <table> <tr> <td>Fruit</td> <td>Vegetable</td> </tr> <tr> <td>Apple</td> <td>Carrot</td> <td>Orange</td> <td>Pea</td> <td>Pear</td> <td>Turnip</td> </tr> </table> Fruit Vegetable Apple Carrot Orange Pea Pear Turnip

Intro to CSS CSS is used to control HTML elements. It is written inside of the HTML page itself or is called from another files (a .css file). CSS can be used in three ways Inline the style rules appear throughout the HTML of the Web page - i.e. in the body. Embedded the style rules are included within the HTML at the top of the Web page - in the head. Linked  The style rules are stored in a separate file external to all the Web pages.

Examples of Embedded CSS Within the HTML create a style section: <style type="text/css">  // insert styles here </style>  Styles are defined as follows: selector { property: value} CSS styles can have more than one property and value. For example: body {background:black; color:white} p em {background:red; color:white; font-style:italic} p.red {font-family:Arial; color:red} //this is a class selector <p class="red">Red text paragraph</p> a:link {font-family:Arial; color:red; text-decoration:none} //this is an anchor selector

Example of linked CSS To use a .css file you must call the file from within your HTML page like so: <link rel="stylesheet" href="mystyle.css" type="text/css"> Create a file called mystyle.css and inside the file, you can create styles the same way you did with the embedded styles previously: h2 {font-family:Arial; font-style:italic; color:blue} p {font-family:Arial; color:black} p em {background:red; color:white; font-style:italic} p.blue {font-family:Arial; color:blue} p.red {font-family:Arial; color:red}

Connecting to a DB Now that we know how to create a basic web page layout, we will use a PHP script to pull data from our database into the webpage. (see provided script) You will need a web server and PHP support. Install Apache and PHP on your VM. apt-get install apache2 apt-get install php5 apt-get install php5-mysql (this will allow PHP to connect to mysql) Customize the connection script to point at your VM IP address and change the password/username to match those of your MySQL configuration. Remember to place this script in your web root directory. For Apache on Debian, it will be: /var/www/html/ Test the script by opening the Apache website in a web browser. It should be http://you_ip_address From here on, you can use this script to call data from MySQL and you can create any type of database driven web application you want such as a university database like the one we are making in our assignments.