Answer To: A university college decided to create a database to schedule classes. The database business rules...
Ali Asgar answered on Jul 28 2021
Contents
Part 1. Conceptual Model: 1
Entities: 1
Relationships: 2
Entity Relationship Diagram 3
Part 2: 5
Data Attributes and Types: 6
Ralational Schema (logical Diagram) 11
References: 12
Part 1. Conceptual Model:
To design a relatively complex system, we need to gather a lot information and data about the various stakeholders that will be affected by the implementation of the new system.
I our current scenario, we need to design a database system that will store information related to the schedule of classes in a university. For this we will need to identify the various components of a Database system like the Entities, their attributes and the relationship among the various entities.
This model does not contain granular details. It establishes overall scope of a system. It defines what to be included with in the model. This is used as a foundation for Logical diagram.
Assembling all these data points lead us to the creation of a Conceptual Model Diagram that is commonly known as an Entity-Relationship Diagram or ER Diagram.
Entities:
Entities, in a database, are objects about which we need to store information. It may contain places, people, things etc. An entity can be something that varies independent of other entities. It must be important enough that it needs to be maintained. It must be such that it cannot be separated into subcategories. It should have many facts associated with it.
An entity might be characterized as a thing fit for a free presence that can be remarkably distinguished. An entity is a deliberation from the intricacies of a space. At the point when we talk about an entity, we typically discuss some part of this present reality that can be recognized from different parts of the genuine world.
An entity is a thing that exists either genuinely or sensibly. An entity might be an actual item like a house or a vehicle (they exist truly), an occasion like a house deal or a vehicle administration, or an idea like a client exchange or request (they exist legitimately—as an idea).
With the business rules given to us, the entities in our model are:
1. Room: - This entity stores data related to any location in the university campus. It has attributes BuildingID, RoomID, and Capacity. Since a room must be one of two types a Lab or a classroom, the Room entity is a supertype entity.
The Room Entity has RoomID as the primary Key.
2. Lab: - This is a sub-entity of Room. It has all attributes of Room and some additional of its own. The Lab entity has a Labtype Attribute that can take values of Network, Web-Design, Software Development etc. The RoomID attribute from Room entity is used as a primary key for this entity.
3. Classroom:- This is also a sub-entity of Room. It has all attributes of Room and an additional attribute of BoardType that can have values Wall-mounted, mobile whiteboard, glass board, chalkboard etc. The RoomID attribute from Room entity is used as a primary key for this entity also.
4. Media:- This entity has a MediaType attribute that stores the data about the mediaType installed in the Room.
5. Computer: This is an entity that stores data related to the computers installed in the Lab. This entity has attributes of ComputerType, Description, MemorySize, ProcessorSpeed
The attribute computerType can be used as a primary key for this entity.
6. Teacher: This enitity stores information about the Teacher. It has attributes like ID, Name, Rank and Email. The ID attribute is used as a primary key here.
7. Session: A session attribute stores information related to the class session. It has attributes DayOfWeek, StartTime and EndTime.
8. Unit: Unit is the course being taught in the university. It has UnitID, UnitDescription, Credits and Prerequisites as its Attributes.
9. Class: A class entity has ClassID and EnrollmentLimit as the attributes.
10. Schedule: A schedule Entity has Year and Semester as its attributes.
The ClassType and LabType attributes are discriminators of Room Entity.
Relationships:
A relationship captures how entities are related to one another.
1. A Lab has to be a Room and thus will have all attributes of a Room. The cardinality of this relationship is 1:1 as Each lab must be a room and a room can be only one Lab or classroom.
2. A Classroom has to be a Room and thus will also have all attributes of a Room. The cardinality of this relationship is 1:1 as Each classroom must be a room and a room can be only one Lab or classroom.
3. Each room can have zero to many Media. This relationship has 0:M cardinality.
4. A lab must have one of the different types of computers.
5. A unit may have zero to many prerequisites. This relationship has 0:M cardinality.
6. A unit may have one to many...