How To Create Dynamic Web-Based Schedule With ASP.NET

Universities and colleges all over the world are now taking advantage of the fact that students can be reached with websites. In line with this, they now give students the opportunity to apply, contact the school and register for events through their websites. The more students register, the more the need for dynamic content to handle all of these activities. In line with this, schools now create dynamic web-based schedule with ASP.NET. Full information about every class is now provided on the schedule, including information such as if there is a lab component for a particular department and if the class is full. It is possible to use ASP.NET alongside SQL Server for creating this type of application on a website. For developing a web-based schedule that is dynamic, the programmer in charge of the project will need Visual Web Developer or Visual Studio 2008 and a recent version of SQL Server. He will subsequently need to follow these steps to achieve the task.

Database Creation

dynamic web-based schedule with ASP.NET

To create dynamic web-based schedule with ASP.NET, you will have to start by creating a database.

  • First the individual will need to open the SQL Server Management Studio application from the programs menu after clicking the start button.
  • A connection to the local database server should be established.
  • Click on New database after right clicking on database.
  • Assign a name to the database and select OK.

By the way, if you host your website with 3rd party service, please make sure you find an ASP.NET hosting with database support.

Main Table Creation

  • In the SQL Server Management Studio application, collapse the Database and mwd (you will see this after collapsing the database folder) folder by clicking on the plus button at the back of the folder.
  • Click on New Table after right clicking on Tables. Name the new table ClassShedule.
  • You will need to create the following fields, with the following properties as listed in brackets.
    • ID (Not null, Data type: int, Primary Key). Set the primary key by clicking on primary key, after right clicking on the column for ID. The identity specification for this column should also be set to Yes.
    • Section NameId (Not null, Data type: int, Foreign key).
    • SynonymID (Null, Data type: int).
    • CreditHours (Null, Data type: int).
    • Title (Null: Data type: varchar(50)).
    • NoSeats (Null, Data type: int).
    • SeatsNotOccupied (Null, Data type: int)
    • InformationforMeet (Null, Data type: varchar(50)).
    • RoomNoID (not null, Data type: int, Foreign key).
    • Days (Null, Data type: varchar(50)).
    • BeginTime (Null, Data type: varchar(50)).
    • FinishTime (Null, Data type: varchar(50)).
    • InstructorID (not null, Data type: int, Foreign key).
    • LocationID (not null, Data type: int, Foreign key).

Child Table Creation

  • Some child table should also be created for instructors, location, room and section name.
  • In line with this, 4 more tables should be created for Section Name, Room, Location and Instructor.
  • The Section Name table should be titled SectionName and contain fields such as ID (not null, Data type: int, Primary key), SectionName (Null, Data type: varchar(50) and synonym (null, Data type: varchar(50)).
  • Table for Room should be titled Room and contain fields such as ID (not null, Data type: int, Primary key) and Room (Null, Data type: varchar(50)).
  • Location Table should contain fields such as ID (not null, Data type: int, Primary key) and Location (Null, Data type: varchar(50)).
  • Instructor Table should contain fields such as ID (not null, Data type: int, Primary key), InsFirstName (Null, Data type: varchar(50)) and InsLastName (Null, Data type: varchar(50)).

Relational Databases

After creating the 4 different table, plus the first initially table, meaning we now have a total of 5 tables, there is the need to relate them together. This help to avoid repeating datas, as the datas will be taken care of in the other datable. With this, you will have less redundant (unnecessary or unneeded) data and your databases will be neater and more compact. It also enhances records integrity while making it easier to maintain data.

The SectionName, Room, Instructor and Location Table will all the linked to the main table (ClassSchedule Table). You will observe this table already has a SectionNameID, RoomNumberID, InstructorID and LocationID. It is this IDs they will use in relating and getting information from the child tables.

Database Program Creation

The process to create dynamic web-based schedule with ASP.NET will continue by the creation of a database program.

  • Click on New Database diagram after right clicking on database diagrams.
  • In the table for adding windows, add the 5 tables (the main table and 4 mini tables) we have created earlier by selecting the names of the table.
  • Arrange the location table on the right; sectional name, instructor and room tables on the left, while the main table (ClassSchedule) should be in the middle.
  • Click and drag the column for ID in SectionName table to the column for SectionNameID in the main table. Click OK in the resulting table.
  • Click and drag the column for ID in Room table to the column for RoomID in the main table. Click OK in the resulting table.
  • Click and drag the column for ID in Instructor table to the column for InstructorIDin the main table. Click OK in the resulting table.
  • Click and drag the column for ID in Location table to the column for LocationID in the main table. Click OK in the resulting table.
  • Save your diagram and give it a name. You can save by pressing Ctrl+S on your keyboard and you can give the name as class schedule.

Table population

Populate your table by adding some data. The data will include the name of instructors, locations, Rooms and SectionName. All you have to do is open the table by right clicking on the table’s name and clicking open and then entering the data.

Store Procedure Creation

The database store procedure entails SQL code blocks that are run within the database. To create the store produce, you will need to collapse the database, then programmability (under database), then stored procedures (under programmability) by clicking on the plus signs before the folder names. Click on new procedure and right clicking on stored procedures.

Edit the code in line with this

create dynamic web-based schedule with ASP.NET

Once this is done, you dynamic web based schedule is ready. All you have to do is save it by”

  • Selecting Save As under the file menu.
  • In the dialog box, give the database a name and select okay.

Conclusion

The importance of dynamic web based schedule has encouraged most schools especially at the secondary and tertiary level to create dynamic web-based schedule with ASP.NET on their website. The process of creating this schedule is very easy and straightforward. By just following the instruction stated above, the whole process can be completed.

Leave a Reply