InterviewSolution
| 1. |
24) A table from computer course details is given below. Answer the questions based on this table-Course IdCourse NameCategory1Access TutorialSoftware2Excel TutorialSoftwareDatabase Design TutorialSoftware4Oracle DBA CourseSoftwareRAID Storage TutorialHardwareNetwork Security TutorialNetwork(1) What is the total number of records in the table?(ii) What is the total number of fields in the table?(iii) What is the course name of the record with Networkscategory?(iv) Which category (name) has the maximum number ofrecords?(v) Identify the primary key of the table |
|
Answer» Structured Query Language (SQL) is a database language designed for managing data held in a relational database management system. SQL was INITIALLY developed by IBM in the early 1970s (Date 1986). The initial version, called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM’s quasi-relational database management system, System R. Then in the late 1970s, Relational Software Inc., which is now Oracle Corporation, introduced the first commercially available implementation of SQL, Oracle V2 for VAX computers.Many of the currently available relational DBMSs, such as Oracle Database, Microsoft SQL Server (shown in Figure 15.1), MySQL, IBM DB2, IBM Informix and Microsoft Access, use SQL.SQLServerFigure 15.1. Example of Microsoft SQL Server, by A. Watt.In a DBMS, the SQL database language is used to:CREATE the database and table structuresPerform basic data management chores (add, delete and modify)Perform complex queries to transform raw data into useful informationIn this chapter, we will focus on using SQL to create the database and table structures, mainly using SQL as a data definition language (DDL). In Chapter 16, we will use SQL as a data manipulation language (DML) to insert, delete, select and update data within the database tables.Create DatabaseThe major SQL DDL statements are CREATE DATABASE and CREATE/DROP/ALTER TABLE. The SQL statement CREATE is used to create the database and table structures.Example: CREATE DATABASE SWA new database named SW is created by the SQL statement CREATE DATABASE SW. Once the database is created, the next step is to create the database tables.The general format for the CREATE TABLE command is:CREATE TABLE |
|