Relational Database Management Systems

undefined
 
INLS 623– D
ATABASE
 S
YSTEMS
II
 
Instructor: Dr. Carter
D
ATABASE
 M
ANAGEMENT
 S
YSTEM
 
Database: Logically Coherent Collection of related
data
 
T
YPES
 
OF
 D
ATABASE
 S
YSTEMS
 
Relational
Graph
Object-oriented
 
R
ELATIONAL
 D
ATABASE
 S
YSTEMS
 
IN
 W
IDE
 U
SE
 
Three Major Database Management Systems in
wide use
Oracle - Large, commercial, enterprise-scale, very very
tweakable
MySql - Simpler but very fast and scalable - commercial
open source
SqlServer - Very nice - from Microsoft (also Access)
Postgres – Open source, enterprise scale
SQLite – Very small, mostly used for one user
R
ELATIONAL
 D
ATABASE
Review
What is an Entity?
 
An object of interest with properties or attributes
Give some examples of entities?
 
University domain:
 
student, lecturer, course, grade, room,
facility, year-of-study, major,
department, …
 
E
NTITIES
 H
AVE
 P
ROPERTIES
 
Properties have types
Types: number, string, blob
 
 
In a 
relational
 DBMS, how do we represent
entities?
R
EPRESENT
 E
NTITIES
 
AS
 T
ABLES
Store data in rows and columns
All tables have a name
 
Each column in the table has:
A name (property)
A type
 
Each row is a record
Records contain the data
T
ABLES
Columns
Rows
 
Tables can be related to one another
Table Name:
 People
R
ELATIONSHIPS
A 
constraint
 between two entities
 
Examples?
 
Each student has one grade per course
A student can take multiple courses
 
Types of relationships
one-to-one
many-to-one
 many-to-many
 
T
YPES
 
OF
 R
ELATIONSHIPS
 
K
EYS
: M
ORE
 C
ONSTRAINTS
 
 
Primary Key
Secondary Key(s)
Candidate Key(s)
Foreign Key(s)
P
RIMARY
 K
EY
 C
ONSTRAINT
Uniquely identifies each record in a database table.
 
Primary keys 
must
 contain unique values.
 
A primary key column cannot contain NULL values.
 
Most tables should have a primary key, and each
table can have only ONE primary key.
S
ECONDARY
 
AND
 C
ANDIDATE
 K
EYS
Sometimes there are more than one key for a relation.
 
Database Administrator chooses the primary key.
The other keys are called 
secondary
 keys.
The 
secondary
 and 
primary
 keys are called
candidate
 keys.
 
F
OREIGN
 K
EYS
 
Capture relationships across entities(tables).
A 
FOREIGN KEY 
in one table points to a
PRIMARY KEY 
in another table.
 
T
OPICS
 W
E
 
WILL
 C
OVER
 (C
AN
 C
HANGE
)
 
Review
Database Design
Normal Form
Database Indexing
Database Tuning
Triggers
XML
Database development on the Internet
Non-relational databases
 
M
YSQL
 
Mysql
http://dev.mysql.com/downloads/
MySQL Community Server
Mysql Workbench
Visual tool to manager mysql databases
http://dev.mysql.com/downloads/workbench/
 
R
ESOURCES
 
http://www.w3schools.com/sql/
Slide Note
Embed
Share

Dive into the world of database systems with a focus on relational structures, entities, properties, and relationships. Explore the types of database systems, the representation of entities in tables, and the constraints and types of relationships that govern data connectivity. Gain insights into organizing data coherently and efficiently in various DBMS environments.

  • Database Systems
  • Relational Databases
  • Data Modeling
  • Entities
  • Relationships

Uploaded on Sep 29, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. INLS 623 DATABASE SYSTEMS II Instructor: Dr. Carter

  2. DATABASE MANAGEMENT SYSTEM Database: Logically Coherent Collection of related data

  3. TYPES OF DATABASE SYSTEMS Relational Graph Object-oriented

  4. RELATIONAL DATABASE SYSTEMS IN WIDE USE Three Major Database Management Systems in wide use Oracle - Large, commercial, enterprise-scale, very very tweakable MySql - Simpler but very fast and scalable - commercial open source SqlServer - Very nice - from Microsoft (also Access) Postgres Open source, enterprise scale SQLite Very small, mostly used for one user

  5. RELATIONAL DATABASE Review What is an Entity? An object of interest with properties or attributes Give some examples of entities? University domain:student, lecturer, course, grade, room, facility, year-of-study, major, department,

  6. ENTITIES HAVE PROPERTIES Properties have types Types: number, string, blob In a relational DBMS, how do we represent entities?

  7. REPRESENT ENTITIESAS TABLES Store data in rows and columns All tables have a name Each column in the table has: A name (property) A type Each row is a record Records contain the data

  8. TABLES Table Name: People Columns Rows Tables can be related to one another

  9. RELATIONSHIPS A constraint between two entities Examples? Each student has one grade per course A student can take multiple courses Types of relationships one-to-one many-to-one many-to-many

  10. TYPESOF RELATIONSHIPS 1:1 Each DEPT can employ only 1 EMPL Each EMPL can work for only 1 DEPT 1:N Each DEPT can employ any number of EMPL Each EMPL can work for only 1 DEPT N:1 Each DEPT can employ only 1 EMPL Each EMPL can work for any number of DEPT N:M Each DEPT can employ any number of EMPL Each EMPL can work for any number of DEPT

  11. KEYS: MORE CONSTRAINTS Primary Key Secondary Key(s) Candidate Key(s) Foreign Key(s)

  12. PRIMARY KEY CONSTRAINT Uniquely identifies each record in a database table. Primary keys must contain unique values. A primary key column cannot contain NULL values. Most tables should have a primary key, and each table can have only ONE primary key.

  13. SECONDARYAND CANDIDATE KEYS Sometimes there are more than one key for a relation. Database Administrator chooses the primary key. The other keys are called secondary keys. The secondary and primary keys are called candidate keys.

  14. FOREIGN KEYS Capture relationships across entities(tables). A FOREIGN KEY in one table points to a PRIMARY KEY in another table.

  15. TOPICS WEWILL COVER (CAN CHANGE) Review Database Design Normal Form Database Indexing Database Tuning Triggers XML Database development on the Internet Non-relational databases

  16. MYSQL Mysql http://dev.mysql.com/downloads/ MySQL Community Server Mysql Workbench Visual tool to manager mysql databases http://dev.mysql.com/downloads/workbench/

  17. RESOURCES http://www.w3schools.com/sql/

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#