Professional Documents
Culture Documents
CPS405 ch03
CPS405 ch03
Course Table
CourseID CourseDesp MentorID
DCS Diploma In Computer Studies 1006
DIC Diploma In Computing 1006
DICT Diploma In Info-Comm Technology 1002
DIT Diploma In Information Technology 1001
Relational Database Terminology
Student table (a)
(c)
StudID LastName FirstName Gender DateEnrolled GPA GroupLeader CourseID
S001 Bartell Joseph P. M 15-Feb-02 3.21 S005 DCS
S002 Kebel Laura N. F 23-Jun-01 2.71 S007 DIC
S003 Lee Choy Yan F 05-Jan-02 3.82 S016 DIT
S004 Lewis Derrick H. M 03-Mar-00 2.51 S007 DICT
S005 Law Arthur M 01-Apr-01 3.05 DIT
(b)
S006 Mikulski Kathleen F 12-Sep-03 1.89 S010 DCS
S007 Tham Tian En F 19-Sep-03 3.89 (e) DCS
Columns contain the column name, data type, and any other
attributes for the column.
particular object.
A column may contain or not contain any key value and also
may served as Primary or Foreign Key.
Relational Database Terminology
Primary key
A primary key is a single field or combination of fields that
None of the fields that are part of the primary key can contain
a null value. A table can have only one primary key.
General Guidelines:
• No duplicate values are allowed in a primary key.
General Guidelines:
Foreign keys are based on data values and are purely logical,
column.
In the Student table, those who are a group leader are not
eligible to be assigning group leader identification to them
because they themselves is a group leader.
For example S005, the group leader field is with NULL value
because he is not being lead by any leader.
Communicating with a RDBMS by Using SQL.
Relational database management system or RDBMS in short is
a software or environment that acts as the middleman for the
user to communicate to the database.
User need to issue the SQL statement at the RDBMS and then
RDBMS will sent this statement to the database and return a
list of result to the user at the RDBMS interface.
to be displayed
SQL provides the data displayed on an Access form
Communicating with a RDBMS by
Using SQL
SQL statement
is entered Statement is sent
to database
SELECT MentorName
FROM Mentor;
Database
Data is displayed
MentorName
Goile
Rimes
Christopher
Schubert
Norman
Carroll
What is SQL?
SQL (pronounced "sequel") stands for Structured Query
Language.
Primary key
Primary key
END
ANY QUESTION?