Appendix A: Relational Databases and Database Design.
a. • A table is a set of rows and columns. • Each table is identified by a unique name. • Multidimensional representation of a table gives detailed information in a simple manner. • It is possible to have many numbers of rows and columns in a table. • Information in a table can be edited whenever needed. • Table can be specified with orientation, order by. • Table includes several text-formatting options. Formal names for a table, row, column: • A formal name for a table is a relation, file. • A formal name for a row is tuple, periods, and vector. • A formal name for a column is attribute, groups, and parameter. An example student table with rows and columns is This table contains four rows and four columns giving information about students in the school. b. • Each rows of the table are independent and it is dependent on particular column. • Table represents student details; each row in a table gives information about a particular student. • Each record is a unit of information in the field. It contains combination of data types. • Columns are independent and every column has a unique name. It is identified by its unique name. • Every column has a separate data type and field value must belong to that data type. • In the student table, student ID is a number data type, first name, last name belongs to text data type, and age field is a number data type. • Number data type allows only numbers and text allows only letters. Popular names for a row and column: • Popular names for a row are record. • Popular names for a column are field.
Domain • A domain contains the values that are acceptable by the particular field in the database table. • It describes the set of possible values for a given attribute. • Attributes are nothing but fields in the database table. It protects the integrity of data in database. • Domain simply refers to the description of attributes. • Domain integrity allows only the valid set of all possible values for a field. It is enforced by restricting the invalid data type for attribute, whether the field can contain null value or can it be assigned default value or the value for a particular attribute is unique. • Domain defines the specific conditions for particular attribute. • Field in database table will not accept the value that is not available in that domain. • Domain also provides constraints for the attribute. Constraints restrict the value entered to be within the range. In range domain, it limits the choice of the value for particular attribute. • If the rule for the attribute is to contain the positive value, then negative values are not allowed. • When the numeric value is limited to the length 6 digits for pin code attribute, it does not allow entering more than 6 digits. Example: When the attribute is a date, domain prevents the user from entering the invalid date by giving conditions. Example: In the student table, it contains the attributes first name and last name; only the text values are permitted in that field not an integer value.
Entity • An entity is the schema for the table about which the data can be collected for processing information. • Each table holds the collection of information about object, person such as student, teacher, and things such as books. • An entity is a data element represented by a set of attributes in a table. • Entities are independent. One entity is distinct from the other entity. Example: Consider employee table having fields employee number, employee name, job, salary, and department. Here employee is the entity and employee number, employee name, job, salary, and department are attributes. Entity set Collection of entities of same type is called as entity set. Entity set are nothing but rows in the table. Entity set are categorized into two types. They are 1. Strong entity set 2. Weak entity set Strong entity set • An entity set which has the sufficient number of attributes with its own unique identification is called strong entity set. • An entity that has a primary key is called as strong entity. • Example: Consider employee table having fields employee number, employee name, job, salary, and department. Here employee is the entity and employee number, employee name, job, salary, and department are attributes. Employee number is the primary key that uniquely identifies each row of table employee. Hence, employee is a strong entity. Weak entity set • An entity set which may not have the sufficient number of attributes with its own unique identification is called weak entity set. • An entity that does not have a primary key of its own is called as weak entity. • Example: Consider the account table with attributes such as customer account number, savings account, current account. Customer account number is sequential number generated for each customer in bank. Each account entity is distinct, but account type for each customer shares the same account number and so it does not have the primary key. It form the weak entity set.
There is no answer for this question