Week 10 LBSC 671 Creating Information Infrastructures

Slides:



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

Relational Databases Week 9 INFM 603.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, September 13, 2012 Session 2: HTML and.
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
LBSC 690 Session #7 Structured Information: Databases Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under.
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
Introduction to HTML 2006 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Databases Week 7 LBSC 690 Information Technology.
LBSC 690: Session 6 CSS, XML/XSLT Jimmy Lin College of Information Studies University of Maryland Monday, October 15, 2007.
Week 6 LBSC 690 Information Technology
Introduction to HTML 2006 INT197B. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Databases Week 6 LBSC 690 Information Technology.
LBSC 690: Session 7 Relational Databases
Introduction to HTML 2004 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Creating a Web Page HyperText Markup Language. HTML Documents  Created using any text editor  Notepad  Vi, Pico, or Emacs  If using word-processor,
HTML Introduction HTML
LBSC 690 Session #6 CSS, XML/XSLT Jimmy Lin The iSchool University of Maryland Wednesday, October 8, 2008 This work is licensed under a Creative Commons.
Relational Databases Week 7 LBSC 690 Information Technology.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Web Design is a class created to nurture the minds of high school techies, and introduce those without prior knowledge to the field.
Chapter 14 Introduction to HTML
1 Relational Databases. 2 Find Databases here… 3 And here…
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Relational Databases Week 13 LBSC 671 Creating Information Infrastructures.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Creating a Basic Web Page
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.
Chapter 16 The World Wide Web Chapter Goals ( ) Compare and contrast the Internet and the World Wide Web Describe general Web processing.
Webpage design for researchers Dr Jim Briggs 1.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Wednesday, February 5, 2014 Session 2: HTML and.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Objectives: 1. Create a Skeleton HTML 2. View a Skeleton File Through a Server and Browser 3. Learn HTML Body Tags for the Display of Text and Graphics.
CP2022 Multimedia Internet Communication1 HTML and Hypertext The workings of the web Lecture 7.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Basic HTML Workshop By: Preeda Chunjongkolkul (Pete) Systems Librarian/Webmaster
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Just Enough HTML How to Create Basic HTML Documents.
Databases Week 5 LBSC 690 Information Technology.
1 Welcome to CSC 301 Web Programming Charles Frank.
HTML: Hyptertext Markup Language Doman’s Sections.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
+ Information Systems and Databases 2.2 Organisation.
HTML BTEC National in Computing Section5. Create Information “HTML: defining HTML, discussing HTML uses and demonstrating HTML basics, HTML structure…..
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
Relational Databases Week 7 INFM 603.
Introduction to the World Wide Web & Internet CIS 101.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
The Web Session 4 INST 301 Introduction to Information Science.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Web Design – Week 2 Introduction to website basics Website basics: How the Web Works Client / server architecture Packet switching URL components.
Data Modeling Session 12 INST 301 Introduction to Information Science.
Relational Databases (Part 2) Session 14 INST 301 Introduction to Information Science.
Finally getting to html and CSS… Tim Berners-Lee, the writer of the software program that makes him the inventor of the WWW, defines the Internet as a.
Introduction to HTML.
4.01 How Web Pages Work.
Objective % Select and utilize tools to design and develop websites.
Objective % Select and utilize tools to design and develop websites.
Chapter 27 WWW and HTTP.
Week 6 LBSC 690 Information Technology
Presentation transcript:

Week 10 LBSC 671 Creating Information Infrastructures The Web Week 10 LBSC 671 Creating Information Infrastructures

Virtual Private Networks a secure private network over the public Internet Public Internet Intranet virtual “leased line” Intranet

Tonight Learn to create a Web page Think about what the Web “is” Talk conceptually about databases

Internet  Web Internet: collection of global networks Web: way of managing information exchange There are many other uses for the Internet File transfer (FTP) Email (SMTP, POP, IMAP)

The World-Wide Web My Browser Requested Page Fetch Page Send Request Local copy of Page requested Requested Page Proxy Server Fetch Page Remote Sever Send Request A server that sits between a client application, such as a Web browser, and a real server. It intercepts all requests to the real server to see if it can fulfill the requests itself. If not, it forwards the request to the real server. Proxy servers have two main purposes: Improve Performance: Proxy servers can dramatically improve performance for groups of users. This is because it saves the results of all requests for a certain amount of time. Consider the case where both user X and user Y access the World Wide Web through a proxy server. First user X requests a certain Web page, which we'll call Page 1. Sometime later, user Y requests the same page. Instead of forwarding the request to the Web server where Page 1 resides, which can be a time-consuming operation, the proxy server simply returns the Page 1 that it already fetched for user X. Since the proxy server is often on the same network as the user, this is a much faster operation. Real proxy servers support hundreds or thousands of users. The major online services such as Compuserve and America Online, for example, employ an array of proxy servers. Filter Requests: Proxy servers can also be used to filter requests. For example, a company might use a proxy server to prevent its employees from accessing a specific set of Web sites. Internet

“The Web” HTML HTTP URL URL HTML HTTP Internet communication protocols RTSP FTP Email Web Server HTTP (transfer) File System URL (e.g.,http://www.foo.org/snarf.html) HTML (data/display)

Web Standards HTML URL HTTP How to write and interpret the information Where to find it HTTP How to get it Link this to postal service

Uniform Resource Locator (URL) Uniquely identify Web pages Domain name File name http://www.glue.umd.edu:80/~oard/teaching.html Protocol Port Path

HyperText Markup Language (HTML) Simple document structure language for Web Advantages Adapts easily to different display capabilities Widely available display software (browsers) Disadvantages Does not directly control layout

“Hello World” HTML <html> <head> This is the header <html> <head> <title>Hello World!</title> </head> <body> <p>Hello world! This is my first webpage!</p> </body> </html> This is the actual content of the HTML document

Hands On: Learning HTML From Examples Use Internet Explorer to find a page you like http://terpconnect.umd.edu/~oard On the “View” menu select “Source” (in IE) Opens a notepad window with the source Compare HTML source with the Web page Observe how each effect is achieved

Hands On: “Adopt” a Web Page Modify the HTML source using notepad For example, change the page to yours Save the HTML source somewhere In the “File” menu, select “Save As” Put the name in quotes (e.g., “test.html”) FTP it to your ../pub directory on terpconnect View it http://terpconnect.umd.edu/~(yourlogin)/test.html

Tips Edit files on your own machine Save early, save often! Upload when you’re happy Save early, save often! Reload browser to see changes File naming Don’t use spaces Punctuation matters

What’s a Document? Content Structure Appearance Behavior Logical, Physical Appearance Cascading Style Sheets Behavior JavaScript

HTML Document Structure “Tags” mark structure <html>a document</html> <ol>an ordered list</ol> <i>something in italics</i> Tag name in angle brackets <> Not case sensitive (unlike XML) Open/Close pairs Close tag is sometimes optional (unlike XML)

Logical Structure Tags Head Title Body Headers: <h1> <h2> <h3> <h4> <h5> Lists: <ol>, <ul> (can be nested) Paragraphs:<p> Definitions: <dt><dd> Tables: <table> <tr> <td> </td> </tr> </table> Role: <cite>, <address>, <strong>, …

Physical Structure Tags Bold: <b></b> Italics: <i></i> Typeface: <font face=“Arial”></font> Size: <font size=“+1”></font> Color: <font color=“990000”></font>

(Hyper)Links index.html <html> <head> <title>Hello World!</title> </head> <body> <p>Hello world! This is my first webpage!</p> <p>Click <a href="test.html">here</a> for another page.</p> </body> </html> test.html <html> <head> <title>Another page</title> </head> <body> <p>This is another page.</p> </body> </html>

Hypertext “Anchors” Internal anchors: somewhere on the same page <a href=“#students”> Students</a> Links to: <a name=“students”>Student Information</a> External anchors: to another page <a href=“http://ischool.umd.edu”>iSchool</a> <a href=“http://terpconnect.umd.edu/~oard/research.html#email”>email papers</a> URL may be complete, or relative to current page <a href=“video/week2.rm”>2</a> File name (in URL) is case sensitive (on Unix servers) Protocol and domain name are not case sensitive

Images <img src=“URL”> or <img src=“path/file”> SRC: can be url or path/file ALT: a text string ALIGN: position of the image WIDTH and HEIGHT: size of the image Can use as anchor: <a href=URL><img src=URL2></a> Example: http://www.umiacs.umd.edu/~daqingd/Image-Alignment.html

Tables eenie mennie miney mo catch a tiger by the toe <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table>

Table Example <table align=“center”> <caption align=“right”>The caption</caption> < tr align=“LEFT”> <th> Header1 </th> <th> Header2</th> </tr> <tr><td>first row, first item </td> <td>first row, second item</td></tr> < tr><td>second row, first item</td> <td>second row, second item</td></tr> </table> Table can basically put all the html into it Better keep with basic table elements so that you have wider auidence Use indent to help you to read the table source data

XHTML: Cleaning up HTML <?xml version="1.0" encoding="iso-8859-1"?> <html xmlns="http://www.w3.org/TR/xhtml1" > <head> <title> Title of text XHTML Document </title> </head> <body> <div class="myDiv"> <h1> Heading of Page </h1> <p> here is a paragraph of text. I will include inside this paragraph a bunch of wonky text so that it looks fancy. </p> <p>Here is another paragraph with <em>inline emphasized</em> text, and <b> absolutely no</b> sense of humor. </p> <p>And another paragraph, this one with an <img src="image.gif" alt="waste of time" /> image, and a <br /> line break. </p> </div> </body></html>

Defining Blocks of Text <div> … </div> Named region Implies a paragraph break, Can include multiple paragraphs <p> … </p> Individual paragraph <span> … <span> Any region Does not create a paragraph break

Cascading Style Sheets (CSS) Separate content and structure from appearance Rules “cascade” from broad to narrow: Browser default External style sheet Internal style sheet Inline style

Basics of CSS Basic syntax: Example: Causes selector {property: value} Font to be center-aligned Font to be Arial and black selector {property: value} HTML tag you want to modify… The property you want to change… The value you want the property to take p { text-align: center; color: black; font-family: arial }

Different Ways of Using CSS Inline style: Causes only this tag to have the desired properties Internal stylesheet: Causes all tags to have the desired properties <p style="font-family:arial; color:blue“>…</p> … <head>… <style type="text/css" > p { font-family:arial; color:blue} </style> </head> <body> <p>…</p>

Customizing Classes Ability to define customized styles for standard HTML tags: … <head>… <style type="text/css"> p.style1 { font-family:arial; color:blue} p.style2 { font-family:serif; color:red} </style> </head> <body> <p class=“style1“>…</p> <p class=“style2“>…</p>

External Style Sheets Store formatting metadata in a separate file mystyle.css p.style1 { font-family:arial; color:blue} p.style2 { font-family:serif; color:red} … <head>… <link rel="stylesheet" href="mystyle.css" type="text/css" /> </head> <body> <p class=“style1">…</p> <p class=“style2">…</p>

Programming for the Web JavaScript [Client-side] Server embeds a program in HTML Browser runs the program when it gets to it PHP “Common Gateway Interface” [Server-side] HTML form sends field values to the server Server passes field values to a program Program generates a Web page as a response Ajax Server sends browser a generic program to run Browser and server programs exchange XML-encoded data

JavaScript <HTML> <HEAD> <TITLE>My first script</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <H1> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> document.write("Hello, world!") </SCRIPT> </H1> </BODY></HTML>

HTML Editors Several are available Dreamweaver Microsoft Word (File->”Edit with MS Word” in IE) You may still need to edit the HTML file Some editors use browser-specific features Some HTML features may be unavailable File names may be butchered when you upload Verbose HTML can make hand-editing difficult

What is the Web? Protocols Perspective Content Access HTTP, HTML, or URL? Perspective Content or behavior? Content Static, dynamic or streaming? Access Public, protected, or internal?

Why is there a Web? Affordable storage Adequate backbone capacity 300,000 words/$ in 1995 Adequate backbone capacity 25,000 simultaneous transfers in 1995 Adequate “last mile” bandwidth 1 second/screen in 1995 Display capability 10% of US population in 1995 Effective search capabilities Lycos and Yahoo were started in 1995

Global Internet Users Web Pages

Most Widely-Spoken Languages Source: Ethnologue (SIL), 1999

Global Trade This chart shows the 15 nations with at least 100 billion dollars in annual imports and exports. Together, these nations account for 73% of the world’s exports World trade thus defines nine major languages: English, German, Japanese, Chinese, French, Italian, Dutch, Korean, Spanish There are three key drivers that decide which languages get attention. Where is the money. The G7 languages are well covered Where are the people. This seems to have a much smaller effect. Where are the problems: This explains the interest in Farsi, Korean, etc. Source: World Trade Organization 2010 Annual Report

Databases Database DataBase Management System (DBMS) Collection of data, organized to support access Models some aspects of reality DataBase Management System (DBMS) Software to create and access databases Relational Algebra Special-purpose programming language

Structured Information Field An “atomic” unit of data number, string, true/false, … Record A collection of related fields Table A collection of related records Each record is one row in the table Each field is one column in the table Primary Key The field that identifies a record Values of a primary key must be unique Database A collection of tables

A Simple Example primary key

Registrar Example Which students are in which courses? What do we need to know about the students? first name, last name, email, department What do we need to know about the courses? course ID, description, enrolled students, grades

Why is this a bad approach? A “Flat File” Solution Discussion Topic Why is this a bad approach?

Goals of “Normalization” Save space Save each fact only once More rapid updates Every fact only needs to be updated once More rapid search Finding something once is good enough Avoid inconsistency Changing data once changes it everywhere

Relational Algebra Tables represent “relations” Course, course description Name, email address, department Named fields represent “attributes” Each row in the table is called a “tuple” The order of the rows is not important Queries specify desired conditions The DBMS then finds data that satisfies them

A Normalized Relational Database Student Table Department Table Course Table Enrollment Table

Approaches to Normalization For simple problems (like the homework) Start with “binary relationships” Pairs of fields that are related Group together wherever possible Add keys where necessary For more complicated problems Entity relationship modeling (LBSC 670)

Example of Join Student Table Department Table “Joined” Table

Problems with Join Data modeling for join is complex Useful to start with E-R modeling Join are expensive to compute Both in time and storage space But it is joins that make databases relational Projection and restriction also used in flat files

Some Lingo “Primary Key” uniquely identifies a record e.g. student ID in the student table “Compound” primary key Synthesize a primary key with a combination of fields e.g., Student ID + Course ID in the enrollment table “Foreign Key” is primary key in the other table Note: it need not be unique in this table

Project New Table SELECT Student ID, Department

Restrict New Table WHERE Department ID = “HIST”

Entity-Relationship Diagrams Graphical visualization of the data model Entities are captured in boxes Relationships are captured using arrows

Registrar ER Diagram Student Student ID First name Last name Department E-mail … Enrollment Student Course Grade … has associated with has Course Course ID Course Name … Department Department ID Department Name …

Getting Started with E-R Modeling What questions must you answer? What data is needed to generate the answers? Entities Attributes of those entities Relationships Nature of those relationships How will the user interact with the system? Relating the question to the available data Expressing the answer in a useful form

“Project Team” E-R Example manage-role 1 M member-of 1 student team 1 M creates human implement-role 1 1 needs M client project d php-project ajax-project

Components of E-R Diagrams Entities Types Subtypes (disjoint / overlapping) Attributes Mandatory / optional Identifier Relationships Cardinality Existence Degree

Types of Relationships Many-to-Many 1-to-Many 1-to-1

Making Tables from E-R Diagrams Pick a primary key for each entity Build the tables One per entity Plus one per M:M relationship Choose terse but memorable table and field names Check for parsimonious representation Relational “normalization” Redundant storage of computable values Implement using a DBMS

Normalization 1NF: Single-valued indivisible (atomic) attributes Split “Doug Oard” to two attributes as (“Doug”, “Oard”) Model M:M implement-role relationship with a table 2NF: Attributes depend on complete primary key (id, impl-role, name)->(id, name)+(id, impl-role) 3NF: Attributes depend directly on primary key (id, addr, city, state, zip)->(id, addr, zip)+(zip, city, state) 4NF: Divide independent M:M tables (id, role, courses) -> (id, role) + (id, courses) 5NF: Don’t enumerate derivable combinations

Normalized Table Structure Persons: id, fname, lname, userid, password Contacts: id, ctype, cstring Ctlabels: ctype, string Students: id, team, mrole Iroles: id, irole Rlabels: role, string Projects: team, client, pstring

A More Complex ER Diagram cadastral: a public record, survey, or map of the value, extent, and ownership of land as a basis of taxation. Source: US Dept. Interior Bureau of Land Management, Federal Geographic Data Committee Cadastral Subcommittee http://www.fairview-industries.com/standardmodule/cad-erd.htm

Key Ideas Databases are a good choice when you have Lots of data A problem that contains inherent relationships Design before you implement This is just another type of programming The mythical person-month applies! Join is the most important concept Project and restrict just remove undesired stuff

Before You Go On a sheet of paper, answer the following (ungraded) question (no names, please): What was the muddiest point in today’s class?