web 2.0

What is database

The database is a collection of related data, In the past, the database is a file, for example students.dbf, employees.dbf, which contains a table. In the student file, containing the related columns, such as ID, Name, Address, etc.

In SQL Server, the database is not a file but it is a logical concept that contains a collection of related objects. For example a database containing data, database structure, indexes, securities, view, and stored procedures.

Objects in a database:

  • Tables, objects that contain the types of data and raw data.
  • Column. A table containing the columns to accommodate the data. The column has a type, and a unique name.
  • Data type. A column has a data type. Type of data that can be selected are the characters, numeric, date, boolean, etc.
  • Stored procedure. Is the sql commands that make up the macro. By running the stored procedure means that you run the sql commands in a stored procedure.
  • Trigger. Trigger is a stored procedure that is activated when the data are added, modified, or deleted from the database. Trigger is used to ensure the integrity rules within the database.
  • Rule. Rule applied to the column so that the data being entered must be in accordance with the rules.
  • Primary Key. The main key to ensure every line of unique data, can be distinguished from other data.
  • Foreign Key. Is the foreign key columns that refer to primary key or unique constraint on another table. Primary key and foreign keys are used to connect a table with other tables.
  • Constraints. Constraint is that the data integrity mechanism based on servers and implemented by the system.
  • Default. Default contained in the field, so if the column is not filled with data, then filled in with default values.
  • View. View is a query that uses several tables, and stored in the database. View can select multiple columns of a table or to connect multiple tables. View can be used to maintain data security.
  • Index. Index help organize the data so that queries become faster.


Post a Comment