In this session, you will learn to:
- Define a Database Management System
- Describe the types of data models and data modeling
- Define a Relational Database Management System
What is a Database Management System ?
- A database is a collection of logically related information. (a database is a collection of related data)
- Database Management is the task of maintaining databases so that information is readily available.
- The software required to perform the task of database management is called a Database Management System (DBMS).
What are Data Models?
In layman terms, a data model is used to organize data. Data models are a logical representation of the business processes in a organization.
Data Model defines how the business interacts with people, places, and things. The data model is used as a reference point for determining the rules of relationships between entities within an organization.
What are the types of Data Models ?
Data Models c an be classified into two categories:
- Object-based logical model focuses on describing the data, the relationship among the data, and any constraints defined.
- Record-based logical model focuses on describing the data structure and the access techniques in the DBMS
- Hierarchical Model
- Network Model
- Relational Model
- Object/Relational Model
- Object-Oriented Model
- Semi structured Model
- Associative Model
- Entity-Attribute-Value (EAV) data model
- Context Model
There are various object-based models. The most widely used is the Entity-Relationship model (ER model).
What is Data modeling ?
Data modeling is the process of structuring and organizing data.
As per wiki, "Data modeling in software engineering is the process of creating a data model by applying formal data model descriptions using data modeling techniques."
More Details and Information can be found at Wikipedia
What is Object-Based Logical Model ?
Object-based logical model,
- Describes the data at the conceptual and view levels.
- Provide fairly enough structuring capabilities.
- Allow one to specify data constraints explicitly.
- Object based Model provides more than 30 models, including
- Entity-relationship model.
- Object-oriented model.
- Binary model.
- Functional data model.
There are various object-based models. The most widely used is the Entity-Relationship model (ER model) introduced by Peter Chen. So Now we are going to focus on this model.
Example 1 : A sample Entity-Relationship model, where
Entities: SUPPLIER, PARTS
Relationship: SHIP (or SHIPMENT)
Example 2 : A detailed Entity-Relationship model
Attributes of Customer (Entity): Customer ID, Name,Street,City
Attributes of Account (Entity): Account Number and Balance
What are Entities in Entity-Relationship model ?
- Chen defined an entity as "a thing, which can be easily identified".
- An entity is any object, place, person, or activity about which data is recorded.
- In the diagramming technique, entities are named and represented inside a box.
- An entity type is a set of things that share common properties:
- STUDENT, COURSE, and GRADE are examples of entity type.
- An entity type is usually in uppercase.
What are the Types of Entities ?
- Dependent entity: Is an entity whose existence depends on the existence of another entity and are also called weak entities
- Independent entity: Is an entity which does not depend on any other entity for existence and are also called regular entities
Define Relationships in Entity-Relationship model ?
Chen defines a relationship as "an association among entities". For example, the relationship between students and instructors represents the fact that an instructor teaches several students and a student is taught by several instructors. This relationship could be named TEACH.
Relationships are depicted as a diamond with the name of the relationship type.
What are Types of Relationships are available in Entity-Relationship (ER) model?
- One-to-Many (or Many-to-One)
Consider the example of a university. For one DEPARTMENT (like the department of social sciences) there can be only one department head. This is a one-to-one relationship.
One-to-Many (or Many-to-One)
A STUDENT can MAJOR in only one course, but many STUDENTs would have registered for a given MAJOR course. This is a many-to-one relationship.
A STUDENT can take many COURSEs and many STUDENTs can register for a given COURSE. This is a many-to-many relationship
What is Relational Database Model ?
In Relational Database model, data is organized/stored in tables. this model was introduced by E.F. Codd in 1970.
- Relational model is an attempt to simplify the database structure.
- It represents all data in the database as simple tables in the row-column format.
- RDBMS can be defined as a DBMS where all data visible to the user is organized strictly as tables of data values and where all database operations work on these tables.
The above picture clearly defines
- The organizing principle in a relational database is the table, a tabular arrangement of data values:
- A table is called a relation.
- The row (or record) in the table is called a tuple.
- The column (or field) is called an attribute.
- The number of tuples is called the cardinality
- The number of attributes is called the degree of the table.
Want to know more about this topic.
What is Relational Database Management System ?
A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. Most popular commercial and open source databases currently in use are based on the relational database model.
A short definition of an RDBMS may be a DBMS in which data is stored in the form of tables and the relationship among the data is also stored in the form of tables. (Taken from Wikipedia).
Today we have, several RDBMS products like :
- Microsoft SQL Server
Want to Learn More on this topic
Conclusion : Today In Chapter 1, we have learn the following topics
Database Management System
types of Data Models
Object-Based Logical Model
Entities in Entity-Relationship model
Types of Entities
Relationships in Entity-Relationship Diagram
Types of Relationships are available in Entity-Relationship (ER) model
Relational Database Model