1 - Introduction To Databases
1 - Introduction To Databases
Fundamentals
Lecture 1
Dr. Mona Nashaat
Welcome to the course!
- Course Contents:
- Introduction to Database
- Entity Relation Diagram
- Mapping ERD to Tables
- Structured Query Language
2
Databases are everywhere
- We deal with databases all the times in our lives.
3
Before Database Systems
- File-based systems: the systems that are used to organize and
maintain data files. These file systems are used to handle a single
or multiple files and are not very efficient.
- A file-based system helps in basic data management for any user.
- Let’s assume, we are in a company with two departments: HR
department and Financial Department.
- HR department uses word documents to store the data of all
employees.
- Financial department uses excel sheets to manage payroll
Financial Dept.
HR Dept.
4
Advantages of file-based Systems
- The file Based system is not complicated and is simpler to use.
- This system is quite inexpensive.
- Because the file-based system is simple and cheap, it is normally
suitable for home users and owners of small businesses.
- Since the file-based system is used by smaller organizations or
individual users, it stores comparatively lesser amount of data.
Hence, the data can be accessed faster and more easily.
5
Problems of file-based systems
- The File based system is limited to a smaller size and cannot
store large amounts of data.
- This system is relatively uncomplicated, but this means it cannot
support complicated queries, data recovery etc.
- There may be redundant data in the file-based system.
- The data is not very secure in a file-based system.
- The data files in the file-based system may be stored across
multiple locations. Consequently, it is difficult to share the data
easily with multiple users.
We need to update
our records too
Financial Dept.
We need to
increase salary for
employee how got HR Dept.
masters degree
6
Then, comes the databases
- Database: a collection of related data.
- Database management system (DBMS): a software/package
used to facilitate the creation and maintenance of computerized
database.
- Database system = Database + DBMS
DBMS Databases
Database System
7
Database system main components
Users
Application Programs
• Username
• Table Name
• Password
• Column Name
• User’s Privileges
• Column data types
• DB Objects
• Constraints
structure
• Access Privileges
Stored DB Definition (Metadata) • Log files
2. Stored DB
• Ahmed
• 12-1-2001
• 1000
Stored DB
10
Advantages of DBMS
- Controlling redundancy
Update Update
Financial Dept. HR Dept.
Database
Backup
11
Disadvantages of DBMS
- Needs expertise to use
- DBMS is expensive: needs network infrastructures, servers, and
storage
- May be incompatible with any other available DBMS
12