Lect 1-2pdf
Lect 1-2pdf
Systems
What Is a DBMS?
• A data base is a col lection of interrelated
data.
• A data base ma nagement system (DBMS) is
a col lection of prog ra ms that ma nages the
data base structu re a nd controls access to
the data stored in the data base.
• A data base system(DBS) : It is a
com bination of data base a nd data base
ma nagement systems.
What Is a Database?
A Data base is a col lection of data , typica l ly
describing the activities of one or more
related orga nizations.
• Ed ucation
• Business
• Airlines
• Universities
• H u ma n resou rces
Why shou ld we use data base ?
1. Record Types:
1. Department
2. Employee
2. Fields:
1. Department: DepartmentID, DepartmentName, Location
2. Employee: EmployeeID, EmployeeName, Position
3. Hierarchical Structure:
1. Each department can have multiple employees, but
each employee reports to only one department
hiera rchica l data model
Historical Perspective
1970
◦ Edga r Codd, at I BM’s Sa n Jose Resea rch
La boratory, proposed relationa l data model.
◦ It spa rked the ra pid development of severa l
DBMSs based on relationa l model, a long with a
rich body of theoretica l resu lts that placed the
field on a firm fou ndation.
◦ Codd won 1981 Tu ring Awa rd.
◦ Data base systems matu red as a n academic
disci pline
◦ The benefits of DBMS were widely recog nized,
a nd the use of DBMSs for ma naging corporate
data beca me sta nda rd practice.
Historical Perspective
1980s
◦ Relationa l data model consolidated its
position as domina nt DBMS pa radig m, a nd
data base systems continued to gain
widespread use
◦ SQL query la nguage, developed as pa rt of
I BM’s System R project, is now the
sta nda rd query la nguage
◦ SQL was sta nda rdized in late 1980s, a nd
cu rrent sta nda rd SQL:1999 was adopted by
ANSI a nd ISO
1. Tables:
1. Student
2. Course
3. Enrollment
2. Attributes (Columns):
1. Student: StudentID, FirstName, LastName,
DateOfBirth
2. Course: CourseID, CourseName, Instructor
3. Enrollment: EnrollmentID, StudentID (Foreign Key),
CourseID (Foreign Key), EnrollmentDate
3. Primary Keys and Foreign Keys:
1. StudentID is the primary key of the Student table.
2. CourseID is the primary key of the Course table.
3. EnrollmentID is the primary key of the Enrollment
table.
4. StudentID in the Enrollment table is a foreign key
referencing the Student table.
5. CourseID in the Enrollment table is a foreign key
Historical Perspective
Late 1980s til l 1990s
◦ Considera ble resea rch into more powerfu l query
la nguage a nd richer data model, with em phasis
on su pporting com plex a na lysis of data from a l l
pa rts of a n enterprise
◦ Severa l vendors, e.g., I BM’s DB2, Oracle 8,
I nformix U DS, extended their systems with the
a bility to store new data types such as images
a nd text, a nd to ask more com plex queries
◦ Data wa rehouses have been developed by ma ny
vendors to consolidate data from severa l
data bases, a nd for ca rrying out specia lized
a na lysis
Softwares available
1. MySQL 8.0 latest version
2. PostgreSQL
3. SQLite
4. Microsoft SQL Server Express
5. Oracle Database Express Edition (XE)
6. MongoDB
Program-data dependence --- Three
file processing systems at Some
Company
Schema :
Physica l Level(low)
• how the data is physica l ly stored a nd orga nized
in the
data base, how the data is stored on disk, the
access metds used to retrieve the data, a nd the
a lgorith ms used to perform operations on the
data.
Externa l Level:
It defines how the data is viewed by the users or
Data definition la nguage (DDL) is used to define externa l
a nd conceptua l schemas.
Facu lty_pu blic (fid: string, fna me: string, office: integer)
Facu lty_private(fid: string, sa l: rea l)
Logical data independence is usually required
for changing the conceptual schema without
having to change the external schema or
application programs. It allows us to make
changes in a conceptual structure like adding,
modifying, or deleting an attribute in the
database.