1.8.2 Database
1.8.2 Database
EXTERNAL SCHEMA
The individual’s view(s) of the database.
ENTITY
An entity is a person, place, thing, object, event, or even a concept, which can be distinctly identified.
For example, the entities in a university are students, faculty members, and courses.
STANDARD NOTATION
It is a format to show a table's structure, fields, and primary key.
To indicate the key, we simply underline the attributes that make up the key.
Because we have identified a key that uniquely identifies each tuple, we have removed the repeating
group.
Compared to the File Based Data Management System, Database Management System has many advantages.
Some of these advantages are given below −
This is prevented in a database as there is a single database and any change in it is reflected immediately. Because
of this, there is no chance of encountering duplicate data.
Sharing of Data
In a database, the users of the database can share the data among themselves. There are various levels of
authorisation to access the data, and consequently the data can only be shared based on the correct authorisation
protocols being followed.
Many remote users can also access the database simultaneously and share the data between themselves.
Data Integrity
Data integrity means that the data is accurate and consistent in the database. Data Integrity is very important as there
are multiple databases in a DBMS. All of these databases contain data that is visible to multiple users. So it is
necessary to ensure that the data is correct and consistent in all the databases and for all the users.
Data Security
Data Security is vital concept in a database. Only authorised users should be allowed to access the database and
their identity should be authenticated using a username and password. Unauthorised users should not be allowed to
access the database under any circumstances as it violates the integrity constraints.
Privacy
The privacy rule in a database means only the authorized users can access a database according to its privacy
constraints. There are levels of database access and a user can only view the data he is allowed to. For example - In
social networking sites, access constraints are different for different accounts a user may want to access.
Data Consistency
Data consistency is ensured in a database because there is no data redundancy. All data appears consistently
across the database and the data is same for all the users viewing the database. Moreover, any changes made to the
database are immediately reflected to all the users and there is no data inconsistency.
More Costly
Creating and managing a database is quite costly. High cost software and hardware is
required for the database. Also highly trained staff is required to handle the database
and it also needs continuous maintenance. All of these ends up making a database
quite a costly venture.
High Complexity
A Database Management System is quite complex as it involves creating, modifying
and editing a database. Consequently, the people who handle a database or work with
it need to be quite skilled or valuable data can be lost.
Database Failure
All the relevant data for any company is stored in a database. So it is imperative that the
database works in optimal condition and there are no failures. A database failure can be
catastrophic and can lead to loss or corruption of very important data.
Huge Size
A database contains a large amount of data, especially for bigger organisations. This
data may even increase as more data is updated into the database. All of these leads to
a large size of the database.
The bigger the database is, it is more difficult to handle and maintain. It is also more
complex to ensure data consistency and user authentication across big databases.
Upgradation Costs
Often new functionalities are added to the database.This leads to database
upgradations. All of these upgradations cost a lot of money. Moreover it is also quite
expensive to train the database managers and users to handle these new upgradations.
Compiled by: Aqeel Ahmed Contact No/Whatsapp: 92-21-333-2113627
Skype ID: Aqeel.ahmed162 E-Mail: [email protected]
Compiled by: Aqeel Ahmed Contact No/Whatsapp: 92-21-333-2113627
Skype ID: Aqeel.ahmed162 E-Mail: [email protected]
What is Normalization?
Normalization is a database design technique that reduces data redundancy.
Normalization rules divides larger tables into smaller tables and links them using
relationships. The purpose of Normalisation in SQL is to eliminate redundant
(repetitive) data and ensure data is stored logically.
UNF
1NF
Definition of 1NF
• Primary Key
• No repeated groups of attributes
• All attributes should be atomic
Definition of 2NF
2NF
• No partial dependencies
STEP # 1
UNF
Notice that you have lost the connection between the above two tables.
STEP # 3
Add a common column to create a relation between them.
Definition of 3NF
Entity-Relationship (E-R) diagrams can be used to illustrate the relationships between entities.
SECONDARY KEY
A YAHYA MOHIUDDIN
A YUSRA MAHMOOD
B AHMED FARAZ
B ARHAM ALI
B EMAAN QAZI
B HAMZA IMAM
B HASHIR REHMAN
B HUZAIFA FARRUKH
B IZAAN ALI ABBASI
B IZAAN SHEIKH
B M TALIB FAROOQ
B M.IBAD KHAN
B MAAZ AHMED
B MAHNOOR REHMAN
B MOHAMMAD KUMAIL KAZMI
B MOHAMMAD SAAD KHAN
B MOHEEZ
B MUHAMMAD ADAM
C AHSAN SHAH
C ALI SUFYAN KHAN
C AMNA ZAFAR
C MUHAMMAD SAAD SOHAIL
C MUHAMMAD WAJIHUDDIN
C SHEHRYAR BAIG
C SHEHRYAR KHAN
C SYED HAMBAL IMAM
C ZAHENASEEB
D ABDULLAH FAREED
D MUHAMMAD HARIS KHAN
D MUHAMMAD JAHANZAIB KHAN
D MUHAMMAD SAMEER