Why do we store data in separate tables and not in one big table? Explain to me how we take an ERD and translate boxes and lines in the ERD into a SQL statement. What is needed in order to design an ERD? What is needed to work with multiple tables in a SQL statement?
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Shuyue Ding says
By storing data in separate tables can reduce the probabilities from editing data. At the same time splitting table also give different kind of authorities to different people for different part of the data collection, which is exactly what IT auditors should pay attention to.
Use “create” to create tables (pk and attitudes as columns), and use “insert” to put information into tables. Use “alert” “update”, “delete” to edit tables.
We need a entities, attitudes, primary keys, foreign keys, and relationships.
A print out ERD is needed to work with multiple tables in a SQL statement.
Patrick J. Wasson says
Thank you for your comment!
Ryu Takatsuki says
I think the reason we store data in separate tables and not in one big table is that it would be easier to organize the data. When an organization stores the data in a separate table, the data table needs to be linked to another one to make sure the relation between them. Also, each table needs to have a primary key. An ERD contains different symbols and connectors that visualize two important information: the major entities within the system scope, and the inter-relationships among these entities. In order to design an ERD, we need to know the entity, entity attributes, primary key, and relationship.
Patrick J. Wasson says
Thank you for your comment!
Haixin Sun says
The reason why we store data in separate tables is that it is easier to manage and control in the later time. And the relation within separate tables is much clearer to figure out because it is organized well from the very beginning. It may reduce duplicate data to save storage space. To translate boxes and lines in the ERD into a SQL statement, it is necessary to map the main entities and weak entites and define the 1:N relationships. To design an ERD, the entities, attributes, relationships, cardinality and ability to draw a diagram are important. Primary key is needed to work with multiple tables in a SQL statement.
Patrick J. Wasson says
Thank you for your comment!
Yuchong Wang says
We store data in separate tables and not in one big table is because we give different data different category and values. If we put data in one big table, it is hard to retrieve your desired data and I am sure different data have different categories.
To make ERD come to SQL, we will need to create query for SQL. We can create and insert our data to SQL and edit mySQL with delete command. To design an ERD, an outline of the business structure is needed. We can use commands such as select, join ,subselects to work with multiple tables in a SQL statement.
Patrick J. Wasson says
Thank you for your comment!
Sarah Puffen says
Data is stored on different tables (or entities) in order to form connections with other types of data. One example would be a hotel chain pricing different types of rooms. While all of these rooms are owned by the same hotel company, the prices could vary depending on locale. Within the company’s database, they would have separate tables for each location in order to adjust prices, perhaps according to demand.
An ERD is used to show the relationship between tables in a database, which is what is necessary to design one. If we have our database, we can “reverse engineer” the DB within MySQL in order to show the architectural design and inter-relationships within the system. We can view bridge tables, joins, primary and foreign keys. When working with statements we use different types of clauses to create associations that may show us information we need, such as viewing the names of hotel occupants and the rate they paid on that particular day.
Patrick J. Wasson says
Thank you for your comment!
Yuqing Tang says
I think it’s important to not have a big table because if everything is stored in one table, the information cannot be linked together. Each individual table has a primary key and foreign key to show the identifiable characters, and show the correlation of each entity. We have the code to run in the SQL, and the SQL process the code and create the tables based on the information and relation that the code consists. The clear characters of each entity and the relation among each entity are needed to create a complete ERD. And the primary key and the relation of these primary keys need to be addressed for multiple tables in a SQL statement.
Patrick J. Wasson says
Thank you for your comment!