320 likes | 499 Views
Tomorrow’s Technology and You 8/e. Chapter 7 Database Applications. Tomorrow’s Technology and You 8/e Chapter 7 Objectives. Explain what a database is and describe its basic structure. Identify the kinds of problems that can be best solved with database software.
E N D
Tomorrow’s Technology and You 8/e Chapter 7 Database Applications
Tomorrow’s Technology and You 8/eChapter 7Objectives Explain what a database is and describe its basic structure. Identify the kinds of problems that can be best solved with database software. Describe different kinds of database software, from simple file managers to complex relational databases.
Tomorrow’s Technology and You 8/e Chapter 7Objectives (continued) Describe database operations for storing, sorting, updating, querying, and summarizing information. Give examples of ways in which large, easily accessible databases make lives safer or more convenient.
Tomorrow’s Technology and You 8/e Chapter 7 The Google Guys Search for Success Google is one of the most successful companies on WWW. Search for Web pages, facts, quotes, etc. 200 million queries a day Tremendous database of material, but not organized Launched by a Sergey Brin and Larry Page (Stanford Ph.D. students) New approach in search technology Marks a page’s relevance by the number of times other related web pages link to it, not how often a word or phrase appeared on a page
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics What Good Is a Database? A database: A collection of information Database software: Application software(like word processing andspreadsheet software) e.g. Microsoft Access Designed to create, update, query databases of information(collections of information)
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Advantages offered by computerized databases: Make it easier to store large quantities of information Make it easier to retrieve information quickly and flexibly Make it easy to organize and reorganize information Make it easy to print and distribute information in a variety of ways
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Database Anatomy Database program: a software tool for organizing the storage and retrieval of information Database: a collection of information stored in an organized form in a computer Typically composed of one or more tables A collection of related information A collection of records
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Field Record A record is the information relating to one person, product, or event. Each specific (individual) piece of information in a record is called a field. (e.g. First name, last name, etc) Table
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Database programs provide you with more than one way to view data: Form views Show one record at a time List views Display several records in lists similar to the way a spreadsheet displays data
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Form View In any view, fields can be rearranged without changing the underlying data. List View
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Database Operations Update: enter information into the database e.g. a new customer) Browse: navigate through information Query: find records that match specific criteria E.g. A pharmaceutical company marketing a new menopausal drug might query their database to find all female customers from the state of Illinois over 35 for a targeted ad campaign
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Sort: rearrange records (alphabetically or numerically) Print reports, labels, and form letters: A report is an ordered list of selected records and fields in an easy-to-read format. Current database software has excellent report-generating capabilities
Asking questions of the database is called querying. Generating a query is probably the most important and widely used feature of the database. • Find all users over 25 years old • Find all products that have sold over 20,000 items • Find all male users between 20 and 50 years old who live in the state of Illinois whose license plate number begins with ‘TMX’ • Find all products that have sold less than 1000 items. Remove those items from the catalog. Remove those items from the ‘Orders’ table. Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics
Because queries are so important, most modern database management programs support a standard language for programming complex queries called SQL (Structured Query Language). • SQL is usable on the large majority of database management systems. • E.g. The following SQL query will query a table called ‘nobel’ to name all the Nobel prize winners from the year 1950: • SELECT winner_name FROM nobel WHERE year=1950 • . Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics
The Web: the world’s largest – but least organized – database Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics
Screen Test: Querying a Web Search Database Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics To search for articles online about a new method for recycling laser printer toner cartridges, you can visit a search engine, such as Google.
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics When you hit the “Search” button, the search engine will return a list of links, sorted by relevancy.
Because the data on the web is not stored in a relational database or DBMS (i.e. no underlying structured organization such as tables and forms), it cannot be queried in any structured way such as by using SQL. • Instead, web search engines search through all(!) of the pages on the web and using various algorithms, attempt to somehow organize the type of information stored on each page. It stores this information in something called an index. • When you type a query, the search engine, it searches its index to see which web pages best match your search text • . Tomorrow’s Technology and You 8/e Chapter 7 The Web as database
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics Personal information manager (PIM): an electronic organizer Automates some or all of the following functions: Address/phone book Appointment calendar To-do list Miscellaneous notes Handheld computers can share information with applications such as iCalendar running on PCs and Macintoshes.
Tomorrow’s Technology and You 8/e Chapter 7 The Electronic File Cabinet: Database Basics
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems Database Management Systems Database management system (DBMS): manipulates data in a large collection of files, cross-referencing between files as needed
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems A DBMS can be used interactively, or can be controlled directly by other programs.
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems What Makes a Database Relational? To most users, a relational database program is one that allows tables to be related to each other. Changes in one table are reflected in other tables automatically. To computer scientists, the term relational database has a technical definition related to: The underlying structure of the data The rules specifying how that data can be manipulated
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems A database is relationalwhen files are relatedto each other, such as this Student ID field in the Student file. The structure of a relational database is based on the relational model―a mathematical model that combines data in tables.
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems The Many Faces of Databases Large databases can contain hundreds of interrelated tables. A database management system can shield users from the complex inner workings of the system, providing them with only the information and commands they need to get their jobs done.
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems The Many Faces of Databases
Beyond the Basics: Database Management Systems Database Trends Batch processing: usersaccumulate transactions and input them into the computer in large batches E.g. At end of the day, enter all the new customer records into the database Real-Time computing: allows instant access to information Interactive processing: has replaced batch processing for most applications Users can now interact with data through terminals, viewing and changing values online in real-time. Batch processing is still used for jobs in which it makes sense to do a lot of transactions at once. E.g. At end of the week, query ‘Payroll’ table for current employees and print out paychecks
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems Client/server computing involves two-way communications between applications running on the “client” PC and the “server” PC. A travel agent might query an airline’s computer for schedule and fare information
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems Downsizing and Decentralizing Using a client/server approach Today many businesses use a client/server approach, using database servers. Users can take advantage of the PC’s simple user interface and convenience, while still having access to data stored on large server systems.
Tomorrow’s Technology and You 8/e Chapter 7 Using the web to query a database Every time you search Amazon or any other online store, a query is being generated in a database maintained by that company. Hypothetical examples: E.g. Select * from ‘books’ where keywords include Harry Potter Chamber E.g. Select schedule, fare from flights where departure city = ORD and arrival city = YUL and departure date = Febuary 27
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems Data Mining: The discovery and extraction of hidden predictive information from large databases Uses statistical methods and artificial intelligence technology Locates trends and patterns in data that would have been overlooked by normal database queries “The goal is informationat your fingertips.” Bill Gates
Tomorrow’s Technology and You 8/e Chapter 7 Beyond the Basics: Database Management Systems Rules of Thumb: Dealing with Databases Choose the right tool for the job. Think about how you’ll get the information out before you put it in. Start with a plan, and be prepared to change your plan. Make your data consistent; inconsistencies can mess up sorting and make searching difficult. Databases are only as good as their data. Query with care. If at first you don’t succeed, try another approach.