In MongoDB there is expireAfterSeconds index which deletes the object automatically after a certain amount of time. I was wondering if there is such a thing in MySQL?
MongoDB docs about expiring data
Scylla, Cassandra, DynamoDB, MySQL, Oracle, PostgreSQL, and SQL Serve are all major platforms that support TTL, providing the functionality to delete expired data according to the TTL value automatically.
Connect to MongoDB through the SQL GatewayIn MySQL Workbench, click to add a new MySQL connection. Name the connection (CData SQL Gateway for MongoDB). Set the Hostname, Port, and Username parameters to connect to the SQL Gateway. Click Store in Vault to set and store the password.
2) In a database, a record (sometimes called a row) is a group of fields within a table that are relevant to a specific entity. For example, in a table called customer contact information, a row would likely contain fields such as: ID number, name, street address, city, telephone number and so on.
No, you need to DELETE
the data when it's expired.
You can implement something similar by adding a DATETIME field and run a scheduled task in your operating system (a cronjob on Unix-like systems).
You can even schedule it directly in MySQL:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With