[IViettech] - Chapter01- An Introduction to Relational Databases and SQL
[IViettech] - Chapter01- An Introduction to Relational Databases and SQL
An introduction to
relational databases and SQL
Objectives
• An introduction to client/server systems
• An introduction to the relational database model
• An introduction to SQL and SQL-based systems
• The SQL statements
• How to use SQL from an application program
An introduction to
client/server systems
The hardware components of a
client/server system
Client software, server software,
and the SQL interface
Other client/server system
architectures
An introduction
to
the relational database model
What is a database?
A database is an organized form of data
consisting of one or more related data items
called records.
A database is like a data collection to which
we can ask different questions.
S
Relational Database Concepts
Relational Database Concept
• Relational Database is a model of database
was developed by Dr.E.F. Codd in 1970.
• Relational database will reduce data
redundancy and more efficient data retrieval.
• A relational database consists of tables
which contains data.
How a database table is organized
• Concepts:
– Table
– Column
– Row
– Cell
– Primary Key
– Non-Primary Key
or Unique Key
– Indexes
How the tables in a relational
database are related
• Concepts
– Foreign Key
– One To Many relationship
– One To One relationship
– Many To Many relationship
How the columns in a table are defined
– Column Name – Default value
– Data types – Identity Columns
– Null Values
Common MySQL Data types
ERD (Entity Relationship Diagram)
ERD or EERD
• Entity Relationship Diagram(ERD) or
Enhanced Entity Relationship
Diagram(EERD) can be used to show how
the tables in the database are defined and
related.
An introduction to SQL
and SQL-based systems
A brief history of SQL
• Important Events
– 1970 first article about RDBMS is published by Dr.E.F.
Codd
– 1979 Relation Software, Inc (later Oracle) release the
first DBMS, Oracle.
– 1985 DB2 is found
– 1987 SQL Server is released
– 1989 ANSI published standard for a database query
language with name ANSI/ISO SQL-89 (SQL1)
– 1992 ANSI published ANSI/ISO SQL-92 (SQL2)
– 1995 MySQL released
– 2003,2006,2008, 2011 ANSI continue published new
version to update standard for a database query
language.
A brief history of SQL (cont.)
• Important Events
– 1999 ANSI published SQL3
– 2000 MySQL became an open source database
– 2003 ANSI published SQL4
– 2006 ANSI published SQL2006
– 2008 ANSI published SQL 2018
– 2010 Oracle acquired Sun MicroSystem and
MySQL
A brief history of SQL
• How knowing “Standard SQL” helps you
– The same syntax style
– Working with all DBMS
• How knowing “Standard SQL” doesn’t help
you
– Every DBMS has its own functions, keywords…
A Comparison of Oracle, DB2,
MySQL and SQL Server
DBMS Size of system OS
Oracle Large UNIX
Windows