Database creation and modication
Dening a Database Schema
A database schema comprises declarations for the relations
(tables) of the database.
Many other kinds of elements may also appear in the database
schema, including views, ind
Intro to Databases
What are databases?
What is a database?
Is Google a Database?
Does it depend on what we use it for?
or how we use it?
Does it depend on what functionality the database system
What are databases
Entity-Relationship (E/R) Model
The E/R model allows us to sketch the design of a database
Designs are pictures called entity-relationship diagrams.
Fairly mechanical ways to convert E/R diagrams to
Advanced query features
Relations with NULL values
Tuples in SQL relations can have NULL as a value for one or more
Meaning depends on context. Two common cases:
Missing value : e.g., we know Student has a major program
SQL basics and queries
Introduction to SQL
What is SQL?
Standard/Structured Query Language*
Language for interacting with the DB
programmer is able to avoid specifying a lot of data-manipulation details th
Building Database-Driven Web Applications
Connecting to DB from PHP
Accessing DB from PHP
To access the DB from
create a connection
& DB hostname
deal with connection errors
select database to use
create and execute SQ
Modeling Databases using UML
Review of Relational-Model
Entity = thing or object.
Entity set = collection of similar entities.
Similar to a class in object-oriented languages.
Attribute = property of an entity set.
Generally, all entities i