Lec 09 22102023 041515pm
Lec 09 22102023 041515pm
Lec 09 22102023 041515pm
Computing FUNDAMENTALS
FUNDAMENTALS OF DATABASE
What is a database?
Databases are everywhere, but you never see them.
They are hidden behind the tools and services that you use
everyday.
Ever wondered where facebook, and twitter put their data?
It’s all stored in the database.
What is a database?
Where do google store it’s pages?
Where are the contacts in your mobile phone stored?
What is a database?
Databases do most of the work and the information systems
that we use every day.
So what is a database? Is it just a random collection of stuff
all squeezed in together.
No, databases are organized. Databases have a structure and
all the data we store in them fits into this structure.
What is a database?
What is a database?
Simple type of databases are called flat-file databases.
They store data in columns of fields and rows called records.
What is a Record?
A complete set of information.
Records are composed of fields.
What is a field?
A space allocated for a particular item or information.
A collection of fields is called a record.
Example
Let’s think about a simple database that Ibrahim uses to store his address book.
This address book contains names, addresses, birthdays, and telephone numbers
of his friends and family.
Example
Ibrahim has met his friend Megan, would like to add her to
his address book.
He writes down her First Name, Last Name, address, post
code, date of birth and her telephone number.
example
The details that Ibrahim writes down are stored in fields in his
address book database.
Example
The information about Megan fills a row in his database file.
Example
Each row is called a record and each of the rows holds information
about a different person in his address book.
Example
Ibrahim can carry out operations on his stored database, he can search it to find a
particular person.
Example
Ibrahim can make the search more accurate by selecting the field he wants
. So, he can ask the database to return all the records where the first name
= to Megan.
Example
Or Ibrahim could ask the database to show everyone with a birthday in
December.
Example
Example
He can sort the database to show the records in a different order.
EXAMPLE
Fields can store different types of data.
Example
example
Representation or Implementation Data Model-
BOOK AUTHOR
CUSTOMER ORDERS
CUSTOMER ID CUSTOME ORDERS CUSTOME ORDERS AMOUNT
R NAME ID R ID DATE
ORDERS ITEMS
ORDERS CUSTOME ORDERS AMOUNT ORDERS ID ITEMS ID
ID R ID DATE
555 201
555 101 12/11/2017 RS. 5000
555 202
556 102 13/11/2017 RS. 2500
557 101 14/11/2017 RS. 1500 556 202
556 203
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
ER Model is best used for the conceptual design of a
database.
ER Model is based on −
Entities and their attributes.
Relationships among entities.
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
High-level or conceptual database model- ENTITY
RELATIONSHIP MODEL
Representation or Implementation Data Model-
HEIRARCHICAL DATABASE MODEL
Representation or Implementation Data Model-
NETWORK DATABASE MODEL
DATABASE MANAGEMENT SYSTEM
Database management systems (DBMSs) are specially
designed software applications that interact with the user,
other applications, and the database itself to capture and
analyze data.
Well-known DBMSs include MySQL, MariaDB,
PostgreSQL, SQLite, Microsoft SQL Server, Oracle, SAP,
dBASE, FoxPro, IBM DB2, LibreOffice Base and
FileMaker Pro.
DATABASE MANAGEMENT SYSTEM
A typical DBMS has users with different rights and permissions who use it
for different purposes. Some users retrieve data and some back it up. The
users of a DBMS can be broadly categorized as follows −
DATABASE MANAGEMENT SYSTEM