DEV Community

MATHAN S
MATHAN S

Posted on • Edited on

COLLEGE STUDENT & COURSE MANAGEMENT SYSTEM

Hey everyone! I'm just starting my journey into the world of tech, and this is my very first blog post on Dev.to. I'm diving into Database Management Systems (DBMS) — learning the basics, understanding how data is stored, and exploring why databases are so important in today’s digital world. This post is a beginner-friendly introduction, and I hope it helps others who are just starting out like me.

CREATING TABLE

To create a STUDENT table in DBMS, start by designing the table structure based on the information you want to store, such as student ID, name, date of birth, email, department. Once the design is ready, write the SQL CREATE TABLE statement

ALTERING TABLE

To add a phone number column to an existing STUDENT table in a database, you use the ALTER TABLE statement followed by the ADD keyword. This allows you to modify the structure of the table without deleting or recreating it. For example, the command ALTER TABLE STUDENT ADD phone VARCHAR(15);

SELECTING AND MAKING UPPERCASE

To retrieve a student's name in uppercase and calculate the length of their email address from the STUDENT table, you can use SQL functions in a SELECT query. The UPPER() function is used to convert the name to uppercase, and the LENGTH() (or LEN() in some databases) function is used to find the number of characters in the email. For example, the query SELECT UPPER(first_name) AS upper_name, LENGTH(email) AS email_length FROM STUDENT; will return the first name in all capital letters and the length of the email for each student.

DISPLAYING

To display the contents of the STUDENT table, you use the SELECT statement in SQL. The basic command SELECT * FROM STUDENT; retrieves all columns and all records from the table, showing the complete data stored for each student.

Top comments (0)