Database Management System
(DBMS) is a set of
programs that enables you to store, modify, and extract information from a
database, it also provides users with tools to add, delete, access, modify, and
analyze data stored in one location.
A database
is a structured collection of data. The data are typically organized to model
relevant aspects of reality (for example, the availability of rooms in hotels),
in a way that supports processes requiring this information (for example,
finding a hotel with vacancies).
How can we design a
database?
Database
design is the process of determining the content and arrangement of data and is
a two step process. In the first step, user requirements are gathered together
and a database is designed which meets these requirements as closely as
possible. The second step consists of transforming this information level design
into a design for the specific DBMS which will be used to implement the system.
What is ER-Modeling?
Entity
Relationship Modeling (ER-Modeling) is the most common way to express the
analytical result of an early stage in the construction of a new database.
What is ER Diagram?
Entity relationship diagrams are a
way to represent the structure and layout of a database. It is often used as a
way to visualize a relational database.
Symbols
used in E-R Diagram
- Entity – rectangle
- Attribute – oval
- Relationship – diamond
- Link - line
Entities are the
principal data object about which information is to be collected.. Entities are
usually recognizable concepts, either concrete or abstract, such as person,
places, things or events which are relevance to database.
What is Attributes?
Attributes described
the entity of which they are associated. For example: “Dilip Saha” is one
instance of the attribute NAME.
What is Primary Key?
A primary
key is a table column that can be used to uniquely identify every
row of the table. Any column that has this property will
do -- these columns are called candidate
keys. A table can have many candidate keys but only one primary key. The
primary key cannot be null.
What is Foreign Key?
A foreign
key is a column, or combination of columns, that contain values that
are found in the primary key of some table (including, possibly, itself). A
foreign key may be null, and almost always is not unique.
What is Composite Key?
A composite key is a combination of
two or more columns in a table that can be used to uniquely identify each row
in the table. Uniqueness is only guaranteed when the columns are combined; when
taken individually the columns do not guarantee uniqueness.
Ellipses -- Attribute
Double ellipses -- multi-valued attribute
Dashed ellipses-- derived attribute, e.g. age is derivable from birth date
and current date
What is Relationships?
Relationship
represents an association between two or more entities. For example: “students
majors in departments”, here we have two entities viz, “student” and “department”.
The relationship is “majors in”.
Normalization:
Definition:
Normalization is a technique that is widely used as a guide in designing
relational databases. It is essentially a two-step process that puts data into
tabular form by removing repeating groups and then removes duplicated data from
the relational tables. In other word it is typically a refinement process after
the initial exercise of identifying the data objects that should be in the
database. Some types of normal forms are defined bellow:
First
Normal Form: A relation or table
is said to be first normal form (1NF) if it does not contain repeating groups.
Second
Normal Form: A relation is said
to be in second normal form (2NF) if it is in first form and no non-key
attributes is functionally dependent on only a portion of the primary key.
Third
Normal Form: A relation is said
to be in third normal form (3NF) if it is in second form and if the only
determinants it has are candidate keys.
Fourth Normal Form: A relation is said to be in fourth normal form (4NF) if it is in third form and the relation has no multi valued dependencies.
No comments:
Post a Comment