Fluency with Information Technology

Slides:



Advertisements
Similar presentations
Concepts of Database Management Sixth Edition
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe the metadata for a table of information,
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Concepts of Database Management Sixth Edition
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 15 Introduction to Database Concepts. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Explain.
Chapter 15 Introduction to Database Concepts. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Use XML.
3 The Relational Model MIS 304 Winter Class Objectives That the relational database model takes a logical view of data That the relational model’s.
Databases C HAPTER Chapter 10: Databases2 Databases and Structured Fields  A database is a collection of information –Typically stored as computer.
ASP.NET Programming with C# and SQL Server First Edition
ACOT Intro/Copyright Succeeding in Business with Microsoft Excel
Analyzing Data For Effective Decision Making Chapter 3.
Concepts of Database Management Seventh Edition
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Using Special Operators (LIKE and IN)
Chapter 15 Introduction to Database Concepts. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Use XML.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
Chapter 15 Introduction to Database Concepts. Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
Databases Databases are collections of information; our study repeats a theme: Tell the computer the structure, and it can help you! © 2004, Lawrence Snyder.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Lecture 16 Introduction to Database Concepts. Differences Between Tables and Databases Database: table of info –iTunes –Automobile registrations –Demography.
N5 Databases Notes Information Systems Design & Development: Structures and links.
Microsoft Office Access 2010 Lab 1
Microsoft Office Access 2010 Lab 3
GO! with Microsoft Office 2016
The Relational Database Model
Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe the metadata for a table of information, and.
Databases Chapter 16.
Practical Office 2007 Chapter 10
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
GO! with Microsoft Access 2016
A Table with a View: Database Queries
Lecture 2 The Relational Model
Chapter 4 Relational Databases
CSC 110 – Fluency in Information Technology Databases, XML and XSL
Building and Using Queries
Databases.
Access Lesson 1 Understanding Access Fundamentals
Chapter 3 The Relational Database Model
Microsoft Office Access 2003
MODULE 7 Microsoft Access 2010
Creating and Modifying Queries
Tutorial 3 – Querying a Database
Announcements Project 2’s due date is moved to Tuesday 8/3/04
Microsoft Office Access 2003
Databases and Information Management
The Relational Database Model
Test Your Tech Blogging is: Someone's online journal.
Getting to First Base: Introduction to Database Concepts
A Table with a View: Database Queries
Advanced Database Concepts: Reports & Views
Spreadsheets, Modelling & Databases
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Getting to First Base: Introduction to Database Concepts
Getting to First Base: Introduction to Database Concepts
Databases and Information Management
A Table with a View: Database Queries
Database Systems: Design, Implementation, and Management
Unit J: Creating a Database
New Perspectives on Microsoft
Presentation transcript:

Fluency with Information Technology 7th Edition Chapter 1 Defining Information Technology

Learning Objectives 1.1 Explain the differences between everyday tables and database tables 1.2 Use XML to describe the metadata for a table of information, and classify the uses of the tags as identification, affinity, or collection 1.3 Understand how the concepts of entities and attributes are used to design a database table 1.4 Use the six database operations: Select, Project, Union, Difference, Product, and Join 1.5 Express a query using Query By Example 1.6 Describe differences between physical and logical databases

1.1 Differences Between Tables and Databases When we think of databases, we think of tables of information: iTunes shows the title, artist, running time in a row Your car’s information is one line in the state’s database of automobile registrations The U.S. is a row in the demography table for the World Factbook's listing of country name, population, etc.

The Database's Advantage: Metadata Metadata is the key advantage of databases over other approaches to recording data as tables enables content search Two most important roles in defining metadata: Identify the type of data: each different type of value is given a unique tag Define the affinity of the data: Tags enclose all data that is logically related

1.2 XML: A Language for Metadata Tags XML is the EXtensible Markup Language A tagging scheme No standard tags to learn Tags are created as needed A self-describing language

XML Rules for Tags Required first line: <?xml version="1.0" encoding="UTF-8"?> First tag: root element that encloses all other tags Closing tags: matched pairs <tag></tag> or singletons <tag/> Element naming: no spaces; don't start with xml/XML, number, or punctuation; can be alphanumeric with underscores Case sensitivity: tags and attributes are case-sensitive Proper nesting: all tags must be correctly nested Attribute quoting: use straight (not curly) single or double quotes White space: white space is preserved and converted to a single space Comments: take the form <!– This is a comment -->

XML Example Create a database for the Windward Islands archipelago in the South Pacific Plan what information will be stored Develop those tags: <archipelago> <island> <iName>Tahiti</iName> <area>1048</area> </island> </archipelago>

Expanding the Use of XML Create a database of the two similar items (in this chapter, archipelagos) put both sets of information in the file As long as the two sets use the same tags for the common information, they can be combined Extra data is allowed, and additional tags can be created (such as <a_name> to identify which archipelago is being used)

Building on the Initial XML Group sets of information by surrounding them with tags A root element is the tag that encloses all content of the XML file Four our islands XML, the <archipelago> tag was the root element

XML Attributes Like HTML tags, XML tags have attributes Must always be set inside straight (not curly) quotation marks Tag attribute values can be enclosed either in paired single or paired double quotes: <entry location ="Hawai'i">Da Poke Shack</entry> Use attributes for additional metadata, not for content

Figure 15.2 XML Example: Geographic Features XML file for the Geographic Features database.

1.2 Effective Design with XML Tags: Encoding Rules XML is a flexible way to encode metadata Use three encoding rules Identification Rule: Label Data with Tags Consistently Affinity Rule: Group data together that references an entity Collection Rule: Group instances

Identification Rule Label data with tags consistently You choose the tags, but once you’ve decided you must always surround that kind of data with that tag

Affinity Rule Group data referencing an entity Enclose in a pair of tags all tagged data referring to the same thing Grouping keeps the data together Grouping makes an association of the tagged data items as being related to each other as features of the same thing

Collection Rule Group instances When you have several instances of the same kind of data, enclose them in tags Keeps them together and implies that they are instances of the same type

The XML Tree The rules for producing XML encodings of information produce hierarchical descriptions Can be thought of as trees The hierarchy is a consequence of how the tags enclose one another and the data

Figure 15.3 XML Tree The XML displayed as a tree. The encoding from figure 15.2 is shown with the root element (geo_feature) to the left and the leaves (content) to the right.

Tables and Entities Database tables: Any group of things with common characteristics that specifically identify each one Contain a set of things with common attributes

Figure 15.4 Database Table A database table instance (from Microsoft Access) representing the same information as shown in Figure 15.2

Database Vocabulary Terms Entities: rows of the database table Attribute Name: column heading Entity Instance: value in a row Table Instance: whole table

What to Notice Rows are all different – attributes uniquely identify each one Even when we don’t know the data for an attribute value it is still a characteristic The rows can be in any order The columns can be in any order Rearranging the rows or columns will result in the same table If we add (or remove) rows, or change a value, we create a new table instance Two rows can have the same value for some attributes, but not all attributes

1.3 Database Tables: Entities and Attributes An entity is anything defined by a specific set of attributes A table exists with a name and column headings, even with no data (an "empty instance") Entities have data types which define the form of the information stored as an attribute value (number, text, image, etc.) Entities (rows) are the differentiated data of databases, each one able to be told apart from the others by the differences in their attributes (column values)

Relational Database Tables Tables are technically called relations, but we’ll continue to call them database tables The rows must always be different, even after adding rows Be sure the table has all of the attributes (columns) needed to tell the entities apart You can always add a sequence number to guarantee that every row is different

Keys By itself, repeated data in a column is not a problem We are interested in columns in which all of the entries are always different to uniquely identify an entity such a column is called a candidate key doesn't have to be just one column (it can be multiple columns together) Primary Key: A candidate key that the computer and user agree will be used to locate unique entries during database operations

A Database Table's Metadata The database scheme is the database table’s metadata Succinctly describes a database table Attributes are listed, one per row For each attribute, the user specifies its data type and whether or not it is the primary key Customary to include a brief description

Figure 15.6 A Database Table and Its Scheme The worldDatabase1 (wDB1) table: (a) the table's metadata, known as the database scheme, and (b) sample entries, ordered by Code. Notice in figure (a) that the primary key is Code.

Computing with Tables To get information from database tables, we write a query describing what we want Query: Command that tells the database system how to manipulate its tables to compute the answer the answer will be in the form of another database table

Six Operations Project Select Cross-product Union Difference Join

Project and Select Operations Project (pronounced pro-JECT): Picks out and arranges columns from one database table to create a new, possibly “narrower”, table Select: Picks out rows according to specified criteria

Cross-Product Operation Cross-product: Combines two tables in a process like multiplication For each row in the first table, we make a new row by appending a row form the second table All combinations are in the result

Union and Difference Operations Union: Combines two tables with compatible attributes (columns) The result has rows from both tables For any rows that are in both tables, only one copy is included in the result Difference: Contains the rows of the first table that are not also in the second The opposite of Union

Join Operation Join: A Cross-Product followed by a Select operation Takes two database tables, and an attribute from each one (D1.a1 and D2.a2) Crosses the two tables and then uses Select to find those rows of the cross in which the two attributes match: where D1.a1 = D2.a2 Puts tables together while matching up related data

Ask Any Question: Using Database Operations “How many men from Africa have won an Olympic gold medal in the marathon?” Imagine that the database to query contains two tables: A list of all men who have won Olympic medals over the years A list of African countries with country codes

1.4 Begin the Database Operations Select only those rows from OlympicMen referring to the marathon Result: subset of Olympic men Select only those rows from OMMarathon referring to gold medalists Result: A table with all marathon runners who were gold medal winners Cross OMMGold with the AfricanCountries table and keep only the matches (using a Join) Result: A table of marathon gold medalists from Africa (we will call it Olympians) Project Olympians to get the final result

SQL: The Language of Databases The most widely used database language is Structured Query Language (SQL) The operations we call Project and Select are combined into one command called Select uses WHERE to specify the formula SQL uses INNER JOIN rather than just JOIN because it has several variations for joining data

1.5 Query by Example The Microsoft Access UI presents users with the opportunity to select the tables to be input to the query The attributes in the final result are listed from a drop- down menu in each column Once the attributes are selected, constraint formulas can be entered into the criteria row We must tell the database system that the attributes refer to the same information, saying that a relationship exists between the two fields We can click and drag matching fields in the UI to do so

Figure 15.16 Indicating Database Table Relationships in Query By Example Specifying a relationship in Query By Example: (a) select the Country field of OlympicMen and (b) after dragging it to the Code field of AfricanCountries, we see the line denoting the relationship

1.6 Database Structure There are two forms of tables: The physical database is stored on the disk drives of computer systems and is the permanent repository of the database The logical database is known as the view of the database, created for users on-the-fly, customized for their needs

Physical Database Designed by database administrators Data must be accessed fast Set up to avoid redundancy (duplicate information) Only one copy of each piece of stored data

Logical Database Shows different users the customized view of the information they need and want Doesn’t exist permanently, but is created every time they need it Retrieved from the one copy stored in the physical database, and provided to the users as needed Creating a new copy each time is essential If it were to be created once and then stored on the user’s computer, then there would be two copies of the information, and they would get out of sync

Queries Specifications using the five operations and Join to define a table from other tables Written in Structured Query Language (SQL) SQL allows a new query to be run each time it is selected or opened, with updated data as input connecting the logical database to the physical one

Summary XML tags are an effective way to record metadata in a file Metadata is used to identify values; it can capture the affinity among values of the same entity, and can collect a group of entity instances Database tables have names and fields that describe the attributes of the entities contained in the table Logical databases (database views) are useful windows into physical databases