Database design and DDL
[Name of the Writer]
[Name of the Institution]
Tables are used to store data in a database. There are many ways through which tables can be created and managed. The first method is using the create statement for example,
CREATE TABLE tbl_Students ([Studentid] [int] IDENTITY (1, 1) NOT NULL,
[First-name] [Varchar](200), [Last-name] [nvarchar] (200), [Email] [nvarchar] (100))
This query is widely and commonly used for creating and managing the tables in a database using SQL server. Another method of creating tables in the database using SQL server is using the select into statement (Hou, Hu, Liu, Qian, 2015). For example,
Select studentid, Firstname, Lastname into table_student_info from table_students.
This query will retrieve columns that are studentid, Firstname and Lastname from the table_students and add the data to a newly created table called table_student_info (Ramakrishna, Gehrke, 2000).
The reason for choosing these two methods is that they help the developer in speedy coding. The columns are easily created and defined with their respective data types. Using select into query allows the easy retrieval of data and putting it in a new table with a minimum amount of time. These query statements will enable the facility of built-in optimisation. An efficient way of resources is used through creating statement because in one statement we can provide the whole complete detail about the table, which includes the name of the table and columns, information about the primary key and the data types of the columns. Tables are easy to maintain through these query statements. Using the create statements allows the developer to use the facility of Granular security that is developer can assign the restricted permissions to the table. For example, grant CREATE View to user1. This query will only allow the user to view the data. The user cannot perform any functions on the data. Data recovery from these query statements is easy. We can easily update, insert or delete the data which provides ease in management of the tables (Ireland, Clegg, Meckler, 2007).
Ireland, E. P., Clegg, D. L., & Meckler, J. (2007). U.S. Patent No. 7,174,326. Washington, DC: U.S. Patent and Trademark Office.
Ramakrishna, R., & Gehrke, J. (2000). Database management systems. McGraw Hill.
Hou, X. Q., Hu, G., Liu, T., & Qian, Q. (2015). U.S. Patent No. 9,223,827. Washington, DC: U.S. Patent and Trademark Office.
If you have any queries please write to us
Join our mailing list