IntroductionToDBLectureForStudent
IntroductionToDBLectureForStudent
IntroductionToDBLectureForStudent
&
Development
For example:
to deposit or withdraw funds in bank,
to make a hotel or airline reservation,
to access a library catalog to search for a bibliographic item,
to purchase something online—such as a book, toy, or com-
puter
– Integrity problems
Integrity constraints (e.g. account balance > 0) be-
come part of program code
Hard to add new constraints or change existing ones
Drawbacks of using file systems to store data:
– Atomicity of updates
Failures may leave database in an inconsistent state with
partial updates carried out
E.g. transfer of funds from one account to another should
either complete or not happen at all
– Security problems
Purpose of Database
.
Characteristics of Database Management System
Security: The DBMS also takes care of the security of data, pro-
tecting the data from un-authorized access. In a typical DBMS, we
can create user accounts with different access permissions, using
which we can easily secure our data by restricting user access.
3. Data isolation
• Data in different formats
4. Security problems
Every user of the system should be able to access only
the data they are permitted to see.
– E.g. payroll people only handle employee records, and
cannot see customer accounts; tellers only access ac-
count data and cannot see payroll data.
– Difficult to enforce this with application programs
5. Integrity problems
– Data may be required to satisfy constraints
– E.g. no account balance below $25.00
– Again, difficult to enforce or to change constraints with
the file-processing approach
Data Independence
• Application Program
Data Structure
• Immunity of application to change in storage structure and access
strategy.
Data Dependence vs. Data Independence
• Data Dependent
e.g. SELECT CITY S
FROM S
WHERE ITEM = 'X'; S#
S1
• Linked list: TOP
S2
s1 s2 sn :
S Sn
Top
• Array:
• ALTER TABLE
• CREATE INDEX
• CREATE TABLE
• DROP INDEX
• DROP TABLE
• CREATE USER
• ALTER USER
• DROP USER
Data Manipulation Language (DML)
Insert
Update
Delete
Select
Functions of the DBMS
• It lets end users and application programmers access and use the
same data while managing data integrity.
• A DBMS will use more memory and CPU than a simple file
storage system.
• describe what the user does with the system, such as what
activities that users must be able to perform
• are generally signed off by the user and used as the primary
input for creating system requirements
• Accessibility
• Accuracy
• Audit, control, and reporting
• Price
• Security
• Testability
• etc
Book & DVD Store outline
•
Logical model - This stage is concerned with developing a
database model based on requirements. The entire design is
on paper without any physical implementations or specific
DBMS considerations.
• There are some big data performance issues which are ef-
fectively handled by relational databases, such kind of is-
sues are easily managed by NoSQL databases.
It does not concern itself with how the data will be stored
or where it will be stored physically.
For smaller projects, it's free service can be used but ob-
viously, users need to pay for working with the profes-
sional one which is quite complex as well in its usage.
#3) dModelAid
This tool also has the feature to forward and reverse en-
gineer the databases.
The goal is to create well structured tables that properly reflect the com-
pany’s business environment.
ER diagrams are a visual tool which is helpful to
represent the ER model.