Professional Documents
Culture Documents
Declaration:
I declare that this assignment is my individual work. I
have not copied from any other student’s work or from any other source
except where due acknowledgment is made explicitly in the text, nor has
any part been written for me by another person.
Student’s Signature :
Amarpreet singh
CAP 354 OPEN STANDARD & TECHNOLOGIES
Database design is a very crucial part of development. It is the first step after
requirement gathering and before coding even begins. Taking time to design
the database can save a lot of time and frustration during development.
3) Simpler queries: -
If the database is well designed the queries will be simple, and
their execution will be fast.
4) Performance: -
The overall performance of the application is also dependent on the
design of the database.
5) Maintenance: -
This is by far the most important issue. A database should be well-
designed so that it is easy to maintain. If it is not, a small change down the road could
cause a lot of stored procedures, functions, views to be effected.
You really need only one field in the subscribers table: to hold the email address of the
user. However, you should have an ID field just for consistency among your tables,
and also because referencing an ID is much simpler than referencing a long email
address in where clauses. So, in this case, your MySQL query would look something like
Ans : -
• One-to-one relationships
• One-to-many relationships
• Many-to-many relationships
1. One-to-One Relationships
• In a one-to-one relationship, a key appears only once in a related table. The
employees and departments tables do not have a one-to-one relationship because
many employees undoubtedly belong to the same department. A one-to-one
relationship exists, for example, if each employee is assigned one computer
within a company. Figure 14.2 shows the one-to-one relationship of employees
to computers.
2. One-to-Many Relationships
In a one-to-many relationship, keys from one table appear multiple times in a related
table. The example shown in Figure 14.1, indicating a connection between employees
and departments, illustrates a one-to-many relationship. A real-world example would
be an organizational chart of the department, as shown in Figure : -
3. Many-to-Many Relationships
Ans : -
Merits: -
1. Cookies do not require any server resources since they are stored on the client.
2. Cookies are easy to implement.
3. You can configure cookies to expire when the browser session ends (session
cookies) or they can exist for a specified length of time on the client computer
(persistent cookies).
Demerits: -
1. Users can delete cookies.
2. Users browser can refuse cookies, so your code has to anticipate that possibility.
3. Cookies exist as plain text on the client machine and they may pose a possible
security risk as anyone can open and tamper with cookies.
Merits of Session: -
* It helps to maintain user states and data to all over the application.
* It can easily be implemented and we can store any kind of object.
* Stores every client data separately.
* Session is secure and transparent from user.
Demrits: -