240 likes | 367 Views
Introduction To Computing Lecture # 8. By Omer Iqbal Email Omer.iqbal@hotmail.com. Introduction to Databases. Data vs. Information. Data – a collection of facts made up of text, numbers and dates: Murray 35000 7/18/86
E N D
Introduction To Computing Lecture # 8 By Omer Iqbal Email Omer.iqbal@hotmail.com
Introduction toDatabases Introduction to Computing 2009
Data vs. Information • Data – a collection of facts made up of text, numbers and dates:Murray 35000 7/18/86 • Information - the meaning given to data in the way it is interpreted: Mr. Murray is a sales person whose annual salary is $35,000 and whose hire date is July 18, 1986. Introduction to Computing 2009
What is a Database • A computer database is a structured collection of records or data that is stored in a computer system • A Database is a structured collection of data which is managed to meet the needs of a community of users. Exploits the hardware resources of one or more processors • Databases are designed to offer an organized mechanism for storing, managing and retrieving information. They do so through the use of tables. Introduction to Computing 2009
What is the ultimate purpose of a database management system? Is to transform Data Information Knowledge Action Data driven decision making Introduction to Computing 2009
What is a Database? • A structured collection of related data • An filing cabinet, an address book, a telephone directory, a timetable, etc. • Google and your email is a database • School Student Information System Introduction to Computing 2009
Name: Barry HarrisCollege: MedicineTel: 392-5555 Basic Database Concepts • Table • A set of related records • Record Name: Barry HarrisCollege: MedicineTel: 392-5555 • A collection of data about an individual item • Field Name: Barry Harris • A single item of data common to all records Introduction to Computing 2009
An Example of a Table Fields Records Introduction to Computing 2009
Different parts of a database • Fields – different types of data (number or text) • Records • Queries • Reports Introduction to Computing 2009
Primary Keys & Foreign Keys To ensure that each record is unique in each table, we can set one field to be a Primary Key field. A Primary Key is a field that that will contain no duplicates and no blank values. Foreign Keys link to data in other tables Introduction to Computing 2009
What is a Database Management System? • A Database Management System (DBMS) is: • A software system designed to store, manage, and facilitate access to databases. • Typically this term used narrowly • Relational databases with transactions • E.g. Oracle, DB2, SQL Server • Mostly because they predate other large repositories • Also because of technical richness • When we say DBMS in this class we will usually follow this convention • But keep an open mind about applying the ideas!
What is a Relational Database Management System (RDMS)? A relational database is a collection of tables from which data can be accessed in many different ways without having to reorganize the database tables. DON’T DUPLICATE DATA • That is, once relationships are created, tables can “talk” to each other. We can link (relate) the tables to find: • Which schools are in a system? • Which students are in which class? • Which classes are filling up? Introduction to Computing 2009
Relationships Introduction to Computing 2009
Database Options Consumer • Flat Files • Microsoft Excel- Limit of 65,536 Rows • Microsoft Access • FileMaker Pro • MySQL (Open Source) • Postgres (Open Source) Enterprise RDMS • Oracle • IBM/DB2 • MS SQL-server • Sybase • Informix • Lotus Notes • MySQL (Open Source) • Postgres (Open Source) Introduction to Computing 2009
Input Data with Forms • A friendlier view of the database • Used for data input, menus, display and printing • Can perform Calculations and Combine fields Introduction to Computing 2009
Databases and the Web • Accessing databases through web forms • Java programming interface (JDBC) • Embedding into HTML pages (JSP or ASP) • Access through http protocol (Web Services) • Using Web document formats for data definition and manipulation • XML, XML databases and messaging systems Introduction to Computing 2009
Queries • A means of asking questions (querying) of your data • Can look across a number of Tables and other Queries • Can perform Calculations and Combine fields Introduction to Computing 2009
SQL • Structured Query Language (SQL) is used for relational database “programming.” • it is alleged that SQL is the most commonly used programming language in the world • SQL is essentially divided into two sublanguages • Data Manipulation Language (DML) • Data Definition Language (DDL) • SELECT "column_name" FROM "table_name" • SELECT • SELECT F2Q2B, Count(*) AS TOTAL FROM FORM2 GROUP BY F2Q2B • select F2Q3, F2Q3T from form2 ORDER BY F2Q3 Introduction to Computing 2009
Introducing Reports • Output of information in a printed report • Allows you to group and summarize data • Can perform Calculations and Combine fields • Cannot Edit Data • Can Make Labels Introduction to Computing 2009
XML: Extensible Markup Language • Defined by the WWW Consortium (W3C) • XML has become the basis for all new generation data interchange formats. • A wide variety of tools is available for parsing, browsing and querying XML documents/data Introduction to Computing 2009
Data Mining • Searching for novel patterns, rules or relationships in data, e.g.: • correlations • classification • clustering • visualization • Versus traditional statistics: hypothesis testing • States Data Mart - Cognos Introduction to Computing 2009