Tuesday 17 February 2009

Assignment for BTEC Data Analysis and Design

Assignment Part 1

1) What different data models are used in databases? Describe and give examples of each.

Data models are tools to facilitate an understanding of business information requirements.

We learnt 3 different data models.

1. Entity – relationship model
2. Relational model
3. Network model

• Entity - relationship model

Description:

Entity – relationship model is the most commonly used data model during analysis.
We first identify the things of interest in the business enterprise and then categorise them into types. Things are called entities and these categorised types are called entity types.
Relationships are made between the entity types. A diagram which shows these relationships are called entity – relationship diagram. Entity types and relationships are both documented. The diagram and the documentation together is called the entity – relationship model.

Example:

We can look at this in an example of teachers and students at CLC.
We can either call teachers and students with their names or we can categorise them into types. Instead of Mr. Michael or Dr. Sahar, we have ‘Teacher’ and instead of John and Radix, we have ‘Student’.

• Relational Model of Data

The most widely used data model for implemented systems is the relational model.
The relational model was originally defined by Codd in 1970 and later described by Date.
According to the fathers of this data model, every model should consist of 3 components:
1. The objects which form the model.

In a relational data model, a database is a set of relations. A relation can be defined in terms of the set product of several domains. For example, Name domain, description domain and price domain are all put together in one table.


2. Model integrity rules.

The model has 2 integrity rules. These rules are not optional; they are part of the model. The rules are:

• Entity integrity

The integrity of an entity is that the entity is always uniquely identified. Every relation has a primary key attribute. Primary key attribute(s) must never be NULL.

• Referential integrity

It defines how relations reference other relations or how tables reference other tables. Referential integrity is the rule concerning foreign key values. Foreign keys are primary keys in other tables. For example: The attribute name is a primary key in the 1st table but it is a foreign key in the 2nd table. ISBN is a primary key in the 2nd table.
We can have NULL foreign key values where relationships are optional.


3. Set of data operators.

Codd originally proposed an extended set of algebra called relational algebra. Required relational operators are specified in order to operate on the database. Relational algebra is difficult to learn and use for non-mathematicians. Relational calculus is was a pre-cursor to SQL. All the proposed operators are mathematically based and non-procedural. The user makes a statement about what they want. Nowadays a standard set of operators we use is SQL. SQL is a part of the data model.

2) Give examples, descriptions and uses of databases that are currently in the market. Which ones figures amongst the top three ones and why?
3) What are the different approaches to datbase design? Give examples of each. Which one is the most popular and why?

I didn't put the answers for the 1st part of the assignment. You can check your hand-outs. All the answers are there.

7 comments: