You get a bonus - 1 coin for daily activity. Now you have 1 coin

Dummy data - appointment and examples

Lecture



Dummy data - in computer science, dummy data with useful information that does not contain any useful data, but serves to return a formally correct result with all the necessary fields and values. Dummy data - can be used as a placeholder for testing and functional purposes. For testing, dummy data can also be used as stubs or pedes (pad) to avoid problems with software testing, ensuring that all variables and data fields are transferred. In functional use, dummy data can be transmitted for OPSEC purposes. Bogus data must be rigorously evaluated and documented to ensure that they do not cause unpredictable effects.

In addition to testing, for example, for REST API (backend + frontend) Dummy data can be used to generate dummy data in the database itself - dummy users, their actions, etc.

There are online services and offline programs for generating data in different formats from JSON to XLS

  Dummy data - appointment and examples   Dummy data - appointment and examples

example of data synthesis on MySQL (for other databases there are sequences)

There are three MySQL tables, all InnoDB:
users:
- id (index)

friend_requests:
- user1 (index)
- user2 (index)

friend_data:
- user1 (index)
- user2 (index)

For fake users,

You need to generate 10 friend requests and 10 friendships for each user with other random users.

 SELECT
   u.id
   FROM
     users AS u
   LEFT JOIN friend_data AS f ON u.id IN (f.user1, f.user2) AND $ ID IN (f.user1, f.user2)
   LEFT JOIN friend_requests AS fr ON u.id IN (fr.user1, fr.user2) AND $ ID IN (fr.user1, fr.user2)
   WHERE
     (f.id IS NULL)
     AND
     (fr.id IS NULL)
     AND
     u.id <> $ ID
   ORDER BY RAND ()
   LIMIT 1 

Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Software and information systems development

Terms: Software and information systems development