-
Notifications
You must be signed in to change notification settings - Fork 4
Normalization & Finalization
Md Ehsanul Haque edited this page Aug 3, 2023
·
14 revisions
![](https://private-user-images.githubusercontent.com/133691757/257957405-aa07baa3-9065-4ba2-b95b-f21ccd7ca338.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU3NDA1LWFhMDdiYWEzLTkwNjUtNGJhMi1iOTViLWYyMWNjZDdjYTMzOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YzJkNjViMDI2NTZmZDQ3YzZiOGZlZTBhNjgyOGQzYzg1MzBkOTJlMWZiYjM2YzEzY2Y1NWNmMWFmOTU3Njc1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bAHAtgTnLzDy5rKmzOcLLdaPyijko9n-6mNjyyS_TLw)
![](https://private-user-images.githubusercontent.com/133691757/257957158-f20997de-ce27-4619-8d53-d885e81a9121.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU3MTU4LWYyMDk5N2RlLWNlMjctNDYxOS04ZDUzLWQ4ODVlODFhOTEyMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03OTEyZWY2N2VkYTA0OTc5OWFjNzAwYWRlNTgxYTY5ZmU4ZDg0ODAwMDQzNTcwODYwYTljY2ZhZWQ5ZDA0NDUwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.B-ZRhJZ-EVD63nLxKMGKNUy_K_4ZdTOzKLeqEIyjUI8)
- Unnormalized Form: P_ID(PK), P_name, P_duration, P_type, D_ID(PK), D_name, D_head
- 1NF: P_ID(PK), P_name, P_duration, P_type, D_ID(PK), D_name, D_head
-
2NF:
- P_ID(PK), P_name, P_duration, P_type
- D_ID(PK), D_name, D_head
- P_ID(PK), D_ID(FK)
- 3NF: Same as 2NF
- Tables:
- P_ID(PK), P_name, P_duration, P_type
- D_ID(PK), D_name, D_head
- P_ID(PK), D_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956696-f454bcf0-344b-469e-a887-845251330f36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2Njk2LWY0NTRiY2YwLTM0NGItNDY5ZS1hODg3LTg0NTI1MTMzMGYzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yM2U5NGNkMzNlODgwNTQ4NWE2YmQ4YzFlMTVlZjE0MDM3NjM0ZTc4MzdhMjIyMGMxNDE2ZWNiNGQ0ZmMwMzYyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.2vR59-AKQNm8iC_a3PyRv5WqyoO0C4ksnQKciEp25Nw)
- Unnormalized Form: D_ID(PK), D_name, D_head, E_ID(PK), E_Date, E_type, E_roomno, Mark
- 1NF: D_ID(PK), D_name, D_head, E_ID(PK), E_Date, E_type, E_roomno, Mark
-
2NF:
- D_ID(PK), D_name, D_head
- E_ID(PK), E_Date, E_type, E_roomno, Mark, D_ID(FK)
- 3NF: Same as 2NF
- Tables:
- D_ID(PK), D_name, D_head
- E_ID(PK), E_Date, E_type, E_roomno, Mark, D_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956738-43aeee54-af79-44c7-b50c-3898f5f12dc7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2NzM4LTQzYWVlZTU0LWFmNzktNDRjNy1iNTBjLTM4OThmNWYxMmRjNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MDIwOTg5YTE4ZjZhZGI1NjkwNTQzOGUyMTZhOTYwYzVkMzczYzMxMDBlMjQ4NDMwMWQyMjE4N2MwMjFiYTFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ukIVMZGqsgoUho01H77r8D5GXJuOy4F1VHzvMN620MM)
- Unnormalized Form: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, E_ID(PK), E_Date, E_type, E_roomno, Mark
- 1NF: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, E_ID(PK), E_Date, E_type, E_roomno, Mark
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- E_ID(PK), E_Date, E_type, E_roomno, Mark
- S_ID(PK), E_ID(FK)
- 3NF: Same as 2NF
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- E_ID(PK), E_Date, E_type, E_roomno, Mark
- S_ID(PK), E_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956126-40f380c1-a0a0-4026-bdaf-d988add6a5a5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2MTI2LTQwZjM4MGMxLWEwYTAtNDAyNi1iZGFmLWQ5ODhhZGQ2YTVhNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05YWVhMTBmNjU4YTIzMWY0NWNlOTMyYTg4NDI3NTYwOWZkYzYyODkwMTUzOWE0OWIzNjgyODhmMDdkMjE5MTYyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.0JuJs-U70fegZZ3_4cRJDzPEtpDwGWd8QhW3UywzdHw)
- Unnormalized Form: F_ID(PK), F_name, F_contact, F_mail, S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- 1NF: F_ID(PK), F_name, F_contact, F_mail, S_ID(PK), S_name, S_contact, S_mail, EnrollYear
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, F_ID(FK)
- F_ID(PK), F_name, F_contact, F_mail
- 3NF: Same as 2NF
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, F_ID(FK)
- F_ID(PK), F_name, F_contact, F_mail
![](https://private-user-images.githubusercontent.com/133691757/257957080-f46373b5-c45a-4e96-a201-5cd99ab7b675.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU3MDgwLWY0NjM3M2I1LWM0NWEtNGU5Ni1hMjAxLTVjZDk5YWI3YjY3NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNzg4ZGZiNjdhMGIzYjhmNzljYTNmNmQyZTUxMmEzM2EyNWRkZjllY2IwYjBkZGI2ZDkzNzVkZTdiMzUzNGIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.NNrxoqD3CQrGcMTNXxA1UjKbUvV3bBJ3by2_4GiVUn0)
- Unnormalized Form: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, Cl_roomno(PK), Cl_time, Cl_name
- 1NF: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, Cl_roomno(PK), Cl_time, Cl_name
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- Cl_roomno(PK), Cl_time, Cl_name
- S_ID(PK), Cl_roomno(FK)
- 3NF: Same as 2NF
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- Cl_roomno(PK), Cl_time, Cl_name
- S_ID(PK), Cl_roomno(FK)
![](https://private-user-images.githubusercontent.com/133691757/257957320-8c272be5-3ed9-4c24-8db2-cd0600cee53e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU3MzIwLThjMjcyYmU1LTNlZDktNGMyNC04ZGIyLWNkMDYwMGNlZTUzZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOGZhZjMyMWViN2M0MjA3YWFlMmVkODE3MDQyM2U1ZjQ5NWM5MDNjMzAzZDA5NGI4MDM4MmEyNGYxZTdlNGJhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.r_ZswSpfg4JsEHIaZH15TPJf9h8EYv27tBum7VHMoKE)
- Unnormalized Form: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, P_ID(PK), P_name, P_duration, P_type
- 1NF: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, P_ID(PK), P_name, P_duration, P_type
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- P_ID(PK), P_name, P_duration, P_type
- S_ID(PK), P_ID(FK)
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- P_ID(PK), P_name, P_duration, P_type
- S_ID(PK), P_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956639-5a2f84cc-80cc-4b3d-92bb-7d18f04a4ec0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2NjM5LTVhMmY4NGNjLTgwY2MtNGIzZC05MmJiLTdkMThmMDRhNGVjMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZWQ2ZjVjM2ExN2Q2Y2ExY2NhMTkxMGFiYTU2ZWEyZjM1ZTk5MWUyMDViNTgwNjE1MjlkNTgwODIxYmE4ODhiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.pubr2ElMGrnH2wq939B6ndd2DQrBoM7ddlSa8I7NygQ)
- Unnormalized Form: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, C_ID(PK), C_name, C_duration, C_credit
- 1NF: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, C_ID(PK), C_name, C_duration, C_credit
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- C_ID(PK), C_name, C_duration, C_credit
- S_ID(PK), C_ID(FK)
- 3NF: Same as 2NF
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- C_ID(PK), C_name, C_duration, C_credit
- S_ID(PK), C_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956343-2542a3ae-64a2-4c38-b4c5-6f989d036a3d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2MzQzLTI1NDJhM2FlLTY0YTItNGMzOC1iNGM1LTZmOTg5ZDAzNmEzZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZGJkNDcxNjU5NzVmYWI1YTk3NDUxZWZlNjllMjIxOTVmNzZkZDc4NWY0YmIzYmUzNGQ1MWEyOWYxMDY1NTE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.YTOzBRlWE1XDtDGqpNEIxyVTD1ySvmofn7siZ9KB7qE)
- Unnormalized Form: F_ID(PK), F_name, F_contact, F_mail, C_ID(PK), C_name, C_duration, C_credit
- 1NF: F_ID(PK), F_name, F_contact, F_mail, C_ID(PK), C_name, C_duration, C_credit
-
2NF:
- F_ID(PK), F_name, F_contact, F_mail
- C_ID(PK), C_name, C_duration, C_credit
- F_ID(PK), C_ID(FK)
- 3NF: Same as 2NF
- Tables:
- F_ID(PK), F_name, F_contact, F_mail
- C_ID(PK), C_name, C_duration, C_credit
- F_ID(PK), C_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956197-5e72ea2b-2504-43a9-b7ad-1342121f00a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2MTk3LTVlNzJlYTJiLTI1MDQtNDNhOS1iN2FkLTEzNDIxMjFmMDBhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZjMwMzU1MWQ3ODhkMzI2ZGE4NzMyNDRlMzUyNDM3OTU5MjY1MDYyZWM4NGEzYmFhOGYwNWFmOTZmMzcyNjI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3HoKJwqL4cQYnI-TzxVwijK_wvw1RF72W89cV7Dc4HA)
- Unnormalized Form: C_ID(PK), C_name, C_duration, C_credit, E_ID(PK), E_date, E_type, E_roomno, Mark
- 1NF: C_ID(PK), C_name, C_duration, C_credit, E_ID(PK), E_date, E_type, E_roomno, Mark
-
2NF:
- C_ID(PK), C_name, C_duration, C_credit
- E_ID(PK), E_date, E_type, E_roomno, Mark, C_ID(FK)
- 3NF: Same as 2NF
- Tables:
- C_ID(PK), C_name, C_duration, C_credit
- E_ID(PK), E_date, E_type, E_roomno, Mark, C_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956585-07ac9428-28c7-4a07-81a4-cf60013f9277.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2NTg1LTA3YWM5NDI4LTI4YzctNGEwNy04MWE0LWNmNjAwMTNmOTI3Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNTM1ODI1OGQ4MTcxOTFjYzZlOTBlNmE3ZTZkOGJhOTQwMDdhYWRhYjViMzBmOGZmNzIxMTFmZmRhYjc4ODAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wYcAZjV_pVLweC9AgoDWX0IKJphgCRv8d9n87MZ2HfI)
- Unnormalized Form: D_ID(PK), D_name, D_head, F_ID(PK), F_name, F_contact, F_mail, C_ID(FK), C_name, C_duration, C_credit
- 1NF: D_ID(PK), D_name, D_head, F_ID(PK), F_name, F_contact, F_mail, C_ID(FK), C_name, C_duration, C_credit
-
2NF:
- D_ID(PK), D_name, D_head
- F_ID(PK), F_name, F_contact, F_mail, C_ID(FK), C_name, C_duration, C_credit, D_ID(FK)
- 3NF: Same as 2NF
- Tables:
- D_ID(PK), D_name, D_head
- F_ID(PK), F_name, F_contact, F_mail, C_ID(FK), C_name, C_duration, C_credit, D_ID(FK)
![](https://private-user-images.githubusercontent.com/133691757/257956398-424df486-4a52-4f43-9015-1ee6be54c8ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2Mzk4LTQyNGRmNDg2LTRhNTItNGY0My05MDE1LTFlZTZiZTU0YzhhYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZTllMTMwN2FkMTkzOGQyNDMzZjYxMWY1ZjQ3MWEyMWVkZTI1ODU2YjdmMDZjYmMxNDdjOTUzMGE2NWZhNWRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.KgWo7mtuWoeIpfb4K0TUv_ibBcfrsWiZPDZDM9xwKvA)
- Unnormalized Form: D_ID(PK), D_name, D_head, A_mail(PK), A_name, A_role, A_contact
- 1NF: D_ID(PK), D_name, D_head, A_mail(PK), A_name, A_role, A_contact
-
2NF:
- D_ID(PK), D_name, D_head, A_mail(FK)
- A_mail(PK), A_name, A_role, A_contact
- 3NF: Same as 2NF
- Tables:
- D_ID(PK), D_name, D_head, A_mail(FK)
- A_mail(PK), A_name, A_role, A_contact
![](https://private-user-images.githubusercontent.com/133691757/257956962-1ab39668-da83-486e-acce-6e7b09535cb3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2OTYyLTFhYjM5NjY4LWRhODMtNDg2ZS1hY2NlLTZlN2IwOTUzNWNiMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZjM4ODM3NmViY2VlZGQzOThlZTEyNjI4NzVhNzc0OWE0MjIwNjlhMjRlNmIzMjU2MTFjM2ViODBmN2UyMTcwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.HK4T_Ob00IRmTr4MJOEIlXB72acdBGaRi95BJF3sn9g)
- Unnormalized Form: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, G_ID(PK), CGPA, Semester, Sem_year
- 1NF: S_ID(PK), S_name, S_contact, S_mail, EnrollYear, G_ID(PK), CGPA, Semester, Sem_year
-
2NF:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, G_ID(FK)
- G_ID(PK), CGPA, Semester, Sem_year
- 3NF: Same as 2NF
- Tables:
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, G_ID(FK)
- G_ID(PK), CGPA, Semester, Sem_year
![](https://private-user-images.githubusercontent.com/133691757/257956817-b5380d6c-ea48-41d7-aa1d-83f3a0ee7d6b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY4MTEsIm5iZiI6MTcyNDc3NjUxMSwicGF0aCI6Ii8xMzM2OTE3NTcvMjU3OTU2ODE3LWI1MzgwZDZjLWVhNDgtNDFkNy1hYTFkLTgzZjNhMGVlN2Q2Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QxNjM1MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMzYyMzE0MDZkNjFkOTdjOTBhZDM4NzJjNjY4ZjhhZWY5YjY0MTlmY2Y5NDAyNTJlZDBmNGI4NjQ1MjQxMWE1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.RzUYiz4UrsOrrBZJcz52gRz1V8WLt52BWz6h4EJocWc)
- Unnormalized Form: F_ID(PK), F_name, F_contact, F_mail, G_ID(PK), CGPA, Semester, Sem_year
- 1NF: F_ID(PK), F_name, F_contact, F_mail, G_ID(PK), CGPA, Semester, Sem_year
-
2NF:
- F_ID(PK), F_name, F_contact, F_mail
- G_ID(PK), CGPA, Semester, Sem_year, F_ID(FK)
- 3NF: Same as 2NF
- Tables:
- F_ID(PK), F_name, F_contact, F_mail
- G_ID(PK), CGPA, Semester, Sem_year, F_ID(FK)
- P_ID(PK), P_name, P_duration, P_type
- D_ID(PK), D_name, D_head
- P_ID(PK), D_ID(FK)
D_ID(PK), D_name, D_head
- E_ID(PK), E_Date, E_type, E_roomno, Mark, D_ID(FK)
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- E_ID(PK), E_Date, E_type, E_roomno, Mark
- S_ID(PK), E_ID(FK)
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, F_ID(FK)
- F_ID(PK), F_name, F_contact, F_mail
S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- Cl_roomno(PK), Cl_time, Cl_name
- S_ID(PK), Cl_roomno(FK)
S_ID(PK), S_name, S_contact, S_mail, EnrollYearP_ID(PK), P_name, P_duration, P_type
- S_ID(PK), P_ID(FK)
S_ID(PK), S_name, S_contact, S_mail, EnrollYear
- C_ID(PK), C_name, C_duration, C_credit
- S_ID(PK), C_ID(FK)
F_ID(PK), F_name, F_contact, F_mailC_ID(PK), C_name, C_duration, C_credit
- F_ID(PK), C_ID(FK)
C_ID(PK), C_name, C_duration, C_credit
- E_ID(PK), E_date, E_type, E_roomno, Mark, C_ID(FK)
D_ID(PK), D_name, D_head
- F_ID(PK), F_name, F_contact, F_mail, C_ID(FK), C_name, C_duration, C_credit, D_ID(FK)
- D_ID(PK), D_name, D_head, A_mail(FK)
- A_mail(PK), A_name, A_role, A_contact
- S_ID(PK), S_name, S_contact, S_mail, EnrollYear, G_ID(FK)
- G_ID(PK), CGPA, Semester, Sem_year
F_ID(PK), F_name, F_contact, F_mail
- G_ID(PK), CGPA, Semester, Sem_year, F_ID(FK)
Table No | Table Name | Table Columns | Primary Key | Foreign Key |
---|---|---|---|---|
1 | program | P_ID, P_name, P_duration, P_type | P_ID | |
2 | dept | D_ID, D_name, D_head | D_ID | |
3 | prodept | P_ID, D_ID | P_ID | D_ID |
4 | deptconductexam | E_ID, E_Date, E_type, E_roomno, Mark, D_ID | E_ID | D_ID |
5 | student | S_ID, S_name, S_mail, S_contact, EnrollYear | S_ID | |
6 | exam | E_ID, E_Date, E_type, E_roomno, Mark | E_ID | |
7 | stdexam | S_ID, E_ID | S_ID | E_ID |
8 | stdfac | S_ID, S_name, S_contact, S_mail, EnrollYear, F_ID | S_ID | F_ID |
9 | faculty | F_ID, F_name, F_contact, F_mail | F_ID | |
10 | classroom | Cl_roomno, Cl_time, Cl_name | Cl_roomno | |
11 | stdcls | S_ID, Cl_roomno | S_ID | Cl_roomno |
12 | stdpro | S_ID, P_ID | S_ID | P_ID |
13 | course | C_ID, C_name, C_duration, C_credit | C_ID | |
14 | stdcrs | S_ID, C_ID | S_ID | C_ID |
15 | faccrs | F_ID, C_ID | F_ID | C_ID |
16 | crsexam | E_ID, E_date, E_type, E_roomno, Mark, C_ID | E_ID | C_ID |
17 | deptofferfaccrs | F_ID, Fname, F_contact, F_mail, C_ID, Cname, C_duration, C_credit, D_ID | F_ID | C_ID, D_ID |
18 | deptauth | D_ID, D_name, D_head, A_mail | D_ID | A_mail |
19 | authority | A_mail, A_name, A_role, A_contact | A_mail | |
20 | stdgrade | S_ID, S_name, S_contact, S_mail, EnrollYear, G_ID | S_ID | G_ID |
21 | grade | G_ID, CGPA, Semester, Sem_year | G_ID | |
22 | facgrade | G_ID, CGPA, Semester, Sem_year, F_ID | G_ID | F_ID |
-- Create Table: program
CREATE TABLE program (
P_ID NUMBER PRIMARY KEY,
P_name VARCHAR2(255),
P_duration NUMBER,
P_type VARCHAR2(50)
);
-- Create Table: dept
CREATE TABLE dept (
D_ID NUMBER PRIMARY KEY,
D_name VARCHAR2(255),
D_head VARCHAR2(255)
);
-- Create Table: prodept
CREATE TABLE prodept (
P_ID NUMBER,
D_ID NUMBER,
PRIMARY KEY (P_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create Table: deptconductexam
CREATE TABLE deptconductexam (
E_ID NUMBER,
E_Date DATE,
E_type VARCHAR2(50),
E_roomno VARCHAR2(50),
Mark NUMBER,
D_ID NUMBER,
PRIMARY KEY (E_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create Table: student
CREATE TABLE student (
S_ID NUMBER PRIMARY KEY,
S_name VARCHAR2(255),
S_mail VARCHAR2(255),
S_contact VARCHAR2(20),
EnrollYear NUMBER
);
-- Create Table: exam
CREATE TABLE exam (
E_ID NUMBER PRIMARY KEY,
E_Date DATE,
E_type VARCHAR2(50),
E_roomno VARCHAR2(50),
Mark NUMBER
);
-- Create Table: stdexam
CREATE TABLE stdexam (
S_ID NUMBER,
E_ID NUMBER,
PRIMARY KEY (S_ID, E_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (E_ID) REFERENCES exam(E_ID)
);
-- Create Table: stdfac
CREATE TABLE stdfac (
S_ID NUMBER,
F_ID NUMBER,
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID)
);
-- Create Table: faculty
CREATE TABLE faculty (
F_ID NUMBER PRIMARY KEY,
F_name VARCHAR2(255),
F_contact VARCHAR2(20),
F_mail VARCHAR2(255)
);
-- Create Table: classroom
CREATE TABLE classroom (
Cl_roomno VARCHAR2(20) PRIMARY KEY,
Cl_time VARCHAR2(50),
Cl_name VARCHAR2(255)
);
-- Create Table: stdcls
CREATE TABLE stdcls (
S_ID NUMBER,
Cl_roomno VARCHAR2(20),
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (Cl_roomno) REFERENCES classroom(Cl_roomno)
);
-- Create Table: stdpro
CREATE TABLE stdpro (
S_ID NUMBER,
P_ID NUMBER,
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (P_ID) REFERENCES program(P_ID)
);
-- Create Table: course
CREATE TABLE course (
C_ID NUMBER PRIMARY KEY,
C_name VARCHAR2(255),
C_duration NUMBER,
C_credit NUMBER
);
-- Create Table: stdcrs
CREATE TABLE stdcrs (
S_ID NUMBER,
C_ID NUMBER,
PRIMARY KEY (S_ID, C_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create Table: faccrs
CREATE TABLE faccrs (
F_ID NUMBER,
C_ID NUMBER,
PRIMARY KEY (F_ID, C_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create Table: crsexam
CREATE TABLE crsexam (
E_ID NUMBER,
E_date DATE,
E_type VARCHAR2(50),
E_roomno VARCHAR2(50),
Mark NUMBER,
C_ID NUMBER,
PRIMARY KEY (E_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create Table: deptofferfaccrs
CREATE TABLE deptofferfaccrs (
F_ID NUMBER,
Fname VARCHAR2(255),
F_contact VARCHAR2(20),
F_mail VARCHAR2(255),
C_ID NUMBER,
Cname VARCHAR2(255),
C_duration NUMBER,
C_credit NUMBER,
D_ID NUMBER,
PRIMARY KEY (F_ID, C_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create Table: deptauth
CREATE TABLE deptauth (
D_ID NUMBER PRIMARY KEY,
D_name VARCHAR2(255),
D_head VARCHAR2(255),
A_mail VARCHAR2(255),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create Table: authority
CREATE TABLE authority (
A_mail VARCHAR2(255) PRIMARY KEY,
A_name VARCHAR2(255),
A_role VARCHAR2(50),
A_contact VARCHAR2(20)
);
-- Create Table: stdgrade
CREATE TABLE stdgrade (
S_ID NUMBER,
S_name VARCHAR2(255),
S_contact VARCHAR2(20),
S_mail VARCHAR2(255),
EnrollYear NUMBER,
G_ID NUMBER,
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (G_ID) REFERENCES grade(G_ID)
);
-- Create Table: grade
CREATE TABLE grade (
G_ID NUMBER PRIMARY KEY,
CGPA NUMBER,
Semester VARCHAR2(50),
Sem_year NUMBER
);
-- Create Table: facgrade
CREATE TABLE facgrade (
G_ID NUMBER,
CGPA NUMBER,
Semester VARCHAR2(50),
Sem_year NUMBER,
F_ID NUMBER,
PRIMARY KEY (G_ID),
FOREIGN KEY (G_ID) REFERENCES grade(G_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID)
);
-- Create the program table
CREATE TABLE program (
P_ID INT PRIMARY KEY,
P_name VARCHAR(255),
P_duration INT,
P_type VARCHAR(50)
);
-- Create the dept table
CREATE TABLE dept (
D_ID INT PRIMARY KEY,
D_name VARCHAR(255),
D_head VARCHAR(255)
);
-- Create the prodept table
CREATE TABLE prodept (
P_ID INT,
D_ID INT,
PRIMARY KEY (P_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create the deptconductexam table
CREATE TABLE deptconductexam (
E_ID INT,
E_Date DATE,
E_type VARCHAR(50),
E_roomno INT,
Mark DECIMAL(5, 2),
D_ID INT,
PRIMARY KEY (E_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create the student table
CREATE TABLE student (
S_ID INT PRIMARY KEY,
S_name VARCHAR(255),
S_mail VARCHAR(255),
S_contact VARCHAR(20),
EnrollYear INT
);
-- Create the exam table
CREATE TABLE exam (
E_ID INT PRIMARY KEY,
E_Date DATE,
E_type VARCHAR(50),
E_roomno INT,
Mark DECIMAL(5, 2)
);
-- Create the stdexam table
CREATE TABLE stdexam (
S_ID INT,
E_ID INT,
PRIMARY KEY (S_ID, E_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (E_ID) REFERENCES exam(E_ID)
);
-- Create the stdfac table
CREATE TABLE stdfac (
S_ID INT,
S_name VARCHAR(255),
S_contact VARCHAR(20),
S_mail VARCHAR(255),
EnrollYear INT,
F_ID INT,
PRIMARY KEY (S_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID)
);
-- Create the faculty table
CREATE TABLE faculty (
F_ID INT PRIMARY KEY,
F_name VARCHAR(255),
F_contact VARCHAR(20),
F_mail VARCHAR(255)
);
-- Create the classroom table
CREATE TABLE classroom (
Cl_roomno INT PRIMARY KEY,
Cl_time TIME,
Cl_name VARCHAR(255)
);
-- Create the stdcls table
CREATE TABLE stdcls (
S_ID INT,
Cl_roomno INT,
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (Cl_roomno) REFERENCES classroom(Cl_roomno)
);
-- Create the stdpro table
CREATE TABLE stdpro (
S_ID INT,
P_ID INT,
PRIMARY KEY (S_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (P_ID) REFERENCES program(P_ID)
);
-- Create the course table
CREATE TABLE course (
C_ID INT PRIMARY KEY,
C_name VARCHAR(255),
C_duration INT,
C_credit INT
);
-- Create the stdcrs table
CREATE TABLE stdcrs (
S_ID INT,
C_ID INT,
PRIMARY KEY (S_ID, C_ID),
FOREIGN KEY (S_ID) REFERENCES student(S_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create the faccrs table
CREATE TABLE faccrs (
F_ID INT,
C_ID INT,
PRIMARY KEY (F_ID, C_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create the crsexam table
CREATE TABLE crsexam (
E_ID INT,
E_date DATE,
E_type VARCHAR(50),
E_roomno INT,
Mark DECIMAL(5, 2),
C_ID INT,
PRIMARY KEY (E_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID)
);
-- Create the deptofferfaccrs table
CREATE TABLE deptofferfaccrs (
F_ID INT,
Fname VARCHAR(255),
F_contact VARCHAR(20),
F_mail VARCHAR(255),
C_ID INT,
Cname VARCHAR(255),
C_duration INT,
C_credit INT,
D_ID INT,
PRIMARY KEY (F_ID),
FOREIGN KEY (C_ID) REFERENCES course(C_ID),
FOREIGN KEY (D_ID) REFERENCES dept(D_ID)
);
-- Create the deptauth table
CREATE TABLE deptauth (
D_ID INT,
D_name VARCHAR(255),
D_head VARCHAR(255),
A_mail VARCHAR(255),
PRIMARY KEY (D_ID),
FOREIGN KEY (A_mail) REFERENCES authority(A_mail)
);
-- Create the authority table
CREATE TABLE authority (
A_mail VARCHAR(255) PRIMARY KEY,
A_name VARCHAR(255),
A_role VARCHAR(50),
A_contact VARCHAR(20)
);
-- Create the stdgrade table
CREATE TABLE stdgrade (
S_ID INT,
S_name VARCHAR(255),
S_contact VARCHAR(20),
S_mail VARCHAR(255),
EnrollYear INT,
G_ID INT,
PRIMARY KEY (S_ID),
FOREIGN KEY (G_ID) REFERENCES grade(G_ID)
);
-- Create the grade table
CREATE TABLE grade (
G_ID INT PRIMARY KEY,
CGPA DECIMAL(3, 2),
Semester VARCHAR(20),
Sem_year VARCHAR(10)
);
-- Create the facgrade table
CREATE TABLE facgrade (
G_ID INT,
CGPA DECIMAL(3, 2),
Semester VARCHAR(20),
Sem_year VARCHAR(10),
F_ID INT,
PRIMARY KEY (G_ID),
FOREIGN KEY (F_ID) REFERENCES faculty(F_ID)
);