Database Basics An Overview
Spreadsheets Last Name/Department First Name Phone Title Department Mail Stop ABE North 555-1100 - Adult Basic Education 32407C Bently 555-1101 Instructor Anthropology 33361A Central 555-1102 23122 South 555-1103 4Sr001 ABLE NETWORK CENTRAL 555-1104 SVI345 ABTS Betsy 555-1105 Assistant Registrar ADMISSIONS/REGISTRATION 2449A ACADEMIC CENTER SOUTH 5551107 4SR001 ACCOUNTING 555-1108 555-1109 23176 DISTRICT 55-1110 1BO100 ACCOUNTING - COLLEGE TRANSFER 555-1111 21142
Four Problems Redundancy— repeated data— the need to make a change in more than one place Inconsistent updates – Inconsistent entry Partial data
Relational Databases The relational model was designed to solve problems with earlier models, particularly in the areas of flexibility and redundancy The original model was proposed by a man named Codd, a mathematician who worked for IBM It has the advantages of flexibility, reliability, and low redundancy and good data integrity It has disadvantages of complexity and performance speed
Elements of a Relational Database Table—a two dimensional structure consisting of rows and columns (in technical books called a ‘Relation’) Row—a portion of a table containing data that describes one entity, relationship or object (also called ‘record’ or ‘tuple’) Field --or column of a table also called an ‘attribute’
Tables and Relationships Columns Primary key Rows Foreign Key
Database Management Systems A Database Management System Manages one or several databases The functions of a DBMS are Create databases and database objects Create supporting structures Read and update Database tables Maintain Database structures Enforce rules Control concurrency Provide security and backup
The Major DBMSs Access SQL Server Oracle DB2 MySQL
SQL Structured query language is the language used to create and describe all the structures in a Relational database. It implements inserting, updating and Deleting data
Applications Database Applications use a programming language, a database API such as ODBC or OLEDB, and embedded SQL to create applications that manipulate database data.
Application/DBMS/Database Simple diagram Application DBMS Database
XML Increasingly, XML is used as a format for Data Transformation XML is DBMS, Application and OS independent As text it can pass safely through firewalls
Web Application Approaches DBI (with PERL) JDBC—Java Database connectivity ASP--Active Server Pages ASP.NET
Building a Database System Requirements Design Implementation Determine the application requirements Build Data Models Create Tables Relationships Indexes Other Structures Create database structures Populate with data Build and test applications