Database
A database is a structured collection of related data. A database helps us to keep the information in a organized way so that it can easily be accessed, managed, and updated.
Data – a collection of raw facts made up of text, numbers and dates.
Murray 35000 7/18/86
Information - the meaning given to data in a way so that it can be understood and interpreted.
Mr. Rohit is a sales person whose annual salary is 35, 0000 and whose hire date is July 18, 2009
Databases can be analyzed at different levels ,also known as Data Abstraction which means hiding the complexities:
• View Level
• Logical /Conceptual Level
• Physical Level
View level: Application programs hide details of data types. Views can also hide information (e.g., salary) for security purposes.
Logical level: Describes what data is stored in database, and the relationships among the data
Physical level: Describes how a record (e.g., customer) is stored.
.
Type customer = record
Name: string;
Street: string;
City: integer;
End;
Data Models
A data model is a collection of tools for describing Data, Data relationships, Data semantics, and Data constraints.
Type of Data Model
1. Entity-Relationship Model
2. Relational Model
3. Other Models:
• Object-Oriented Model
• Older models: Network Model and Hierarchical Model
1. Entity-Relationship Model
• Entity: Entity is a Real-world object distinguishable from other objects.
• Relationship: Relationship is the association among two or more entities.
E-R model describes the real world Entities (objects) (E.g. customers, accounts, bank branch) and the Relationships between these entities. The entity-relationship model (or ER model) is a way of graphically representing the logical relationships between entities (or objects).
Components of E-R model:
• Rectangles representing entity sets.
• Ellipses representing attributes.
• Diamonds representing relationship sets.
• Lines links attributes to entity sets and entity sets to relationship sets.
Example of E-R Model:
2. Relational Model
The relational model used the basic concept of a relation or table. The columns or fields in the table identify the attributes such as name, age, and so. A tuple or row contains all the data of a single instance of the table. In the relational model, every tuple must have a unique identification or key based on the data.
Hierarchical Model
The Hierarchical Database Model defines hierarchically-arranged data. Relationships in such a system are thought of in terms of children and parents such that a child may only have one parent but a parent can have multiple children. Parents and children are tied together by links called "pointers" (perhaps physical addresses inside the file system). A parent will have a list of pointers to each of their children.
Network Model
The network model is very similar to the hierarchical model actually. In fact, the hierarchical model is a subset of the network model. However, instead of using a single-parent tree hierarchy, the network model uses set theory to provide a tree-like hierarchy with the exception that child tables were allowed to have more than one parent. This allowed the network model to support many-to-many relationships.
No comments:
Post a Comment