Beruflich Dokumente
Kultur Dokumente
1.1
A database model defines the logical design of data. The model also describes the
relationships between different parts of the data. It determines in which manner data can be
stored, organized, and manipulated.
1. Hierarchical model
In Hierarchical model record types are linked in a treelike structure. The data is stored as
records which are connected to one another through links. A record is a collection of fields,
with each field containing only one value. The entity type of a record defines which fields
the record contains.
Applications
Widely used especially in applications that requires very high performance and availability
such as banking and telecommunications.
E.g.: Windows Registry in the Microsoft Windows operating systems.
2. Network model
The network model is a way of representing objects and their relationships. Hierarchical
model provides single links between set of record. But in network model it provides multiple
links between sets by placing links, or pointers, to one set of records in another
3. Relational model
The relational model is the best known and in todays DBMS most often implemented
database model. It defines a database as a collection of tables (relations) which contain all
data. Most relational databases use the SQL data definition and query language.
Entities
Relationships among entities
Entity rectangle
Attribute oval
Relationship diamond
Link - line
subclass
Superclass
Specialization
Generalization
Generalization is the reverse of the specialization process Several classes with common
features are generalized into a superclass.
E.g.: Student, Tutor, coordinator generalized in to Person
V.
Union
1.2
The most suitable database model for EdVal Pvt. Ltd is Relational model. Reasons to Use
relational database model,
1. Ease of use:
Both the hierarchical and network models are conceptually simple, but relational model is
simpler than both of those two. The revision of any information as tables consisting of rows
and columns is much easier to understand.
2. Flexibility:
Different tables from which information has to be linked and extracted can be easily
manipulated by operators such as project and join to give information in the form in which it
is desired.
3. Precision:
The usage of relational algebra and relational calculus in the manipulation of the relations
between the tables ensures that there is no ambiguity, which may otherwise arise in
establishing the linkages in a complicated network type database.
4. Security:
Security control and authorization can also be implemented more easily by moving
sensitive attributes in a given table into a separate relation with its own authorization
controls. If authorization requirement permits, a particular attribute could be joined back
with others to enable full information retrieval.
5. Data Independence:
Data independence is achieved more easily with normalization structure used in a relational
database than in the more complicated tree or network structure.
1.3
A special type of client/server architecture consisting of three well-defined and separate
processes, each running on a different platform: The 3-tier architecture is one which has a
client tier, a middle tier, and a database tier.
Database tier
The database tier manages the database. At this tier, only database resides.
Middle tier
The middle tier contains most of the logic and communicates between the other tiers. At
this tier the application server and program, which access database, resides.
Client tier
The client tier is the interface between the user and the system. At this layer multiple views
of database can be provided by the application. All views are generated by applications,
which reside in application tier.
In this architecture all three tiers are separated onto different computers. Therefore if EdVal
Pvt. Ltd uses the 3 tier architecture it can gain following advantages,
Scalability
This system is used by different users like tutors, students and parents of students over the
Internet. In this architecture the client is only handling presentation logic (UI). Therefore
only little communication is needed between the client and the middle tier. That making the
client thin. An example of a thin client is an Internet browser that allows us to see and
provide information fast and almost with no delay.
Increase performance
This architecture also causes to ensure good performance of the EdVal system. When
more users access the system it reduces the system performance. In 3 tire architecture we
can add as many middle tiers as needed. It ensures the good performance of the system.
Improved Availability
This system performs timed formative test on-line. Use of redundant application servers can
recover from network of server failures.
Maintainability
Because each tier is independent of the other tiers, updates or changes can be carried out
without affecting the application as a whole.
E.g.: can add new courses or change, update coordinator of subject without affecting other
layers.
Reduced Distribution
Changes to business logic only need to be updated on application servers and need not to
distributed on clients
Improved Security
Security is also the best in the three-tier architecture because the middle tier protects the
database tier. Since the client doesnt have direct access to the database, Data layer is
more secure. Business Logic is generally more secure since it is placed on a secured
central server.
1.4
Integrity constraints provide a way of ensuring that changes made to the database by
authorized users do not result in a loss of data consistency.
1. Entity Integrity
Entity integrity defines a row as a unique entity for a particular table. Entity integrity
enforces the integrity of the identifier column(s) or the primary key of a table.
E.g.: In EdVal systems database students and tutors are identified by their national id
number or the passport number.
2. Domain Integrity
Domain integrity means the definition of a valid set of values for an attribute. In a database
system, the domain integrity is defined by:
Data type: Basic data types are integer, decimal, or character. Most data bases
support variants of these plus special data types for date and time.
Length or size: This is the number of digits or characters in the value. For example, a
value of 5 digits or 40 characters.
Is null value allowed: - Indicates whether the attribute can have null values.
These definitions ensure that a specific attribute will have a right and proper value in the
database.
E.g.: Course code consists of three alphabetical letters, year of the study, credit rating and
a serial number.
3. Referential Integrity
Referential integrity preserves the defined relationships between tables when records are
entered or deleted.
E.g.: each subject can have only one coordinator. Coordinator Id is a foreigns key in subject
table.
Question 2
2.1
Assumptions:
2.2
1. Entity Integrity
Table name
Primary Key
study_program
ID
subject
course_code
coordinator
NID
tutor
NID
student
NID
topics
topic_ID
session
session_ID
unit
unit_ID
2. Domain Integrity
Domain integrity means the definition of a valid set of values for an attribute. In a database
system, the domain integrity is defined by:
Data type: Basic data types are integer, decimal, or character. Most data bases
support variants of these plus special data types for date and time.
Length or size: This is the number of digits or characters in the value. For example, a
value of 5 digits or 40 characters.
Is null value allowed: - Indicates whether the attribute can have null values.
These definitions ensure that a specific attribute will have a right and proper value in the
database.
E.g.: Course code consists of three alphabetical letters, year of the study, credit rating and
a serial number.
3. Referential Integrity
Referential integrity preserves the defined relationships between tables when records are
entered or deleted.
E.g.: Each subject can have only one coordinator
2.3
No Steps
SQL command
CREATE TABLE
`student_evaluation`
CREATE TABLE
`study_program`
10
CREATE TABLE
`tutor_evaluation`
11
2.4
11