Database English
Database English
What is Information ?
Once the data is processed and made into a structured context, it is called
information.
For example, Airlines use this software package to book tickets and confirm
reservations which are then managed to keep a track of the schedule.
Metadata – This is the data of the data, i.e., managing the data required to
enter the information
Write down the Advantage of DBMS
Securing the data is easy. The administrator can restrict the usage of the
database to a few people only. Thus, access to the database is restricted
only to the administering team of an Organisation or Business which can
keep the data safe
A single file can manage the entire database which is why duplicity and
redundancy cannot happen. This makes the data more consistent and
easy to update
Since tables can be created in DBMS, interrelating the data and elements
with each other is convenient
The backup and recovery of data is managed by the software, which
ensures that the database is secure at all times
It allows multi-users to operate the database at a single time, making it
more efficient
Data Models
Data Model is the modeling of the data description, data semantics, and
consistency constraints of the data. It provides the conceptual tools for
describing the design of a database at each level of data abstraction. Therefore,
there are following four data models used for understanding the structure of
the database:
Component of ER Diagram
Symbols of ER-Diagram Model
Entity:
An entity may be any object, class, person or place. In the ER diagram, an
entity can be represented as rectangles.
Weak Entity
An entity that depends on another entity called a weak entity. The weak entity
doesn't contain any key attribute of its own. The weak entity is represented by
a double rectangle.
Strong Entity
Strong Entity is independent to any other entity in the schema. A strong entity
always have a primary key. In ER diagram, a strong entity is represented by
rectangle. Relationship between two strong entities is represented by a
diamond. A set of strong entities is known as strong entity set.
Attribute
The attribute is used to describe the property of an entity. Eclipse is used to
represent an attribute.
Types of Attributes
Simple attribute − Simple attributes are atomic values, which cannot be
divided further. For example, a student's phone number is an atomic
value of 10 digits.
Composite attribute − Composite attributes are made of more than one
simple attribute. For example, a student's complete name may have
first_name and last_name.
Derived attribute − Derived attributes are the attributes that do not
exist in the physical database, but their values are derived from other
attributes present in the database. For example, average_salary in a
department should not be saved directly in the database, instead it can
be derived. For another example, age can be derived from data_of_birth.
Single-value attribute − Single-value attributes contain single value. For
example − Social_Security_Number.
Multi-value attribute − Multi-value attributes may contain more than
one values. For example, a person can have more than one phone
number, email_address, etc.
Key Attribute
The key attribute is used to represent the main characteristics of an entity. It
represents a primary key. The key attribute is represented by an ellipse with
the text underlined.
Relationship
A relationship is used to describe the relation between entities. Diamond or
rhombus is used to represent the relationship.
One-to-One Relationship
For example, a student has only one identification card and an identification
card is given to one person.
One-to-Many Relationship
When a single element of an entity is associated with more than one element of
another entity, it is called a one-to-many relationship
For example, a customer can place many orders, but an order cannot be placed
by many customers.
Many-to-One Relationship
For example, students have to opt for a single course, but a course can have
many students.
Many-to-Many Relationship
When more than one element of an entity is associated with more than one
element of another entity, this is called a many-to-many relationship.
For example, you can assign an employee to many projects and a project can
have many employees.
Keys
Key is an attribute or a collection of attributes that uniquely identifies
an entity. Various types of keys are discussed below:
1 A primary key generally focuses on the uniqueness of the A foreign key is generally used to build a
table. It assures the value in the specific column is unique. relationship between the two tables.
2 The table allows only one primary key. Tables can allow more than one foreign key.
3 The primary key doesn’t allow null values. The foreign key accepts multiple null values.
4 It can identify the record uniquely in the database table. A foreign key is a field in the table that is the
primary key in another table.
5 In the primary key, the value cannot be removed from the In this, the value can be deleted from the
parent table. child table.
6 Its restriction can be completely defined on the temporary Its restriction cannot be defined on the
tables. global or local temporary tables.