How to plan to create a table in the database?

 A table is used to hold your records or rows related to some entity.

An entity is something about which we manage some data e.g. Books in a library, Customer of an e-commerce website, User having an Instagram account, Student in a college.

We need to indentify the columns or the fields to be stored while managing records of such entities e.g.

Book can have columns or fields like Book Number, Title, Author and Price

Book Number

Title

Author

Price

101

Data Analytics for Beginners

Rohit Kumar

400

102

Data Analytics for Professional

Sanjay Sharma

500

103

Business Analytics for All

Neeraj Verma

500

104

SQL Programming

Dr B P Sharma

700

105

Python Programming

Dr B P Sharma

900

 

Student can have columns or fields like Roll Number, Name, Email, Mobile and Fees

Roll Number

Name

Email

Mobile

Fees

1234

Harish Kumar

harish@gmail.com

9899999999

89000

1235

Kapil Sharma

kapil@yahoo.co.in

9888888888

45000

1236

Nitin Verma

nitin@hotmail.com

9877777777

90000

1237

Ritesh Khanna

ritesh@gmail.com

9866666666

32000

1238

Tarun Kumar

tarun@outlook.com

9855555555

56000

 

If we try to issue a book to some student, we can also manage that data using a relational table having data about a Book as well as Student.

IssueBooks table can have columns of fields like Book Number, Roll Number, and Issue Date

Book Number

Roll Number

Issue Date

101

1234

2023-11-12

102

1235

2023-11-16

103

1236

2023-11-16

Comments

Popular posts from this blog

What SQL can do?

What are different data types to manage data in the columns or fields?

What is SQL?