In relation data model, relations are saved in the format of Tables. This format stores the Tables: relation among entities. A table has rows and columns, where rows represent records and columns represents the attributes Tuple: A single row of a table, which contains a single record for that relation,is called a tuple. Relation instance: A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. Relation schema: This describes the relation name name), attributes and their names. Relation key: Each row has one or more attributes, can identify the row in the relation (table) uniquely, is called the relation key. Attribute domain: Every attribute has some pre-defined value scope, known as attribute domain. The main highlights of this model are: Data is stored in tables called relations. Relations can be normalized. In normalized relations, values saved are atomic values. Each row in relation contains unique value Each column in relation contains values from a same domain. Data Definition Language Data Definition Language (DDL) statements are used to define the database structure. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary RENAME - rename an object Create database: The CREATE DATABASE statement is used to create a database. Syntax:CREATE DATABASE your_name;
Tables: In relation data model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represent records and columns represents the attributes Tuple: A single row of a table, which contains a single record for that relation,is called a tuple. Relation instance: A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. Relation schema: This describes the relation name name), attributes and their names. Relation key: Each row has one or more attributes, can identify the row in the relation (table) uniquely, is called the relation key. Attribute domain: Every attribute has some pre-defined value scope, known as attribute domain. The main highlights of this model are: Data is stored in tables called relations. Relations can be normalized. In normalized relations, values saved are atomic values. Each row in relation contains unique value Each column in relation contains values from a same domain. Data Definition Language Data Definition Language (DDL) statements are used to define the database structure. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary RENAME - rename an object Create database: The CREATE DATABASE statement is used to create a database. Syntax:CREATE DATABASE your_name;
class_9_full.docx