Docsity

DB Lectures for students, Exams of Investment Theory

Partial preview of the text

Download DB Lectures for students and more Exams Investment Theory in PDF only on Docsity!

Database Systems

Dr. Abid Sohail

2

Course Objectives

 The overall aim of this course is to develop

students' knowledge about

 Databases Modeling and Development  SQL and Database implementation in MS SQLServer

4

Grading Scheme (most likely)

What is a database and a DBMS?

Database

 Shared collection of logically related data (and a description of this data),

designed to meet the information needs of an organization.

 System catalog (metadata) provides description of data to enable program–

data independence.

 Logically related data comprises entities, attributes, and relationships of an

organization’s information.

Database Management System (DBMS)

 A software system that enables users to define, create, maintain, and

control access to the database.

Components of DBMS

 Data definition language (DDL) - Permits specification of data types, structures and any data constraints.  Data manipulation language (DML) - General enquiry facility (query language) of the data.  Controlled access to database may include:  a security system  an integrity system  a concurrency control system  a recovery control system

What is Database?

 Definition:

" A shared collection of logically related data,

and a description of this data, designed to

meet the information needs of the

organization."

 Data repository

Customer

transactions

Inventory

Operating

expenses

Payroll

Vendors

Management system controls access

For example…

Invoice No.

Stereos To Go Invoice No. Date: / / Account No. Item Number Product Description/Manufacturer^ Qty^ Price Product Code 1 2 3 4 5 Date Shipped: / / Customer: Address: City State Zip Code Invoice Customer Invoice Items purchased on the Invoice Products and Manufacturers

Anatomy of an Invoice^ Invoice

10001 051593 1005259412 William Tell 2036 - 26 Street •••

FD Invoice-File. 01 Invoice-Record. 05 Invoice-number PIC X(5). 05 Invoice-date PIC X(6). 05 Cust-account-number PIC X(10). 05 Cust-First-Name PIC X(15). 05 Cust-Last-Name PIC X(20). 05 Cust-Address PIC X(30). FD Invoice-File. 01 Invoice-Record. 05 Invoice-number PIC X(5). 05 Invoice-date PIC X(6). 05 Cust-account-number PIC X(10). 05 Cust-First-Name PIC X(15). 05 Cust-Last-Name PIC X(20). 05 Cust-Address PIC X(30).

Traditional File-Based System

Invoice Program Invoices Customer Account Program Account Report Customer Mailings Program Mailing List Customer Orders “A collection of application programs that perform services for the end users such as the production of reports. Each program defines and manages its own data.” Customer Mailing List Customer Accounts File

File-Based Systems

 Records contain logically related data

 Limitations:

 Separation and isolation of data ( one file, one program )  Duplication of data

 Loss of data integrity - uncertainty of the correct version of

data and no consistency

 Data dependence - application program defines the data  Incompatibility of file formats  Fixed queries of application programs - little flexibility in meeting changing information needs

Database

Data and Data Definitions Applications

 “A shared collection of logically related data

(and a description of this data), designed to

meet the information needs of an

organization.”

Central Repository Separation

Tightly binds the data file and program

Data Abstraction

 Separation between the data’s structure

(definition) and the application programs

FD Master-File. 01 Master-Record. 05 ID PIC X(10). 05 Customer-Fname PIC X(25). . . .

COBOL

Data Output Program

Data Abstraction

 Separation between the data’s structure

(definition) and the application programs

Data and Data Definitions Applications Central Repository

DBMS

Application programs can be run on either the clients or server