Anda di halaman 1dari 7

What is a Data Model? A model is a representation of something in our environment. Models are all around us.

An organizational chart is a model of a reporting structure in a company. A blueprint is a model for a building. A table of contents is a model of the contents in a book. Data is a representation of facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by humans or by automatic means." A data model is a diagram that uses text and symbols to represent groupings of data so that the reader can understand the actual data better. Examples: A spreadsheet groups data in columns. There is a column for last name, another for first name, and so on. A data model takes this idea a step further, showing not only the column headings but also the way in which the headings relate to each other. For example, a data model will show not only "first name" and "last name," but also how first name and last name relate to each other. A claims data model for an insurance company, for example, most likely will display claim and policy information as well as the ways in which each type of information relates to the other. Claim number, policy effective date, claim amount, deductible, and hundreds of other possible groupings of data will be diagrammed, along with the ways in which they relate to one other. Quite simply, data models are abstract models whose purpose is to describe how data can be used and represented effectively. The term data model is, however, used in two different ways. The first is in talking about data model theory that is, formal descriptions of how data can be used and structured. The second is in talking about an instance of a data model in other words, how a particular data model theory is applied in order to make a proper data model instance for a specific application. * Data modeling refers to the process whereby data is structured and organized. * A database model is a collection of logical constructs used to represent the data structure and relationships found within the database. A data model is a collection of concepts that can be used to describe the structure of a database. The purpose of a data model is to represent data and to make the data understandable. There have been many data models proposed in the literature. They fall into three broad categories: 1. Object Based Data Models 2. Physical Data Models 3. Record Based Data models

The object based and record based data are used to describe data at the conceptual and external levels. The physical data is used to describe data at the internal level.

Before looking at the above:


Conceptual Data Model A conceptual data model identifies the highest-level relationships between the different entities. Features of conceptual data model include: Includes the important entities and the relationships among them. No attribute is specified. No primary key is specified.

The figure below is an example of a conceptual data model.

Conceptual Data Model

From the figure above, we can see that the only information shown via the conceptual data model is the entities that describe the data and the relationships between those entities. No other information is shown through the conceptual data model. Logical Data Model A logical data model describes the data in as much detail as possible, without regard to how they will be physical implemented in the database. Features of a logical data model include: Includes all entities and relationships among them. All attributes for each entity are specified. The primary key for each entity is specified. Foreign keys (keys identifying the relationship between different entities) are specified. Normalization occurs at this level.

The steps for designing the logical data model are as follows:

1. 2. 3. 4. 5.

Specify primary keys for all entities. Find the relationships between different entities. Find all attributes for each entity. Resolve many-to-many relationships. Normalization.

The figure below is an example of a logical data model.

Logical Data Model

Comparing the logical data model shown above with the conceptual data model diagram, we see the main differences between the two: In a logical data model, primary keys are present, whereas in a conceptual data model, no primary key is present. In a logical data model, all attributes are specified within an entity. No attributes are specified in a conceptual data model. Relationships between entities are specified using primary keys and foreign keys in a logical data model. In a conceptual data model, the relationships are simply stated, not specified, so we simply know that two entities are related, but we do not specify what attributes are used for this relationship.

Physical Data Model

Physical data model represents how the model will be built in the database. A physical database model shows all table structures, including column name, column data type, column constraints, primary key, foreign key, and relationships between tables. Features of a physical data model include: Specification all tables and columns. Foreign keys are used to identify relationships between tables. Denormalization may occur based on user requirements. Physical considerations may cause the physical data model to be quite different from the logical data model. Physical data model will be different for different RDBMS. For example, data type for a column may be different between MySQL and SQL Server.

The steps for physical data model design are as follows: 1. 2. 3. 4. Convert entities into tables. Convert relationships into foreign keys. Convert attributes into columns. Modify the physical data model based on physical constraints / requirements.

The figure below is an example of a physical data model.

Physical Data Model

Comparing the logical data model shown above with the logical data model diagram, we see the main differences between the two: Entity names are now table names.

Attributes are now column names. Data type for each column is specified. Data types can be different depending on the actual database being used.

1. OBJECT BASED DATA MODELS (Object Based Logical Models) Object based data models use concepts such as entities, attributes, and relationships. An entity is a distinct object in the organization that is to be represented in the database. They are used in describing data at the conceptual and view levels. They provide fairly flexible structuring capabilities and allow data constraints to be specified explicitly. An attribute is a property. Some of the more common type of object based data model are: Entity- Relationship Model Object Oriented Model Semantic Data Model Functional Info-logical Data Model Binary Model

2. PHYSICAL DATA MODEL (Low Level) Physical data models describe how data is stored in the computer, representing information such as record structures, record ordering and access paths. There are not as many physical data models as logical data models, the most common are: Unifying Model Frame memory mode

3. RECORD BASED DATA MODELS Record based logical models are used in describing data at the logical and view levels. In contrast to object based data models, they are used to specify the overall

logical structure of the database and to provide a higher- level description of the implementation. Record based model are so named because the database is structured in fixed format records of several types. Each record type defines a fixed number of fields, or attributes, and each field is usually of a fixed length. The three most widely accepted record based data models are: Hierarchical Model Network Model Relational Model

Relational Model This model uses a collection of tables to represent both data and the relationship among those data. Data is organized in to independent 2-dimentional array called tables or relations. Each relation has multiple columns (fields or attributes) each with a unique name. The rows (records or tuples) represents one record. The size of table refers to the number of rows while the degree of table refers to the number of columns. This model differs from network and hierarchical in that it does not use pointers or links but relates records by values that they contain a concept that allows a mathematical foundations to be defined. Network Model Data in this model are represented by collection of records (as C or C++ type), and relationships among data are represented by links, which can be viewed as pointers. The records in the database are organized as a collection of arbitrary graphs. Hierarchical Model I s similar to the network model in the sense that data and relationships among data are represented by records and links respectively but it differs from network model in that records are organized as collections of trees rather than arbitrary graphs.

Anda mungkin juga menyukai