Introduction to Databases & SQL

Slides:



Advertisements
Similar presentations
Designing MS-Access Tables
Advertisements

C6 Databases.
Professor Michael J. Losacco CIS 1150 – Introduction to Computer Information Systems Databases Chapter 11.
MS Access 2007 IT User Services - University of Delaware.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Attribute Data in GIS Data in GIS are stored as features AND tabular info Tabular information can be associated with features OR Tabular data may NOT be.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
ASP.NET Programming with C# and SQL Server First Edition
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Access Tutorial 2 Building a Database and Defining Table Relationships
 A databases is a collection of data organized to make it easy to search and easy to retrieve in a useful, usable form.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Chapter 15: Using LINQ to Access Data in C# Programs.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
® Microsoft Access 2010 Tutorial 2 Building a Database and Defining Table Relationships.
Chapter 4c, Database H Definition H Structure H Parts H Types.
1 Introduction to Oracle Chapter 1. 2 Before Databases Information was kept in files: Each field describes one piece of information about student Fields.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
Database and Information Management Chapter 9 – Computers: Understanding Technology, 3 rd edition.
Database Basics BCIS 3680 Enterprise Programming.
CIS 250 Advanced Computer Applications Database Management Systems.
Introduction to Databases Angela Clark University of South Alabama.
PREPARED BY: PN. SITI HADIJAH BINTI NORSANI. LEARNING OUTCOMES: Upon completion of this course, students should be able to: 1. Understand the structure.
 A collection of data organized in a way that allows:  Easy access  Easy retrieval of specific data  Easy use of the data.
SHAKEELA Databases = Fun..Fun..Fun. Databases are……UBIQUITOUS EVERYWHERE...Ever Present…used all over the world  Online Movie Store  Airlines  Grades.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
DATABASES Define Software that can hold large amounts of data and allow users to retrieve specific information quickly. (Access, Oracle, etc.) Data is.
1 SQL SERVER 2005 Express CE-105 SPRING 2007 Engr. Faisal ur Rehman.
Geog. 314 Working with tables.
DATA TYPES.
Databases and DBMSs Todd S. Bacastow January
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
Fundamentals of Database
Databases Chapter 9 Asfia Rahman.
Databases Key Revision Points.
GO! with Microsoft Office 2016
Database Systems Unit 16.
Applied CyberInfrastructure Concepts Fall 2017
GO! with Microsoft Access 2016
Created by Kamila zhakupova
Database Management  .
Databases and Information Management
What is a Database and Why Use One?
Basic Concepts in Data Management
MANAGING DATA RESOURCES
Database Fundamentals
Chapter 6 System and Application Software
Chapter 9 Database and Information Management.
What is a Database? A collection of data organized in a manner that allows access, retrieval, and use of that data.
Relational Database Model
MANAGING DATA RESOURCES
Databases and Information Management
Spreadsheets, Modelling & Databases
Relational Database Design
Topic 12 Lesson 1 – Data and databases
The ultimate in data organization
DATABASE TECHNOLOGIES
Chapter 6 System and Application Software
Chapter 6 System and Application Software
Databases This topic looks at the basic concept of a database, the key features and benefits of a Database Management System (DBMS) and the basic theory.
Chapter 6 System and Application Software
Information system analysis and design
Presentation transcript:

Introduction to Databases & SQL 1.0 – 1/28/10 CSC 150 Database Applications & Designs using SQL Covers material in Chapter 1

What is a Database? A collection of logically related computer data organized for rapid search and retrieval of information We must define our terms 2 hour talk, spend 1 hour defining your terms

Where can databases be found? Ideas?

Databases are ubiquitous

What is a Relational Database? Developed by E. F. Codd in 1970 A collection of tables Tables used to store data Tables are rows of records Records contain fields Tables can be related to other tables through common fields Can hold vast amounts of data Thought that it was impractical, couldn’t work on mainframes Name based on way structured Uses tables rather than flat files Other formats: Hierarchical (Yahoo) and Network – Not easy to change Tables like Excel spreadsheet – Is Excel a database? No, cannot query

Why use a Relational Database? Flexibility Runs on many platforms Simplistic Easy to learn Supports many simultaneous users Can support a front end

What is a Table? Means of storing data in a relational database Set of data elements stored in rows and columns Two dimensional structure

Student ID Last Name First Name Major Code 100100 Simpson Homer PT 100200 Flanders Ned EN 200100 Marjorie AC 400300 Szyslak Moe MX Typical RDB table Note first row is names of columns

Parts of a Table Rows Columns Cells Primary Key

Rows Records Data for one object, event, or relationship All rows contain similar data Table may have 1,000s of rows Rows not in a predictable order Wouldn’t store student info & professor info in the same table

Columns Field Each column named Each column has one datatype Some columns may allow for no data – null (unknown value), some may not Columns in specific position 2 or more, usually less than 40 Names must match in related tables Within a table, each column must have a unique name

Cell Where one row meets one column Atomic – single, undividable piece of data – used as whole Many datatypes All cells in a column have same datatype All cells in a row contain data about one object, event, or relationship Atomic – splitting first and last name – got back to example table Most tables use only a small number of datatypes

Common Datatypes Text (Alphanumeric) Numeric Character Word String (several words) Code (M/F, S/M/D) Numeric Integer Floating Point Currency Date/Time Null – no value/unknown value Text can be numbers not used for arithmetic operations – phone number – student id – many primary keys are number fields used as text

Primary Key Unique identification for each row May be single column or more than one column Noun – Names the object, event, or relationship Other columns are adjectives Allows for quick access of table data Noun – names the object for each row, other columns are adjectives because the provide a description of the object

Rules for Primary Key No two rows can have the same primary key Primary key cannot contain null values No table can have more than one primary key Go back to table – what if Last name was the primary key

What is the main reasons to store data in a database? To reduce redundancy To maintain data integrity Redundancy – duplication, storing same information in more than one place A database allows data to be stored in the efficient means Less space taken up to store data – less chance for error Integrity – data stored in the database is correct

Normalization Used during database design A step-by-step process used to reduce redundancy Each step called a “Form” First Normal Form Second Normal Form Third Normal Form The higher the Form, the lower the data redundancy Data referred as being in 1st Normal Form, 2nd Normal Form & so on. Goal is to get data to third normal form

What do We Want to do to Data? View the data Add new data Update existing data Delete obsolete data Query the data Jobs a database needs to perform Need tool program to help - SQL

What is SQL? “Structured Query Language” Developed at IBM in the early 1970’s by Donald Chamberlin and Raymond Boyce Used to query & manage a relational database Declarative language What, not How English like Basics are easy to learn Procedural language – we tell computer how to do something Declarative language – we tell the computer what we want, & it figures out how to do it

Access & Oracle Two of the most prominent database programs Both use SQL Both used in textbook Access does also have a visual query method Some slight differences in environment – justifications, etc Oracle – more serious, used by larger businesses